Commit Graph

8963 Commits

Author SHA1 Message Date
Jorim Jaggi
8a269993ce Merge "Dispatch separate navigation bar frame to IME" 2020-01-30 11:33:39 +00:00
Oli Lan
f6e58c9f53 Merge changes from topic "apexcerollback"
* changes:
  Add tests for DE_sys and CE apex data rollback.
  Snapshot and restore CE apex data directories.
2020-01-30 10:49:47 +00:00
TreeHugger Robot
59f31d5e3c Merge "Create AppForegroundHelper" 2020-01-30 01:22:36 +00:00
Hongming Jin
1709c9fca8 Merge "Allow recents components to register/unregister system action." 2020-01-29 23:47:35 +00:00
Soonil Nagarkar
b6375a4f7f Create AppForegroundHelper
Create a new helper to deal with application foreground state changes.

1) Rename various Helpers.
2) Move GnssManagerService into location dir.
3) Use new AppForegroundHelper everywhere.
4) Move sendNiRequest to internal API
5) Some refactoring of NetInitiatedActivity

Test: atest AppForegroundHelperTest
Change-Id: Ifffe0e6a34452a18d017c6b190547b904d77b430
2020-01-29 15:23:06 -08:00
Mehdi Alizadeh
505fb76065 Adds CACHED shortcuts and methods to retrieve and remove
Adds a new flag to ShortcutInfo to mark it as cached. Also adds new
APIs in ShortcutManager to remove or retrieve a cached shortcut.

Bug: 148084870
Test: atest com.android.server.pm.ShortcutManagerTest1 \
            com.android.server.pm.ShortcutManagerTest2 \
            com.android.server.pm.ShortcutManagerTest3 \
            com.android.server.pm.ShortcutManagerTest4 \
            com.android.server.pm.ShortcutManagerTest5 \
            com.android.server.pm.ShortcutManagerTest6 \
            com.android.server.pm.ShortcutManagerTest7 \
            com.android.server.pm.ShortcutManagerTest8 \
            com.android.server.pm.ShortcutManagerTest9 \
            com.android.server.pm.ShortcutManagerTest10
Change-Id: I859b416ccd4228eec10a436550ff98866a62af66
2020-01-29 22:06:40 +00:00
Hongming Jin
6b62158ad5 Allow recents components to register/unregister system action.
Bug: 136286274
Test: atest AccessibilityManagerServiceTest
      atest AccessibilitySecurityPolicyTest
Change-Id: I8926f8c52995d6997c7ed601ebe30d1a1f209347
2020-01-29 13:38:08 -08:00
Gavin Corkery
7b1117247b Merge "Return incremented rescue level when bootlooping" 2020-01-29 18:31:35 +00:00
Alex Johnston
b7fc2ab443 Merge "Update profile owner of org-owned device global restrictions" 2020-01-29 17:51:25 +00:00
Omer Nebil Yaveroglu
0499283f81 Remove XML serialization/parsing code from the app integrity component.
This code is already out-of-date and unused.

Bug: 148516969
Test: N/A - Code deletion
Change-Id: Ibfca2959cad409592ad5b4fb44c7f21d0b15865d
2020-01-29 14:49:30 +00:00
Gavin Corkery
bb3a5048c9 Return incremented rescue level when bootlooping
The rescue level returned from onBootLoop must be incremented, since
otherwise USER_IMPACT_NONE would be returned to Package Watchdog if
the initial rescue level was 0, and no mitigation would take place.
Add a test to verify this.

Test: atest RescuePartyTest
Bug: 136135457
Change-Id: I27c56d17a6177abdeb3707fda70ca38d4fd4ef2c
2020-01-29 14:16:55 +00:00
Oli Lan
7bbd8b471f Snapshot and restore CE apex data directories.
This change extends the existing mechanisms for snapshotting and
restoring CE data for APKs to also support CE apex data.

StagingManager now calls through to RollbackManager to perform the
snapshot/restore (at the same time as it does for APK-in-APEX,
added recently).

