Commit Graph

62581 Commits

Author SHA1 Message Date
Jay Aliomer
b86cf15c28 Merge "Battery saver dark mode bug" into rvc-dev 2020-02-28 17:01:39 +00:00
Shafik Nassar
ab2132d460 Merge "Ignore package mode for MANAGE_EXTERNAL_STORAGE" into rvc-dev 2020-02-28 15:30:58 +00:00
Julia Reynolds
b2c82a055e Merge changes Ic91ff7ac,I7d118592 into rvc-dev
* changes:
  Fix some more snoozing bugs
  Silence notifications that are manually unsnoozed
2020-02-28 15:22:20 +00:00
Patrick Baumann
da9de09a2c Merge "Calculates visibility in queryIntent* methods" into rvc-dev 2020-02-28 13:14:05 +00:00
Julia Reynolds
66db87d0c0 Merge "Show snoozed conversations in conversation header" into rvc-dev 2020-02-28 11:46:33 +00:00
TreeHugger Robot
f43e6bc49d Merge "Restrict app transition maximum duration" into rvc-dev 2020-02-28 11:17:34 +00:00
Winson Chiu
a57109b660 Merge "Skip no-state checkUseInstalled check inside PackageInfoUtils" into rvc-dev 2020-02-28 06:31:06 +00:00
JW Wang
f8d52afa16 Merge changes Ia233ca64,I2d0bc216,I94003873 into rvc-dev
* changes:
  Remove unused code (3/n)
  Use session id to search for rollbacks (2/n)
  Include session id when sending broadcasts (1/n)
2020-02-28 06:29:00 +00:00
lumark
8669ef3857 Restrict app transition maximum duration
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
2020-02-28 14:06:55 +08:00
TreeHugger Robot
3e7dd91752 Merge "Use median instead of mean for sampling border luma" into rvc-dev 2020-02-28 05:08:52 +00:00
TreeHugger Robot
08f6ca3915 Merge "Prevent start if package is frozen" into rvc-dev 2020-02-28 04:24:30 +00:00
TreeHugger Robot
71c8e9a0a3 Merge "AlarmManagerService: Fix FWR before boot completed" into rvc-dev 2020-02-28 03:30:33 +00:00
Julia Reynolds
6cab5ff811 Fix some more snoozing bugs
- 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
2020-02-28 02:49:06 +00:00
Julia Reynolds
6503162db1 Silence notifications that are manually unsnoozed
Test: atest
Bug: 149486431
Change-Id: I7d11859210f6000120b2c51dc33da3d0928fb22e
2020-02-28 02:48:53 +00:00
Julia Reynolds
138111fca3 Show snoozed conversations in conversation header
- 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
2020-02-28 02:48:07 +00:00
TreeHugger Robot
ccf72664db Merge "Remove the notification when FGS while-in-use permission is restricted." into rvc-dev 2020-02-28 02:43:35 +00:00
TreeHugger Robot
d3afc9f1d9 Merge "Fixes wrong id when granting provider access" into rvc-dev 2020-02-28 02:18:39 +00:00
TreeHugger Robot
aa62588560 Merge "Adds Zygote policy flags to control how applications are launched" into rvc-dev 2020-02-28 01:26:38 +00:00
jianzhou
acce5e4a64 AlarmManagerService: Fix FWR before boot completed
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
2020-02-27 17:09:01 -08:00
Winson
d2732995bb Skip no-state checkUseInstalled check inside PackageInfoUtils
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
2020-02-27 17:07:51 -08:00
Hui Yu
c02592d7b2 Remove the notification when FGS while-in-use permission is restricted.
Bug: 136219221
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerApi29Test.java
Change-Id: I996abab1c7032e5247883f3b06ba2bd82c425007
2020-02-27 16:20:10 -08:00
Jeffrey Huang
aee5dd2935 Merge "Update directory for proc stats puller" into rvc-dev 2020-02-28 00:06:00 +00:00
TreeHugger Robot
3201a3aab3 Merge "Reduce individual quota alarms set." into rvc-dev 2020-02-27 23:58:48 +00:00
Patrick Baumann
72e1cacf29 Prevent start if package is frozen
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
2020-02-27 15:12:09 -08:00
Patrick Baumann
5533722b9a Fixes wrong id when granting provider access
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
2020-02-27 13:27:13 -08:00
Chris Wailes
ee398f9664 Adds Zygote policy flags to control how applications are launched
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)
2020-02-27 20:33:12 +00:00
Trung Lam
8839aaee6d Merge "Implement backup and restoration of conversation infos." into rvc-dev 2020-02-27 19:56:29 +00:00
Winson Chiu
b0c5105b2d Merge changes from topic "actor-signature-policy-rvc-dev" into rvc-dev
* changes:
  Actor signature overlayable policy
  Refactor overlayable policy
