832 Commits

Author SHA1 Message Date
Agatha Man
021baba49e Merge "Add CAR_DIAGNOSTICS, CLEAR_CAR_DIAGNOSTICS, CONTROL_APP_BLOCKING, and CAR_UX_RESTRICTIONS_CONFIGURATION permissions to run ATS tests" into rvc-qpr-dev am: 77d8407cb0 am: 95fa0c3ffd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12225177

Change-Id: I2dfd6398ea992ea9ebce203efc45ae1693711a6a
2020-07-27 21:40:03 +00:00
Agatha Man
77d8407cb0 Merge "Add CAR_DIAGNOSTICS, CLEAR_CAR_DIAGNOSTICS, CONTROL_APP_BLOCKING, and CAR_UX_RESTRICTIONS_CONFIGURATION permissions to run ATS tests" into rvc-qpr-dev 2020-07-27 21:09:41 +00:00
Agatha Man
5c17bba24d Add CAR_DIAGNOSTICS, CLEAR_CAR_DIAGNOSTICS, CONTROL_APP_BLOCKING,
and CAR_UX_RESTRICTIONS_CONFIGURATION permissions to run ATS tests

CarDeviceInfo requires CAR_DIAGNOSTICS, CLEAR_CAR_DIAGNOSTICS.
AtsCarHostTestCases requires CONTROL_APP_BLOCKING and
CAR_UX_RESTRICTIONS_CONFIGURATION.

Note: This change allows anyone with a usb cable to write an app
to call the protected APIs in her/his car.

Bug: 162120802
Test: make
Change-Id: I9d0e1266389170cca3624522820457e826bbc613
2020-07-27 21:03:15 +00:00
TreeHugger Robot
490f35034e Merge "Remove references to system-user-whitelisted-app" 2020-07-24 16:37:04 +00:00
Fabian Kozynski
9a85dc9c0a Merge changes from topic "permission_chip" into rvc-qpr-dev
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-23 13:45:26 +00:00
TreeHugger Robot
dd349767cb Merge changes from topic "privacy_chip_master"
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-22 20:03:10 +00:00
Fabian Kozynski
fe4b8c2627 Restricts notified app ops based on flags
AppOps that are received by SystemUI and notified to listeners of
AppOpsControllerImpl are filtered based on the permission flag
PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED.

As calls to obtain this flag require an IPC, three things are done to
mitigate impact:
* PermissionFlagsCache keeps track of requested flags and will update
those (in a background thread), when a change is notified for a given
uid.
* Calls to getActiveAppOps/getActiveAppOpsForUser should be made from a
background thread.
* notifySubscribers is always called in the background thread.

Bug: 160966908
Test: atest PermissionFlagsCacheTest AppOpsControllerTest
Change-Id: I871094c32ce5ec940d779626333caa0ca500a4e3
2020-07-22 10:34:52 -04:00
TreeHugger Robot
4fa0ad96aa Merge changes from topic "permission_hub_2_framework" into rvc-qpr-dev am: b7130b274c am: 0368d814d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12154741

Change-Id: I1cb81531654913188fb10566a60d1880c2374e9c
2020-07-22 06:51:43 +00:00
TreeHugger Robot
b7130b274c Merge changes from topic "permission_hub_2_framework" into rvc-qpr-dev
* changes:
  Give Permission Controller the ability to see all accounts.
  Allow perm controller to read historical app-op data
2020-07-22 06:21:01 +00:00
Adam Bookatz
dc33904acb Remove references to system-user-whitelisted-app
The two SysConfig xml tags
system-user-whitelisted-app
system-user-blacklisted-app
are deprecated and were never used.

Bug: 139547572
Bug: 137101239
Test: compiles
Change-Id: I0a5a8cb9b178a3742ddc1fe70b9ee1e2737abdba
2020-07-21 23:35:04 +00:00
Philip P. Moltmann
9abf24f032 Give Permission Controller the ability to see all accounts.
Bug: 161007415
Change-Id: I912cbfdc9a1881a0e9a1755848147cdf23781885
2020-07-21 20:38:37 +00:00
Yan Zhu
0eae0b2abc Merge "Update preinstalled-packages-platform-overlays.xml" 2020-07-20 23:51:36 +00:00
Fabian Kozynski
fd89d72b13 Restricts notified app ops based on flags
AppOps that are received by SystemUI and notified to listeners of
AppOpsControllerImpl are filtered based on the permission flag
PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED.