For APEXes, the actual snapshot or restore is performed by apexd instead
of installd. Tracking of pending backups and restores is performed by
RollbackManager in the same way as for APKs.

Bug: 141148175
Test: Manual install/rollback of an APEX with dummy files in CE data directory.
Check that snapshot and restore occur as expected.
Test: atest CtsStagedInstallHostTestCases
Change-Id: I82e1818f927881ea774148d97ca1981a447b598d
2020-01-29 13:53:31 +00:00
Omer Nebil Yaveroglu
84f7c3fb53 Implement the necessary methods for identifying the DENY / FORCE_ALLOW
causes for logging purposes.

Bug: 147095027
Test: atest frameworks/base/core/tests/coretests/src/android/content/integrity/
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/integrity
Change-Id: Id502287b22fc54fd1585f81b313fb466d1f8442c
2020-01-29 12:21:14 +00:00
Winson Chung
75f5bf33b0 Merge changes from topic "winscope-sysui"
* changes:
  Add initial SysUI trace support
  Update trace buffer to support SysUI & Launcher
2020-01-29 05:04:48 +00:00
Danning Chen
02677c9760 Merge "People Service data layer main structure" 2020-01-29 01:23:22 +00:00
Winson Chung
8ce640f9ad Merge "Always add the task to the recent task list when starting" 2020-01-28 23:36:27 +00:00
Danning Chen
a1bf86d516 People Service data layer main structure
Change-Id: I53bf5f1bce3234da7e1dcf8cfdd293120781aef4
Test: Build and run on a test device
Bug: 146522621
2020-01-28 15:30:31 -08:00
Mady Mellor
bd35832d9b Merge "Bubble API: post update when bubble notification suppression flag changes" 2020-01-28 22:04:38 +00:00
Ruslan Tkhakokhov
c2f1781b28 Merge "Stage 'android' package in PerformUnifiedRestoreTask" 2020-01-28 20:02:05 +00:00
TreeHugger Robot
017ed9b31c Merge "Refactor the IntegrityCheckResult to hold a list of rules so that we can identify the DENY / FORCE ALLOW type in our logs. The change also refactors evaluateRules of RuleEvaluator method so that it is simpler to understand." 2020-01-28 18:50:58 +00:00
TreeHugger Robot
1f294aa9b2 Merge "Add more logging for Wakelocks." 2020-01-28 18:43:39 +00:00
TreeHugger Robot
b32b15d146 Merge "Make system-signed apps implicitly force-queryable" 2020-01-28 18:04:13 +00:00
Omer Nebil Yaveroglu
09e44f5f96 Refactor the IntegrityCheckResult to hold a list of rules so that we can
identify the DENY / FORCE ALLOW type in our logs. The change also
refactors evaluateRules of RuleEvaluator method so that it is simpler to
understand.

Bug: 147095027
Test: atest frameworks/base/services/tests/servicetests/src/com/android/server/integrity/model
Change-Id: Ifc9d026ae19940adb9f4aa5028acbd2e495595d1
2020-01-28 17:28:24 +00:00
Santos Cordon
9204cc871f Add more logging for Wakelocks.
Adds a new in-memory wake lock log to store wake lock usage to dump
during bugreport collection.

Utilizes a preallocated ring-buffer to save the wake lock events.

Test: atest WakeLockLogTest
Change-Id: If3c054f9e689fe1d6535f6cad03e4f9e9a0aa8ee
2020-01-28 17:21:35 +00:00
Ruslan Tkhakokhov
9e76d042ca Stage 'android' package in PerformUnifiedRestoreTask
Bug: 145126096
Test: atest KeyValueRestoreExclusionHostSideTest
      atest PerformUnifiedRestoreTaskTest

In a KV restore after getting data from the transport, we save it into a
stage file. Then we go through the keys and do filtering: skip the keys
that should be excluded and extract the widget data into a separate
file. The rest of the data is wirtten into the file where the app's
backup agent will read it from.

