java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference
at com.android.launcher3.Workspace.removeAllWorkspaceScreens(Workspace.java:608)
at com.android.launcher3.Launcher.startBinding(Launcher.java:2203)
at com.android.launcher3.model.BaseLoaderResults$WorkspaceBinder.lambda$bind$0(BaseLoaderResults.java:200)
at com.android.launcher3.model.BaseLoaderResults$WorkspaceBinder$$ExternalSyntheticLambda7.execute(Unknown Source:0)
at com.android.launcher3.model.BaseLoaderResults$WorkspaceBinder.lambda$executeCallbacksTask$9$com-android-launcher3-model-BaseLoaderResults$WorkspaceBinder(BaseLoaderResults.java:260)
at com.android.launcher3.model.BaseLoaderResults$WorkspaceBinder$$ExternalSyntheticLambda9.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7871)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Signed-off-by: Pranav <npv12@iitbbs.ac.in>
* changes:
Update reorder and folder creation radii
Fix misaligned folder creation drag over target
Update CellLayout.DEBUG_VISUALIZE_OCCUPIED to include drag over targets
Remove maxScreenId from LauncherProvider and whenever we need
a new screenId, query the database to calculate a new screenId.
Also converted and refactored AddWorkspaceItemsTaskTest
and added some extra test cases.
Test: manual & AddWorkspaceItemsTaskTest.kt
Bug: 199160559
Change-Id: I185f6823fed171d778af0130497f5ffaf89c0a70
- Before, dragging anywhere in the cell (including space between cells) would trigger a reorder. Now, we compute the radius to the closest cell edge
- For creating folders on icons, we split the difference between the reorder circle (above) and the icon size
Test: enable DEBUG_VISUALIZE_OCCUPIED and manually drag to ensure works as described above
Bug: 204406063
Change-Id: I368714634ed42a930fd16849f2bde1589df1aa63
Previously, the folder creation distance was based on the center of the cell, rather than the *visual* center, i.e. around the icon. Updated to use existing getWorkspaceVisualDragBounds() to handle this.
Test: with DEBUG_VISUALIZE_OCCUPIED=true, ensure green circles are centered around the app icons; manually drag and drop to check the drawn regions are correct
Bug: 204406063
Change-Id: I691a5cbbfc18c88436b88b7bda42f7920b9a5750
Instead of just drawing the occupied cells in red, now we draw the occupied cells based on drag over regions:
- Dragging over the red regions will reorder the cell
- Dragging over the green regions will create/add to a folder
Test: visual with internal flag on
Bug: 204406063
Change-Id: I62105c1c1a1101b6cd6f9fd222980d03ba6d8b84
Test: Add a clock widget to the home screen. Then, change the navigation
gesture. Go to home screen to confirm the clock widget is rendered
as expected in the portrait. Then, rotate the device to landscape.
Confirmed the clock widget is rendered correctly in the landscape.
Fix: 202837404
Change-Id: I93b70c53f10c8150131b183defc8baf01e5924a8
Generalized popup menu types and logic to allow wider uses outside of launcher.
Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
The grid doesn't have a constant space between cells anymore, so we need
new attributes for the different spaces in different situations.
Bug: 191879424
Test: checking cell size and extra space in dumpsys
Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.
Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
- Override our insets in LauncherRootView to explicitly only care about nav bar size, ignoring any insets due to taskbar.
- Previously we used nonOverlappingTaskbarInsets to belatedly subtract from measurements in e.g. DeviceProfile, but now we can revert most of those calculations since we effectively subtract taskbar insets at the root.
Test: visual in different orientations and navigation modes, and testPressHomeOnAllAppsContextMenu to ensure REQUEST_WINDOW_INSETS still works for automated tests
Fixes: 200607741
Change-Id: I8de5a268c686a1354b4beaa30e101bab6bed5af9
Many changes are required to make scalable displays work correctly on
foldables. This first one is making sure that the correct number of
columns is used when calculating the used width for scalable grid. The
spaces around the workspace are not final yet.
Bug: 191879424
Test: manual
Change-Id: Idc41ed004580f1f86d8f9595d005abc72301b1e3
- Need to increment newScreenId whenever the screen is already bound
- Also cleaned up placeholder on w1 as we now have page pairing logic
Bug: 199160559
Bug: 175939730
Fix: 199131780
Test: drag and drop after clear data
Change-Id: Ic42f3bddfa6cf11b8b726d6181ed2477defde19d
Add a new screen ID for the second extra empty page
and add that new screen as well when the existing
extra empty page is added so that users can put items
on both sides of Workspace.
Test: manual
Bug: 196376162
Change-Id: I0b4f2e818407a10d8a7c032788a7bd7a61267779
- Don't remove a single page if it's empty, only if both pages are empty.
- Add back empty pages after they were removed while the phone
was on single panel home.
- On two panel home don't add new workspace items onto the second screen
Test: manual
Bug: 196376162
Change-Id: I4c54ffa3b359a236deb3ab67adb54111e77ec896
When adding a new page to the workspace, mWorkspaceScreens doesn't
necessarily keeps the order. We should use the mScreenOrder field to get
the correct index of pages.
Fixes: 197198491
Test: drag an app from first page and paddings should be correct
Change-Id: I4f79c164391348b53b71a87d5d49cfc4d3d35e5a
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)
Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
- fix the crash when an item was moved onto the right panel
- fix the issue that prevented the user from moving an item from the left panel
Test: manual
Bug: 194903736
Change-Id: Ib41f5d6d08e8815a52631ef952d32dcf899455e2