As WindowState#startAnimation for restricting window animation duration
(currently is 10 secs),
For security reason, we also need to restrict app transition animation
duration as 3 secs to prevent malicious app may set a long duration or
infinity repeat counts through ActivityOption#makeCustomAnimation or
Activity#overridePendingTransition with custom animation set.
Bug: 145728687
Test: manual as issue provided test app
Change-Id: I39051d6e4d2b681ce2becbafe14aab3f3d8ebf6b
- Make all time based snoozing use the same time frame
(current millis, not elapsed walltime)
- Add synchronization to snoozing
- Update when entries are and are not removed from data structures
to avoid NPEs
Test: atest, and manual, repeated snooze and unsnooze
Fixes: 150377159
Change-Id: Ic91ff7ac0bd1b3635b35267bdbc64d3ee614c8ab
- And allow them to be unsnoozed with a tap.
- Also use the conversation's shortcut icon and name if available.
- And ignore the setting to turn off the strips since it now requires
explicit user action to make the strip visible
Note 1: unsnoozing a notification causes it to make sound again - we
probably want to change that for manually unsnoozed things
Note 2: the entries in the header don't yet persist across a reboot
Test: atest, manual
Bug: 149486431
Change-Id: Id661c25a49bc982e39deab977eb912f51eaf6757
Root cause: AlarmManagerService send broadcast of TIMEZONE_CHANGED
before boot completed lead to IllegalStateException in AMS and system
skip StartWindowManagerService, and finally got crashed.
Modification: add flag Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT.
Change-Id: Iab9cd5acfeabd114371a8aaaa406a4a1c5919f98
Merged-In: Iab9cd5acfeabd114371a8aaaa406a4a1c5919f98
Test: Monkey
Bug: 79550062
(Cherrypick for R)
Change-Id: I802b90c55946cfac0f64cb69072588b0acb03cc2
PackageInfoWithoutStateUtils is designed for use in core when
the caller doesn't have a PackageSeting.
Because its generic generateApplicationInfo method does a simplified
checkUseInstalled check without the PackageSetting, this fails whenever
state must be taken into account.
This introduces method variants which skips the checks and defers to
PackageInfoUtils's own check.
Bug: 150328400
Test: manual verify call into PackageManager#setSystemAppState with
SYSTEM_APP_STATE_UNINSTALLED and verify
PackageManager#getApplicationInfo throws NameNotFoundException
without fix and succeeds with fix
Test: atest com.android.server.pm.parsing
Test: TODO PackageInfo(WithoutState)Utils test in follow up change
Change-Id: Ie00984c2e1b80d2a3948923dc1293fbfddf01037
Because process start is broken up into the blocking startProcessLocked
method and a handler that then later actually starts the process, we
were failing to block launch of frozen packages (being updated) that
happened to have their request to start take place just before they were
frozen.
This change leaves in place the check for frozen state in the blocking
method, but adds another to isProcStartValidLocked to ensure that a the
actual time of process start we check frozen state again. The side
effect of this is that in the case that the process is started in the
window described above, the caller will not encounter the
SecurityException, but it's more correct that we don't launch an app
while it is being actively updated.
Test: None; difficult to reproduce.
Bug: 150303575
Change-Id: Iea24c9b1c937c699f6df13f4ea742905354d664f
This change passes the uid when granting implicit access to the caller
when calling a provider.
Test: manual; provider query across user bounds
Fixes: 150062663
Change-Id: I4a84febd4f5dc2f24cb2a53a1ac3b8af50772a31
This patch adds a zygote policy parameter to functions in the
ActivityManagerService (and associated classes) to allow for different
launch behavior based on the triggering event. This will allow for
latency sensitive applications to utilize the Unspecialized App Process
Pool, without other processes draining the pool and causing excessive
refill events.
Test: Booted and launched several apps
Bug: 147613193
Change-Id: Ib0a51c8720f95a7eafcab4ad2b5bb08f27a58d8c
(cherry picked from commit 4d05188588)
Switch QuotaController to track all of the pending in quota alarms
internally and only set one alarm for the whole group.
Bug: 150156067
Test: atest CountQuotaTrackerTest
Test: atest CtsJobSchedulerTestCases
Test: atest QuotaControllerTest
Change-Id: Ie415ed0c4f224ac8c37110962009c310e6a6a051
ag/9684175 changed mScreenBrightnessSettingMinimum,
mScreenBrightnessSettingMaximum and mScreenBrightnessSettingDefault
to float without changing proto dump and cts.
Bug: 149895022
Exempt-From-Owner-Approval: Minor change to fix CTS test
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest#testIncidentReportDumpExplicit
Change-Id: Ief85ba8299626a3d92fb43db162a1b6864c8eae0
Using median of the luma for all border pixels
gives a more accurate indication of dominant
background color to use during the screen
rotation animation than does using the average.
fixes: 150056201
Test: Existing tests pass
Also can visually see the change in Google
Photos app where you have a bright image on
the black background. Now background stays
as black instead of being gray.
Change-Id: I87bc87930aff48f90f271fc1783e70caf61dc7f4
Delegates can change the results of permission checks. This change
assumes that delegate results are not dynamic, but that seems to be
the case in practice. Just in case, re-setting the delegate acts as a
cache flush.
Test: atest UiAutomationTest#testAdoptAllShellPermissions
Bug: b/150265749
Change-Id: I26e7330ebbdeaf2e7e282f3c770b962688aabf41
This unblocks dogfooding of go/image-aware-sharesheet. The feature is currently experimental, so the change will be rolled back if it doesn't graduate to production before R is cut (tracked in b/143339485).
Bug: 147206065
Test: dumpsys package
Change-Id: If960a412cb5f603348e99b1878897147caf3a1f5
1. #enableRollback is greatly simplified since now we can get session
objects directly using the session id.
2. ACTION_CANCEL_ENABLE_ROLLBACK handler now uses the session id to
search for rollbacks to delete. Since 'token' is not used, we will be
able to remove unused code and APIs later.
(Cherry-picked from 0a5a4db24c)
Bug: 149663536
Test: atest RollbackTest
Merged-In: I2d0bc2166348ff7b5cdee7ac0b31a61023e33cb8
Change-Id: I2d0bc2166348ff7b5cdee7ac0b31a61023e33cb8
The session id will be used by RollbackManager to simplify the code in
searching for rollbacks and sessions.
(Cherry-picked from 503c1aca53)
Bug: 149663536
Test: m
Merged-In: I94003873f4f244fd6543f22bdbe7b6d4a31aceaf
Change-Id: I94003873f4f244fd6543f22bdbe7b6d4a31aceaf
Pipe the windowToken of the window requesting hideSoftInput just like we
did it for showSoftInput [1].
This calls hideInsets on the correct display when control target is
different from IME target e.g. ActivityView.
Also hideInsets should be called on InsetsControlTarget instead which was
originally attempted in [2]
[1]: Ia49e23dd077d264a58d28a7b8acffde54b7db187
[2]: I7133e151a1037c42b275b97857936437a7a6725f
Bug: 149870112
Bug: 133381284
Test: Manually using steps mentioned in bug.
Change-Id: Ia596a392eb73ae46debd097151c8c9a7edd59833