When Device boot and SystemUI servies starting, settings provider
may callback onChange() when OneHandedController register observer.
If the callback timing earlier han mEventCallback registered by
WMShll#initOneHanded, then the NPE will happen.
The simple fix is to add NPE check in
OneHandedController#notifyExpandNotifcation()
we can just ignore the callback during init time since the singal
is to expand notification and come from shorcut after user enable
and tap shortcut.(No need to act for the signal during boot progress.)
Test: manual reboot device and observe
Test: atest WMShellUnitTests
Bug: 191600033
Change-Id: I73849afa9904031759da304298221dbb222aeaaa
Callers that don't target S can schedule exact alarms so should get a
return value of true when they call canScheduleExactAlarm.
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
Bug: 191328951
Change-Id: I1cd1d0fb3d3d922360494552e653ed540bfe5227
Bug: 186654390
Add a validation function to perform some basic checks on the
structure of functions that are part of the Computer interface. The
checks are:
1. Every function in Computer must have an @Live annotation. The
annotation indicates if the function is locked or not.
2. If function is locked then there must be an override in
ComputerLocked.
3. If the function is not locked then there may not be an override in
ComputerLocked.
4. Every function in ComputerLocked must be an override of a function
declared in Computer.
Test: atest
* PackageManagerServiceTests#testComputerStructure
The test is run once on the candidate image - no failures are
reported. The test is then run on modified builds, exercising the
following five cases, to verify that errors are properly detected.
Manual testing with the following three cases:
1. A function in Computer that does not have an @LiveImplementation
annotation.
2. A function in Computer that has an invalid
LiveImplementation.override annotation.
3. A locked function that is not overridden in ComputerLocked.
4. A not-locked function that is is overridden in ComputerLocked.
5. A function that is defined for the first time in ComputerLocked.
Change-Id: Ic34aac67fe40aa4fec2d343fe4babdf1c565ce85
WallpaperColors is serialized to disk for use the next time the device
boots. WallpaperColors wasn't serializing the quantizer results, just
the 3 "main" colors, so it was unable to identify more than a few
colors, using the AOSP algorithm.
Bug: 186203148
Test: Reboot device without patch, verify only a couple colors are
available, or none if the AOSP algorithm for selecting main colors
differed sufficiently. Verify that with patch, rebooting the device
shows the same color options in the same order as it did at runtime.
Change-Id: I881a2cfe5b7dda5b7734ce3fda7275dc5544ce0c
Bug: 186778818
This makes two changes to PropertyInvalidatedCache.
1. disableLocal() now disables all current and future caches that use
the same name (not the necessarily the same property) , in the
local process. Previously, disableLocal() only disabled a single
cache instance, but the intent was always to disable all instances
of the same cache in the process.
disableInstance() is available with the old behavior.
2. A bypass() method has been added. If bypass() returns true,
query() will skip the cache and go straight to the binder call as
though the cache had been disabled. The default implementation
always returns false. Caches can override the implementation to
avoid caching selected queries.
These changes specifically address the problem of caches that are
created dynamically and which should be disabled in the local
process.
A unit-test is added for PropertyInvalidatedCache. This is not a
complete test because test processes are not allowed to set system
properties. The unit-test will be improved in the future by modifying
PropertyInvalidatedCache to use an invalidation mechanism other than
system properties.
Manual test: boot a phone with a baseline build and with the build
under test and verified that the list of disabled caches is the same.
Use 'dumpsys cacheinfo' to get the cache status.
Test: atest
* FrameworksServicesTests:UserManagerServiceCreateProfileTest
Change-Id: I9f604b872911290e4e3d8a58b3e28e328b2000a9
Previously, we only dispatched onEnd if onStart was already dispatched. However,
some animations might get cancelled after onPrepare but before onStart. In that
case, it is rather tricky for apps to actually cancel the animation.
Now we always dispatch onEnd if onPrepare has been dispatched already.
Fixes: 177983907
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I3fa142110bd5593679f87561c138ed3318034fca
1. Remove redundant LS impressions: Bouncer->LS, Shade LS->LS (User has to visit LS first in order to visit Bouncer and Shade LS)
2. Remove extra impression when user is on second media card, tap to app
or turn off screen (previously there will be an impression logged for
first media card)
3. Fix logging for resumption media card, previously they were not
logged.
4. Fix impression logging for reactivated media card when user connect headphone on
QQS, previously they were not logged
5. Use SmallHash to compute instanceid according to b/190640624
6. Remove media resume card logging when Smartspace data is not
available
Bug: 181364757
Test: manual
Change-Id: I6e2e7bc00ecd3f21fefedb2c47315b1e85e5beeb