As calls to obtain this flag require an IPC, three things are done to
mitigate impact:
* PermissionFlagsCache keeps track of requested flags and will update
those (in a background thread), when a change is notified for a given
uid.
* Calls to getActiveAppOps/getActiveAppOpsForUser should be made from a
background thread.
* notifySubscribers is always called in the background thread.

Bug: 160966908
Test: atest PermissionFlagsCacheTest AppOpsControllerTest
Change-Id: I871094c32ce5ec940d779626333caa0ca500a4e3
Merged-In: I871094c32ce5ec940d779626333caa0ca500a4e3
2020-07-20 16:02:19 -04:00
Yan Zhu
5fb9e17a8d Update preinstalled-packages-platform-overlays.xml
Remove PROFILE and sort the packages

Test: manual:
1. adb shell dumpsys user
2. adb shell cmd user report-system-user-package-whitelist-problems

Change-Id: Ifec176ca2d5c17a8bcd19609dc0581e1fae8c2dc
2020-07-17 16:48:48 -07:00
Agatha Man
7be384568b Add CAR_DRIVING_STATE and CAR_CONTROL_AUDIO_VOLUME permissions to run am: 39ba8c9cc3 am: 2f457b142d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142737

Change-Id: Ib70d1bf25b6c31b5ee8d62914fe94d89f93f391f
2020-07-17 17:57:58 +00:00
Sarah Chin
ade13e579e Merge "Add HANDLE_CAR_MODE_CHANGED permission" into rvc-d1-dev am: 2047572941 am: 11f538f963 am: f06114b01d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12173845

Change-Id: I9187f58adfbb280a6674633dbf197f12870bb59c
2020-07-17 17:57:13 +00:00
Agatha Man
39ba8c9cc3 Add CAR_DRIVING_STATE and CAR_CONTROL_AUDIO_VOLUME permissions to run
ATS tests

AtsCarHostTestCases and AtsCarDeviceApp requires CAR_DRIVING_STATE.
AtsDeviceInfo and AtsAudioDeviceTestCases requires
CAR_CONTROL_AUDIO_VOLUME.

Bug: 161193447
Test: m -j && run ats tests
Change-Id: Ib16c6c5e54b489479c872cfa826b055262b797bb
2020-07-17 17:48:36 +00:00
Sarah Chin
c363a3a148 Add HANDLE_CAR_MODE_CHANGED permission
Required to allow DeviceStateMonitor to monitor changes in car mode to
get an accurate state of when all screens are on/off.

Test: build
Bug: 160898432
Change-Id: If3ad86a2564ce3ba53afea44e8ad5bf02b8d51e0
2020-07-16 21:50:38 +00:00
TreeHugger Robot
f8b7780623 Merge "Update permissions whitelist for calendar provider." 2020-07-15 06:05:49 +00:00
Yan Zhu
49a86b728a Update preinstalled-packages-platform-overlays.xml for overlay packages
Enable more overlay packages.

Bug: 159826397
Test: manual:
1. adb shell dumpsys user
2. adb shell cmd user report-system-user-package-whitelist-problems

Change-Id: I202fbc096ed92ea81c928e76002f5c1fda7c7d4b
2020-07-12 17:00:13 -07:00
TreeHugger Robot
50ce80b847 Merge "Deliver hideInsets when target is removed" into rvc-dev am: bb6c1e09ad am: 553b71a5b2 am: e15666d78c am: f793e73aff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12011265

Change-Id: I4b0d2200bda43891b55853ed2d1a11bf975cb93f
2020-07-01 17:27:10 +00:00
Taran Singh
4545703367 Deliver hideInsets when target is removed
hideInsets(IME) may not be delivered to the control target if
the window requesting hide is no longer available in WindowManager's
window map. However, it is still nicer to deliver it to the default
display's control target rather than not delivering it at all.
Fix: 159623277
Test: Manually using steps in bug.

Change-Id: I22cdf20627da2183d30af444f6dd9d0375d417c1
2020-06-30 10:02:10 -07:00
TreeHugger Robot
a062d8b766 Merge "Wait for remote animation to stop freezing display" into rvc-dev am: 0207dba4b6 am: a0ba1c6f27 am: e0b7712c6e am: f38d02f15b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034123

Change-Id: I81a81a44a0926ca403996a55a9db2b1c4590d179
2020-06-30 04:22:55 +00:00
TreeHugger Robot
0207dba4b6 Merge "Wait for remote animation to stop freezing display" into rvc-dev 2020-06-30 03:29:46 +00:00
Joshua Duong
2efd751980 Merge changes from topic "adbwifi-cts" into rvc-dev am: 5ab3aa0c7b am: af1f67ebd4 am: b497b40119 am: ee288b5c36
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000446

