> Removing static mocks and using Sandbox context instead
> Removing inheritence in LauncherModel and converting LauncherApps.Callbacks
to a separate class. decMaker sometimes fails because of API changes in
LauncherApps.Callbacks
Bug: 319877828
Test: atest LoaderTaskTest
Flag: N/A
Change-Id: If78b5d83595627a355b284f52d887d75fef53014
This allows us to reuse this logic at other places
Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I2e19aad207efb3a99bb3b70ba71c076699dba2bc
This CL adds the following:
1. Adds filtering and addition of Private Profile apps in main user
all apps recycler view
2. Enables decoration of Private Profile apps
3. Enables hiding Private Space container based upon a settings entry.
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I33dc55a3a39e75d3fc336ca6a488b282e2dd322c
When this flag is enabled, new Developer Options appear which
allow you to customize the slop and timeout to invoke LPNH.
The slop is defined as a multiplier to the default edge slop
(which I discovered while looking into this - it appears to
be intended for touches along the device edge and is 50%
larger than the default touch slop; currently used by Back).
Timeout is defined in milliseconds, defaulting to 400, at least
on my device.
Bug: 301680992
Bug: 300955321
Flag: CUSTOM_LPNH_THRESHOLDS - should be no-op with default off
Test: Manual with flag on and adjusting sliders, and flag off
Change-Id: Iabc7b3706f4fdd6f0392c858b81a856e375ffd51
Bug: 303471576
Test: try removing smartspace by going to home settings and turning it off
Flag: ENABLE_SMARTSPACE_REMOVAL
Change-Id: Idd95da1b302927885a8c469e38db6d3c5130f8c1
> It will automatically target the latest SDK it was compiled with
Bug: 284349887
Test: Presubmit and manual
Flag: N/A
Change-Id: I32629b0dd710c3c04d8f70f988b7279e7cae6731
> Addition/removal of shortcus is already removed. This just
cleans up the unused code path
Bug: 275875209
Test: Updated tests
Flag: N/A
Change-Id: I8ab7f57b693f996920e50e8beecafcffab5167e9
Pre-U ACTION_MANAGED_PROFILE_UNAVAILABLE broadcast meant the user was
shutting down, and could be used to track when the user can be treated
as locked. In Android U work profile in quiet mode remains running, so
to track when the user gets locked this CL swithces to
ACTION_PROFILE_INACCESSIBLE instead, which is sent when the user is shut
down.
+ formatting fix to satisfy lint
Bug: 277715473
Test: manual, with TestDPC and work contact shortcut
Change-Id: I258df006e2d87f69bbbac82d20ad72ddce625425
Currently cached widget are retained in LauncherWidgetHolder which is
released when Launcher activity is recreated. This CL moves the cached
widget into LauncherAppState to keep the cache alive.
Bug: 268189435
Test: steps below
1. Add multiple widgets (Calendar / Weather ... e.t.c) to Home Screen
2. Open Google Map, start navigation to any place
3. Google Map enters navigation mode and changes resolution
4. Swipe up to exit Google Map and go to Home Screen
5. Verify you don't see deferred widget host view.
Change-Id: I8b56167313780cd1be2a5da88517114acc6d44af
This change includes migrating data required for starting the launcher
from encrypted storage into device protected storage. All of the data
being moved has already been approved by the correct authorities.
Bug: 251502424
Test: Performed latency testing using logs from user unlock until first
workspace screen loaded.
Change-Id: I58b0cd1c7bad260c2252f9e172ef85ab885c7fe9
This is eventually allow us to move all register to background thread
Also creating a single ScreenOn tracked which is used at multiple places
Bug: 264465756
Test: Verified on device
Change-Id: Ibadf9ca43218e578954420d97a733adfa0a94fc7
Merged-In: Ib410e5bf02773cefde5bf0a0a1f2f1c108718d24
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.
The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.
Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.
Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
Android T adds support to allow a runtime receiver to be registered as
not exported, but to ensure apps can take advantage of this, calls to
registerReceiver must specify a flag indicating whether the receiver
should be exported for apps targeting T+ that are registering for
unprotected broadcasts. This commit adds the RECEIVER_EXPORTED
flag to the call to registerReceiver in LauncherAppState when
registering for ACTION_FORCE_RELOAD.
Bug: 161145287
Test: Build
Change-Id: I9ffb5e00f2ce5bc9dcff4b681237ba06604fc995
This change will pull only the workspace items but not the launcher settings such as grid layout etc. Future CLs will address it.
Bug: 181703659
Test: Manual-`statsd_testdrive 10108` http://gpaste/4894958784872448
Change-Id: I0e7d7da62034c411edb26ff9205a81b0e2e891a0
> Updating IDP to use fixed bitmap sizes, so that the cache
stays valid
> Caching last known windowMetrices for non-active displays and
using estimation only when the cache is not available
> Only reloading model if IDP change could have affected the model
> Remove unnecessary listeners from IDP which are already controlled by
model lifecycle
Bug: 191657065
Test: Manual
Change-Id: Ia8e6dfafd0977e62aa3fcf367ad79f7a49b2df51
This reverts commit 455ba62b5d.
Reason for revert: Breaks tests on all targets
Bug: 196825541
Bug: 197570389
Change-Id: Ida6792a09c54dee46105b6b914a0dd1545bdf48d
> All previews are generated on demand when the corresponding
header expands
> Using ItemAnimator to animate layout changes when preview loads
Bug: 196238313
Test: Manual
Change-Id: I0cb859c8443c2c536399e4063f58baecfc7416ad
This allows for smooth animations as the items will have their full
height resolved
Bug: 190892517
Test: verified locally
Test: CachingWidgetPreviewLoaderTest
Change-Id: I86afc6951a4cc82ae45e63795791d259a3bb3cda
> Closing existing preview if a new request comes for same host token
> Closing in-memory icon db when closing preview
> Removing unnecessary wait blocks on UI thread and rendering
view asynchronously
> Fixing preview loading failing on LauncherAppState access
Bug: 186712316
Bug: 187140897
Test: Manual
Change-Id: I045930b007e5dc015320224a197eee20a8354d17
Also separating icon provider for recents from Launcher as it used a fixed size
Bug: 183641907
Test: Verified on device
Change-Id: I6ea3caa0066d1483bfb8a81f0e8aaa472c813afe
Due to the dogfood 4x5 grid using the wrong db, there may
be some rearranging of items.
The goal is to completely remove the old 4x4 and 4x5 grid,
but first we need to silently migrate users to the new grid.
We still need to keep the old grids in the device profile
so we hide them from the Styles & Wallpaper app.
We also need to reset and remove the ENABLE_FOUR_COLUMN feature
flag from the UI.
- Added TODO to remove this logic in the tracking doc
Bug: 183965808
Bug: 175329686
Test: have old 4x4 or 4x5 grid set up
install apk with these changes
confirm that we are now using the new grid and the
other grid options are inaccessible to the user
Change-Id: I81a91b8415effbe0bf7ba722f11ab44a4169e3df
Existing ContentObserver will cache values and overwrite
them when the value itself is modified or caller force
updates.
Bug: 149571513
Test: Wrote unit tests, mostly for caching logic.
Not meant to test ContentObserver contract for registering an
observer.
Change-Id: I12835f6c2be27ce17f65a55c51c4ef85c63b4487
Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI
Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
- create predictor from items in bgModel instead of scanning views
- Launcher no longer checks for duplicates before sending pin/unpin events
- sending cached items from last prediction to reduce UI shuffle
- Switch to using UserCache to persist and read ComponentKey
Bug: 148814143
Bug: 156413231
Bug: 156200931
Change-Id: Ide6330bed8eb7f0c6fbec1d1ac21e7f67a9b2be2
Loads list of cached apps and shows predicted app icons with the rest of workspace items.
-> Extracted prediction caching logic into a model layer
Bug: 155029837
Test: Manual
Change-Id: I6981594a910f5fe4e8e8cf8fe39db0cb856e7acd
go/grid-migration-preview
With this change, we can see actual grid migration in wallpaper preview.
The approach here: we use a tmp table (favorites_preview) here specifically for this preview (to write off the migration results), and load from this tmp table workspace items if migration is necessary and successful. Otherwise, we load from the current workspace.
UPDATED: this change should be completely compatible with the new multi-db grid migration algorithm. Here is why
1. In LauncherPreviewRender#renderScreenShot, I added a check to decide which grid migration preview method we should call. Once v2 preview method is implemented, it should be integrated with other parts of this change perfectly (the reason will be mentioned below).
2. While we have multiple DBs, mOpenHelper in LauncherProvider always points to the current db we are using. Queries using CONTENT_URI is routed to whatever DB mOpenHelper points to, so it works perfectly to directly operate on CONTENT_URI even when we use multi-db underneath the hood.
3. With 1 and 2 mentioned, I believe in order for this preview change to support multi-db, we only need to implement the V2 grid migration algorithm. Because most of what we are doing in this change is wrapped in GridSizeMigrationTask, it's perfectly safeguarded.
Bug: 144052839
Change-Id: Ie6d6048d77326f96546c8a180a7cd8f15b47e4c4
The flag is only set when building from Android Studio... and is never
used for dogfood.
Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b