2020-02-27 18:27:53 +00:00
Winson Chiu
ab5563dd1c Merge "Initialize PackageManagerService ApplicationInfo instances to system user" into rvc-dev 2020-02-27 18:26:25 +00:00
Mike Ma
36eeacc058 Merge "Fix PowerIncidentTest" into rvc-dev 2020-02-27 18:13:31 +00:00
Ytai Ben-tsvi
d050812a30 Merge changes I9f0a440d,I0b734cc7,I510ee307,Ia257021d into rvc-dev
* changes:
  Pretty-print parcelables when logging
  Add sysdump to SoundTriggerMiddlewareService
  SoundTriggerMiddlewareService logging decorator
  Refactor SoundTriggerMiddlewareService
2020-02-27 18:09:39 +00:00
Kweku Adams
35d05acc8c Reduce individual quota alarms set.
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
2020-02-27 10:06:50 -08:00
TreeHugger Robot
92a82e2d81 Merge "VibratorService: Conditionally Use Callbacks" into rvc-dev 2020-02-27 17:57:49 +00:00
Daniel Colascione
8dfcca7db7 Merge "Flush permission cache when we change delegates" into rvc-dev 2020-02-27 17:53:43 +00:00
Mike Ma
14eef1368c Fix PowerIncidentTest
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
2020-02-27 09:38:10 -08:00
Katsiaryna Naliuka
7bee686ef7 Merge "Grant storage permission to the content capture service." into rvc-dev 2020-02-27 16:39:00 +00:00
Vinit Nayak
c4bbdff6db Use median instead of mean for sampling border luma
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
2020-02-27 08:31:04 -08:00
Anna Trostanetski
6d1c0c7d90 Merge "Cache binder calls in CompatChanges" into rvc-dev 2020-02-27 14:58:13 +00:00
Daniel Colascione
a3c6c09c69 Flush permission cache when we change delegates
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
2020-02-27 12:29:58 +00:00
TreeHugger Robot
9651ab2de4 Merge "Fix a bug with the settings for skipping integrity check for verifiers." into rvc-dev 2020-02-27 12:09:51 +00:00
TreeHugger Robot
cadf55a3e8 Merge "Add "com.android.packageinstaller" as recognized installer." into rvc-dev 2020-02-27 12:09:22 +00:00
Katsiaryna Naliuka
bc05190cd2 Grant storage permission to the content capture service.
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
2020-02-27 11:09:39 +00:00
Taran Singh
73b1d16d28 Merge "Pipe windowToken for hideSoftInput" into rvc-dev 2020-02-27 07:14:04 +00:00
Tim Murray
945984e265 Merge "freezer: don't freeze WPRI-bound apps" into rvc-dev 2020-02-27 06:44:36 +00:00
JW Wang
298239b59e Remove unused code (3/n)
(Cherry-picked from 2f777b39b7)

Bug: 149663536
Test: m
Merged-In: Ia233ca642d58b7b6a0984359ea11958f8d9a8ff8
Change-Id: Ia233ca642d58b7b6a0984359ea11958f8d9a8ff8
2020-02-27 14:37:05 +08:00
JW Wang
635382efc6 Use session id to search for rollbacks (2/n)
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
2020-02-27 14:36:39 +08:00
JW Wang
0757179ff8 Include session id when sending broadcasts (1/n)
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
2020-02-27 14:35:56 +08:00
TreeHugger Robot
7843e91e80 Merge "Increase activity exit-info timestamp resolution" into rvc-dev 2020-02-27 05:21:46 +00:00
Tarandeep Singh
4fe5b654a1 Pipe windowToken for hideSoftInput
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
2020-02-27 04:13:25 +00:00
Automerger Merge Worker
8a1c944d0d Allow settingIgnored for DBH request if inEmergency am: 97e162d605
Change-Id: I12cbf0e098f599169392fb4ae7c725d5052b674e
2020-02-27 03:35:09 +00:00