Change-Id: I938c0abdf21c197f19f7b89cf8388a86827d615e
2020-06-30 02:03:45 +00:00
Joshua Duong
5ab3aa0c7b Merge changes from topic "adbwifi-cts" into rvc-dev
* changes:
  Add shell commands for AdbService.
  Add shell permissions for CTS test (AdbManagerTest).
2020-06-30 00:55:36 +00:00
Riddle Hsu
96ed092b10 Wait for remote animation to stop freezing display
If display is rotated 180 degree, the display might not have
configuration change. And if there is remote rotation and it hasn't
done, the rotation of display is still the old one. Once there is
a path calls stop-freezing-display, the rotation animation will be
executed directly with 0 degree delta. And if the activity needs to
relaunch, there will be obvious flickering.

Fixes: 160107205
Test: atest DisplayContentTests#testRemoteRotation
Change-Id: I66a02b67f7066abafd65c2c282144222701feaae
2020-06-30 01:28:35 +08:00
Rajeev Kumar
d7006245be Merge "Add privapp permissions permission for com.android.cellbroadcastreceiver package." into rvc-dev am: 0c059b97dd am: 68894b7c9f am: 01351c2272 am: 171ff002b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12011267

Change-Id: I0fc93a81a530939a5b22caf66644fa9f8421cc11
2020-06-27 03:05:15 +00:00
Rajeev Kumar
8fe5465ada Add privapp permissions permission for
com.android.cellbroadcastreceiver package.

Bug: 159544147
Fixes: 159544147
Test: Built a system image with this change and flashed
a device with it and the device booted successfully.

Change-Id: I7fd5080aa740fcfcebeb4f934d0a3fc39d847cc9
2020-06-26 19:26:31 +00:00
Varun Shah
f952e66c1d Update permissions whitelist for calendar provider.
Also allow compat changes in calendar provider to be detected.

Bug: 143231523
Test: atest CalendarProvider2Test
Change-Id: I19caac418223723bb4c7001e12e4311a231f937a
2020-06-26 11:23:05 -07:00
Joshua Duong
f2e03b393f Add shell permissions for CTS test (AdbManagerTest).
Bug: 159936209

Test: atest CtsAdbManagerTests
Change-Id: I896b53df582cceb7d1b0d6694d00064b0fb57b94
2020-06-25 15:03:19 -07:00
Shafik Nassar
025a4b4edd Merge "Allow MediaProvider to request REGISTER_STATS_PULL_ATOM" into rvc-dev am: f59cdcf6dc am: 854c557ca4 am: 5a11ff404c am: 0b8548ad0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11880479

Change-Id: Iac1299004ed8d7ceaf63b3d1b5392ace3cd7aeb4
2020-06-18 13:22:53 +00:00
Shafik Nassar
f59cdcf6dc Merge "Allow MediaProvider to request REGISTER_STATS_PULL_ATOM" into rvc-dev 2020-06-18 12:25:55 +00:00
Enrico Granata
c328048dda Merge "Move car companion device support app perms to framework" into rvc-dev am: 561b09994b am: a2a7b8909b am: e2651f9cb5 am: c83b1a43f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11853982

Change-Id: I3c269858a5476123cbe7e8a73dfd4faedf75d741
2020-06-17 21:03:50 +00:00
shafik
44f3ca5679 Allow MediaProvider to request REGISTER_STATS_PULL_ATOM
MediaProvider needs the permission to register a StatsPullCallback in
statsd to pull the external storage metrics.

Test: build
Bug: 149669087
Change-Id: I4f7e09c2e514e2290d1cd5ac765bb115e7ade9ef
2020-06-17 11:34:01 +01:00
Hao Chen
8de2ca3e5c Move car companion device support app perms to framework
Test: build and flash the trout PDK, boot to the UI
Bug: 158483244
Change-Id: Ic8cd135cde2d616e5a8d36b71de56acba4dab261
2020-06-16 21:30:12 +00:00
Yan Zhu
b821d34df8 Merge "Install auto-generrate overlay packages even when not included in whitelist" into rvc-dev am: b6ac0061fa am: 17d5ac8048 am: d4f5525efa am: 062c6f2251
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11529815