However, this process is skipped for 'android' package. It was done as
an optimization before the ability to exclude keys from restore was
introduced: as 'android' backup data doesn't contain any widget info.
However, now we need to process 'android' package as well because it can
contain keys to be excluded.

Change-Id: I612f8cc9c6903c9bd257762360dadb81ed12d106
2020-01-28 16:37:35 +00:00
Alex Johnston
9722abe539 Update profile owner of org-owned device global restrictions
Added user restrictions to the list of user restrictions that are
applied globally when set on the parent profile DPM instance
by the profile owner of an organization-owned device.

Bug: 148437699
Test: atest com.android.server.pm.UserRestrictionsUtilsTest
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionsSetOnParentAreEnforced

Change-Id: Ic202524d5bc643f9704c98d6c5d60c206d9b663a
2020-01-28 16:15:55 +00:00
Jorim Jaggi
9b4f420758 Dispatch separate navigation bar frame to IME
In order to have different size for navigation bar for gesture
navigation.

Test: InsetsStateControllerTest
Test: Open IME in Gesture Nav
Bug: 118118435
Change-Id: Ifd7fd3185197d0caa12a2f6c32124e1c14d9052e
2020-01-28 17:06:35 +01:00
Omer Nebil Yaveroglu
0e44e0d45b Move out IntegrityCheckResult related methods from AppIntegrityManagerServiceImpl and provide unit tests for IntegrityCheckResult.
Bug: 147095027
Test: atest frameworks/base/services/tests/servicetests/src/com/android/server/integrity/model/IntegrityCheckResultTest.java
Change-Id: I4bcd7fe1284515a2483ae4be77d6d17c7fcbcc36
2020-01-28 15:03:55 +00:00
Automerger Merge Worker
e06da209cd Merge "Add permissions for using PlatformCompat methods" am: 418169d181 am: 3df9ed3852 am: f637859aef
Change-Id: I80598339c58679e348a66b7f967eb6dece1d7642
2020-01-28 12:35:19 +00:00
Automerger Merge Worker
f637859aef Merge "Add permissions for using PlatformCompat methods" am: 418169d181 am: 3df9ed3852
Change-Id: I327a675c30f3fda48d1f8a3876612221c9352cb2
2020-01-28 12:22:58 +00:00
Andrei-Valentin Onea
3df9ed3852 Merge "Add permissions for using PlatformCompat methods"
am: 418169d181

Change-Id: I8a07cec1e1c14c2de5646eae64b5f092aa618a46
2020-01-28 04:11:01 -08:00
Andrei-Valentin Onea
418169d181 Merge "Add permissions for using PlatformCompat methods" 2020-01-28 12:04:43 +00:00
TreeHugger Robot
fa5f4c8a46 Merge "Remove invisible replaced recent task when going to home" 2020-01-28 06:52:36 +00:00
Rob Carr
2fd746a56c Merge "TaskOrganizer: Control Root Task" 2020-01-28 05:47:33 +00:00
TreeHugger Robot
e9ac228513 Merge "Move GnssManagerService to gnss package" 2020-01-28 01:09:39 +00:00
Robert Carr
9fd095baf3 TaskOrganizer: Control Root Task
Following Stacks becoming Tasks this seems to make more sense.

Bug: 147849315
Bug: 139371701
Test: TaskOrganizerTests
Change-Id: Idee35274d6ab4018b9bc4d43610fdb57db9d8956
2020-01-27 15:25:11 -08:00
Jovana Knezevic
873cc29e53 Merge "Switching to pre-created users should not be supported." 2020-01-27 20:59:22 +00:00
Soonil Nagarkar
f20d10ef8c Move GnssManagerService to gnss package
Test: presubmits
Change-Id: Ibda2aab8427e6160fdd2f925532750f8ad34411e
2020-01-27 12:15:28 -08:00
TreeHugger Robot
72c35c0885 Merge "Extend unit tests to cover InstallSource." 2020-01-27 20:00:22 +00:00
Mady Mellor
f44b68378c Bubble API: post update when bubble notification suppression flag changes
When bubbles are expanded or if the user dismisses the notification, the
notification associated with the bubble is suppressed from the shade, but
still technically active / in active notification list because of the
bubble.

