The dialog would be assigned by 'createDialog', we should use local
varible to prevent null pointer.
Bug: 156747189
Test: atest GlobalActionsImeTest
Test: open chrome, browsing and open global menu.
Change-Id: I572426158c63bbce22c79dc2e0e642914da0fd24
This reverts commit a8f97ffdaa.
Reason for revert: break git_master of errorprone target
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/errorprone/srcjars/frameworks/base/services/core/java/com/android/server/audio/AudioService.java:4710: error: [EqualsNaN] == NaN always returns false; use the isNaN methods instead
MIN_STREAM_VOLUME[AudioSystem.STREAM_ALARM], deviceForAlarm) == Float.NaN) {
^
(see https://errorprone.info/bugpattern/EqualsNaN)
Did you mean 'if (Float.isNaN(AudioSystem.getStreamVolumeDB(AudioSystem.STREAM_ALARM,'?
Bug: 157108450
Change-Id: Icf74dcbefccee6138473101e8dc23fba35faf5ce
When registering a new manager, unnecessary notifications happen.
This CL removes them.
Bug: 145490491
Test: Passed CTS and mediaroutertest
Change-Id: I1d309ea47a537cb855639be9a72268111851ef2e
It's possible that the client dies. Currently the AuthSession doesn't
know about this, so it doesn't do the following. This CL adds them.
1) Close the SysUI dialog
2) Clean up any existing state with individual sensors
Test: atest com.android.server.biometrics
Test: 1) Use a face unlock device
2) BiometricPromptDemo, start authentication
3) Wait for auth to time out (try again button gets shown)
4) Kill the calling app, e.g.
`adb shell killall com.example.android.biometric`
5) Start another activity to trigger task stack change, e.g.
`adb shell am start -a ...`
6) Start another authentication, e.g.
`adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL`
7) Authenticate, reject, or wait for timeout
Test: Repeat the above, but kill the app when the sensor is active
(before auth times out in step 3)
Before: Upon step 6, no authentication UI is shown. Upon 7, SysUI would
crash.
After: Upon step 6, a new authentication UI is shown. Upon 7, no crash
observed, and auth behaves as expected.
Bug: 156719497
Change-Id: Ib573466edac7dd95a8c031e0533cbca693b806f6
Merged-In: Ib573466edac7dd95a8c031e0533cbca693b806f6
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
Make the audio service dump display the min index when it
differs from the normal min index.
Enforcement is only for STREAM_ALARM.
Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
adb shell dumpsys audio
Change-Id: I083a26fd8eeebd4e5434ed02a4a803cbb920ab84
This was moved to PackageCacher, but the old and unused counter
was not removed.
Bug: 154310064
Test: manual device reboots and logs cached count >0
Change-Id: I32fdb4b8fccd281fe61c64f231cb0ba154934679
Now that the underlying deadlock should be resolved, we can attempt
to enable the dynamic permissions checking.
Bug: 115619667
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: If68f08a8e4ffb7518f923108236e2635ea2b8bcd
Currently, it's trying to find an activity in mChangingContainers,
but as Task is added for change transitions, so it ends up getting
into the else statement and incorrectly set the animation CLOSING.
Bug: 157015435
Test: go/wm-smoke
Change-Id: I5be317f2e4adeceeeb06d4a1ec432d014685cf35
WindowContainer#getActivity() was returning null if there was no
matching activity or hit the boundary. Since we were unable to
tell the difference between the two cases, we would continue looking
for a matching activity from higher level window containers.
Take below hierarchy for example, #getActivity() returns null if
the boundary was TopActivity. So, we were kept looking for the matching
activity from Task#2 and returns BottomActivity.
RootTask
- Task#1
- TopActivity
- Task#2
- BottomActivity
Bug: 156014697
Test: start activity from recents in split-secondary
Change-Id: Ic344e8c1c47e9fa05c4de60be8c6b30f75cdb0bc
Previous CL[1] makes the root home task nullable, which causes NPE
in RecentTask#isTrimmable. This CL adds null checks on the method and
other callers which don't have checks, and also marks
TaskDisplayArea#getRootHomeTask as @Nullable.
[1]: 3388bd2a0b
Test: atest RecentTasks RecentsAnimationControllerTest
Test: atest TaskDisplayAreaTests WindowStateTests
fixes: 155100679
Change-Id: I8a59fbcb99810172a3b3192917d24e5122a02476
This CL logs provider info and session info of the system route provider
for debugging purpose.
Set DEBUG = true to gather logs for a while.
Bug: 156723680
Test: manually checking log
Change-Id: I4b020e951ff3b5bd7350cc733c822c702526e260
No need to lock if isCached is true. Move to mGlobalLockWithoutBoost to
avoid priority inheritance overhead.
Test: boots, works
Bug: 155924232
Change-Id: Iadf6fb14088a71f21ce015c014516bf07235a96e
PackageSettings.pkg isn't scanned yet when reading package settings,
but the generation needs information about the package, so we need to
defer it to restorePermissionState().
Fixes: 156204380
Test: devices boots
Change-Id: Id77222b2843395bbba17794a275df641d0d85d63
Fixing b/154317004
App Compaction has a heuristic that ensures the delta in memory between
two full compactions is high enough. The map that keeps track of previous
compactions is missing some entries.
There is a map that keeps entries with previously compacted processes.
When trying to compact again one of those processes, the old entry is
removed and a new one inserted. When a compaction was not made because
of additional conditions / heuristics, the entry is removed but no new
entry is inserted again - as no new compaction occurred. We need to make
sure old entries are kept if the current compaction is not successful and
if it is successful, the map order should reflect it was the most recent
insertion.
Test: atest CachedAppOptimizerTest
Bug: 154317004
Change-Id: I0d4a364928fee162289098c4d4ea0005781bccfd
Allow #getOrCreateRootHomeTask() to take argument onTop for the position
to create the home stack at.
Also don't allow untrusted secondary display to have system decorations.
Bug: 153624902
Test: atest CtsWindowManagerDeviceTestCases:MultiDisplaySystemDecorationTests
Change-Id: I12d0cfcf2436da3619abd314febddb05610e57f2
The brightness spline was setting the entire curve to 0.0f. This was due
to the min and max points of point x+1 being constrained to a factor of
the brightness x. If this happens to be 0.0f, the brightness curve will
never increase.
Bug: 153799222
Test: AutomaticBrightnessControllerTest
Change-Id: Id29389e7fc17b402d2f1bd581a805a6067eac4bb