Change-Id: I6ca3114e1e255d2aaa606148ed7769c47061a8b0
2020-06-10 05:13:46 +00:00
Yan Zhu
b6ac0061fa Merge "Install auto-generrate overlay packages even when not included in whitelist" into rvc-dev 2020-06-10 04:23:30 +00:00
TreeHugger Robot
adbb2aa200 Merge "Move car bugreport app perms to framework." into rvc-dev am: 94bedc9aec am: 5523cc5b9e am: dee5790847 am: a7c723e074
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784244

Change-Id: I00143bd42bcc28c33f179e5c0b7101e0611d69fd
2020-06-09 02:09:20 +00:00
Yan Zhu
31b01e4bc5 Install auto-generrate overlay packages even when not included in whitelist
Detect auto-generated overlay packages according to the suffix
(.auto_generated_rro_vendor_ OR .auto_generated_rro_product_)

Bug: 156668533
Bug: 140120696
Test: logcat: set DEBUG=true
adb logcat UserManagerService | grep overlay
atest
FrameworksServicesTests:com.android.server.pm.UserSystemPackageInstallerTest
-c

Change-Id: I1835eb923bf2421b2e171be0ac0fa400b6fd38f7
2020-06-08 16:34:34 -07:00
Zhomart Mukhamejanov
9fd6408edd Move car bugreport app perms to framework.
Change-Id: I5e541138c35cdf67d18ce5475221baeb3e7faef4
Test: emulator
Bug: 158151004
2020-06-07 18:04:19 -07:00
TreeHugger Robot
873b73dfa8 Merge "Adding incremental related peremissions to Shell" into rvc-dev am: d1f5bf1f93 am: 99664b235a am: bd70112ceb am: 6b669be4a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11722415

Change-Id: Ida559e0a8a79f0ab24248c5b46391433a8a9b2a9
2020-06-04 23:19:10 +00:00
Dimuthu Gamage
8589197fb5 Adding incremental related peremissions to Shell
This is expected to be used with adoptShellPermission in the Incremental
CTS tests.

Test: atest android.content.pm.cts.PackageManagerShellCommandTest
(There will be future tests relying on this)

Bug: 158024822
Change-Id: I46674498783c5323668ff775c76ff31a304aeadb
2020-06-04 17:04:44 +00:00
Sung Min Lee
3d3f0b483e Merge "Add CAPTURE_AUDIO_OUTPUT permission required for GTS test" into rvc-dev am: 5bafce8420 am: 0bb87d4503 am: 470e761379 am: 25ac0879cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11712625

Change-Id: Ia01b30b4316fec313aa4b03636b7124d31fcd588
2020-06-04 01:56:08 +00:00
Sung Min Lee
a90b1fcaca Add CAPTURE_AUDIO_OUTPUT permission required for GTS test
GtsDialerAudioTestCases require this privileged permission for testing in GTS.

Bug: 157243201
Test: run gts -m GtsDialerAudioTestCases
Change-Id: I32516e5dcf966b05cfb8ab4956a0cdb183298f2a
2020-06-02 21:24:59 -07:00
Automerger Merge Worker
963efc5f1b Merge "Merge "Whitelist READ_PRIVILEGED_PHONE_STATE permission needed by Build.getSerial()." into rvc-dev am: 3420744449 am: 9c50a0fd93 am: 1006f2cb9c" into rvc-qpr-dev-plus-aosp am: e9bd126e7b
Change-Id: I93b3a554ccddf67a7a31da950b5034152f58091a
2020-05-29 17:41:56 +00:00
Mina Granic
3420744449 Merge "Whitelist READ_PRIVILEGED_PHONE_STATE permission needed by Build.getSerial()." into rvc-dev 2020-05-29 16:43:43 +00:00
TreeHugger Robot
a5334e7074 Merge "Create OneHandedModeGesturalOverlay for navigation_bar_gesture_height" 2020-05-29 09:11:29 +00:00
Bill Lin
daa9a40714 Create OneHandedModeGesturalOverlay for navigation_bar_gesture_height
When one handed mode enabled, override navigation_bar_gesture_height
with larger region to get better UX on gesture

Test: atest com.android.systemui.onehanded
Test: adb shell cmd overlay list, check overlay package state
      enabled : [x] com.android.internal.systemui.onehanded.gestural
      disabled :[ ] com.android.internal.systemui.onehanded.gestural
Bug: 157103757
Change-Id: Id50cdb69e07fa344a142105cd7b85494d9d1a706
2020-05-29 14:37:26 +08:00
TreeHugger Robot
7d62e01833 Merge "Add debug logs for waiting on window draw at device boot" 2020-05-28 21:50:46 +00:00