We already have a concept of this with isNotificationSuppressed on
BubbleMetadata, this just ensures that the flag is properly updated when
the state changes in System UI. This allows other things showing
notifications (e.g. long press on launcher app icon -> see notifs) to
hide or show notifications consistently with the rest of system ui.

I'm re-using the flag that apps may set to suppress notifications when
they send a bubble that is foreground, since its the same concept.

When this flag state changes a new update is sent with the flag
adjusted.

Added a notification delegate method to communicate the suppression changes
back to NoMan. This is piped through a listener set on Bubble objects.

Test: atest NotificationManagerTest NotificationTest NotificationManagerServiceTest
Bug: 131926652
Bug: 144352570
Change-Id: I25e86849858cdfe2fb81ab51b1ff09980bf70944
2020-01-27 10:46:41 -08:00
Winson Chung
b53b30cd26 Update trace buffer to support SysUI & Launcher
- Move TraceBuffer to sysui-accessible package, and make it generic
  to support both lite and nano proto callers
- Expose shell command to start/stop sysui tracing

Bug: 144854916
Test: atest TraceBufferTest

Change-Id: Id117024d943f148a91631fd9fcae1fd70fca8ab5
2020-01-27 10:04:58 -08:00
TreeHugger Robot
dd95b13bae Merge "Stop ConnectivityController from processing non-network jobs." 2020-01-27 17:48:56 +00:00
Automerger Merge Worker
8bba5f4ece Merge "Update TestThread2 Stacktrace in align to OpenJDK 8u121-b13" am: 5360a52f6d am: a8e11be07f am: 390883751b
Change-Id: I35074f37b29f8c1987c01cdf5bff5d65ab6d5131
2020-01-27 17:32:22 +00:00
Automerger Merge Worker
390883751b Merge "Update TestThread2 Stacktrace in align to OpenJDK 8u121-b13" am: 5360a52f6d am: a8e11be07f
Change-Id: I96e5b25e62f350dec5865fe418b878bc1bc6b1c7
2020-01-27 17:20:54 +00:00
Naga Venkata Durga Ashok Mutyala
a8e11be07f Merge "Update TestThread2 Stacktrace in align to OpenJDK 8u121-b13"
am: 5360a52f6d

Change-Id: I07242d1c1af0a69e0529c02c9bec0ac3d943f506
2020-01-27 09:07:30 -08:00
TreeHugger Robot
992ba2ddd3 Merge "Resolve the issue that when there are no integrity rule files pushed, we do not evaluate the rules based on android manifest." 2020-01-27 15:59:37 +00:00
Treehugger Robot
5360a52f6d Merge "Update TestThread2 Stacktrace in align to OpenJDK 8u121-b13" 2020-01-27 15:56:57 +00:00
Omer Nebil Yaveroglu
d4c9af8d4f Resolve the issue that when there are no integrity rule files pushed, we
do not evaluate the rules based on android manifest.

Bug: 148267541
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/integrity
Change-Id: I1b0f0882ff68de75fdf9927de6aa6782df39b2ca
2020-01-27 14:34:15 +00:00
Alan Stokes
0f0b3e524e Extend unit tests to cover InstallSource.
We were testing installer package name, add the other InstallSource
fields. Add getter to facilitate test.

Test: atest PackageInstallerSessionTest
Bug: 137951074
Bug: 134746019
Change-Id: Ic7483e3a90978248f5384f78f548e1c839dc562a
2020-01-27 12:09:01 +00:00
Peter Wang
26d8cb3860 Remove WindowManager references in Stk
Bug: 65884891
Bug: 143536562
Change-Id: Iaeb07569534a501b66f381f68c6341270529231b
Fix: 143536562
Test: Build
2020-01-27 16:49:44 +08:00