Commit Graph

62600 Commits

Author SHA1 Message Date
Paul Chang
af730a12bd Merge "Improvements to Bugreporting API." into rvc-dev 2020-02-29 00:20:04 +00:00
TreeHugger Robot
aec73f132b Merge "Fix issue with history deletion" into rvc-dev 2020-02-29 00:17:10 +00:00
Winson Chiu
eedf74437f Merge "Use PackageInfoUtils with null PackageSetting to set server-only flags" into rvc-dev 2020-02-29 00:10:53 +00:00
Julia Reynolds
575e0885d2 Fix issue with history deletion
History files that were edited after creation (like if a package
was uninstalled) weren't being deleted in a timely manner

Test: atest, manual on device with old files (launch history;
they are gone)
Fixes: 150479791

Change-Id: I0ddc22e988a80a8f1df01dfd2162d9d23e4ace7e
2020-02-28 22:16:23 +00:00
Ytai Ben-tsvi
2cba965676 Merge "Pass models to soundtrigger middleware with shared memory" into rvc-dev 2020-02-28 21:29:53 +00:00
Ytai Ben-Tsvi
d5065ba8a5 Pass models to soundtrigger middleware with shared memory
This both avoids the need to make extra copied for the models and
allows exceeding the parcel size limits.

Bug: 150100907
Test: Manual testing of basic sound trigger functionality
Change-Id: Ic4c5c1a9de3e29b1b6fa82442254e1afe7daec19
2020-02-28 13:01:24 -08:00
Kenny Root
3e5a0605cf Merge changes Ief1cac19,Ibc9236a1 into rvc-dev
* changes:
  Resume-on-Reboot: add storage for armed status
  LockSettingsService: move database storage
2020-02-28 20:49:29 +00:00
Kenny Root
ea134edcd5 Resume-on-Reboot: add storage for armed status
In order to avoid marking a manual reboot as a RoR failure, add another
indicator that the resume-on-reboot was armed before the last reboot.

(cherry picked from commit 5e6a959653)

Test: atest RebootEscrowManagerTests
Bug: 149833390
Change-Id: Ief1cac1952302e43a2c57314bc1449fa7bf38ba7
Merged-In: Ief1cac1952302e43a2c57314bc1449fa7bf38ba7
2020-02-28 20:48:46 +00:00
Kenny Root
a486e2d780 LockSettingsService: move database storage
The database storage commands are part of ILockSettings, but the actual
storage takes place on LockSettingsStorage. Redirect the calls in
LockSettingsService to LockSettingsStorage to make the ownership a bit
more clear.

(cherry picked from commit 366c310e4a)

Bug: 149833390
Test: atest LockSettingsStorageTests LockSettingsServiceTests
Change-Id: Ibc9236a171cedd3b09b1afed70895bc91e895a1c
Merged-In: Ibc9236a171cedd3b09b1afed70895bc91e895a1c
2020-02-28 20:48:13 +00:00
Taran Singh
7ac48bae21 Merge "Fix controlWindowInsets for IME" into rvc-dev 2020-02-28 19:34:01 +00:00
Tarandeep Singh
b9538cdfff Fix controlWindowInsets for IME
If IME is already visible, requestShow() is immediate.
If animation is finishing and IME is hiding, notify IME process of the
visibility.

Bug: 111084606
Test: Use test app [1] and verify that swiping up and down multiple
      times opens and closes the IME respectively.

      [1] I4320871bdc8184fac38921616e1a1322f8dbc804

Change-Id: Icf202b56c0bc3833e86ee70c43fedd418e27b140
2020-02-28 19:33:11 +00:00
Jovana Knezevic
a0eed34ecb Merge "Fixes switch-user -w command." into rvc-dev 2020-02-28 19:04:15 +00:00
TreeHugger Robot
97ce4799af Merge "DisplayModeDirector: use configGroup when choosing default config" into rvc-dev 2020-02-28 17:43:40 +00:00
Dmitri Plotnikov
9e0ea0c953 Merge "Allow blocking calls to InstrumentationWatcher" into rvc-dev 2020-02-28 17:29:13 +00:00
Paul Chang
1a44ed3a18 Improvements to Bugreporting API.
- Show a toast to indicate screenshot is taken.

BUG:149525300
Test: Flash and press bug report shortcut and check the toast
Change-Id: Ib210c8855d2b588b51f883e32070c8b748ea4e3f
Merged-In: Ib210c8855d2b588b51f883e32070c8b748ea4e3f
2020-02-28 17:14:48 +00:00
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
9a2b1b350a Use PackageInfoUtils with null PackageSetting to set server-only flags
PackageImpl on the server side contains fields that are system server
specific, such as what partition the package was found on. These
fields are hidden from the core side, since they're irrelevant
for APKs that are not processed by PackageManagerService.

To mirror this, only the server side PackageInfoUtils sets the
flags related to theses server-side fields.

So when a PackageSetting is created, this server-side
PackageInfoUtils must be called, not the core side
PackageInfoWithoutStateUtils, with a null PackageSetting,
to set the related pkg(Private)Flags.

Bug: 150083410

Test: atest android.cts.backup.OtherSoundsSettingsHostSideTest
Test: atest com.android.server.pm.parsing

Change-Id: Ife39c83e243daf5d3583f04fce1c0f87c0e20585
2020-02-28 02:42:14 -08: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
Ady Abraham
8a5e39174f DisplayModeDirector: use configGroup when choosing default config
When calling to SurfaceFlinger to set the display config spec, the
default configId needs to consider the config group of the config.

Bug: 149784270
Test: Simulate multiple config with debug change ag/10355181
Change-Id: I50dce6e31e8cc842a221baaa69e128428f67be99
2020-02-28 04:35:51 +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
Dmitri Plotnikov
92e9d96e37 Allow blocking calls to InstrumentationWatcher
InstrumentationWatchers are used in tests, therefore
we are not concerned about them misbehaving on
production devices.

Fixes: 147705910
Test: run an instrumentation test and
  there are no ONEWAY_FLAG warnings from BinderProxy

Change-Id: I323d4598a4d8e5e754251d8d4f27c5c6a2faea2f
2020-02-27 19:38:08 +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