Commit Graph

1745 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
95fa0c3ffd 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
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12225177

Change-Id: I8b331318c9893180ecae96ddfe0447a767faa759
2020-07-27 21:23:19 +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
4a454ebffb Merge "Add KEYCODE_WINDOW mapping to USB HID Usage consumer page (0x0c/0x67) "Picture-in-Picture Toggle"" am: 85a6580f09 am: aa0cee06b1 am: ab368be7ad am: 9a1b33f61f am: f34f7b6afb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365553

Change-Id: Icb6afd203bcea6139f0cf1f48cb064c3b0847869
2020-07-25 02:18:45 +00:00
Treehugger Robot
f34f7b6afb Merge "Add KEYCODE_WINDOW mapping to USB HID Usage consumer page (0x0c/0x67) "Picture-in-Picture Toggle"" am: 85a6580f09 am: aa0cee06b1 am: ab368be7ad am: 9a1b33f61f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365553

Change-Id: I777031db5e4468fccdbc7bf96e8b48fdd8a30fb0
2020-07-25 02:02:37 +00:00
Treehugger Robot
9a1b33f61f Merge "Add KEYCODE_WINDOW mapping to USB HID Usage consumer page (0x0c/0x67) "Picture-in-Picture Toggle"" am: 85a6580f09 am: aa0cee06b1 am: ab368be7ad
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365553

Change-Id: I68d4ba8f821a24219b02a026bffcb5676010ce84
2020-07-25 01:46:25 +00:00
Treehugger Robot
ab368be7ad Merge "Add KEYCODE_WINDOW mapping to USB HID Usage consumer page (0x0c/0x67) "Picture-in-Picture Toggle"" am: 85a6580f09 am: aa0cee06b1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365553

Change-Id: I2cc60fb80d146a2121d0c5cba79e83581f281816
2020-07-25 01:28:24 +00:00
TreeHugger Robot
490f35034e Merge "Remove references to system-user-whitelisted-app" 2020-07-24 16:37:04 +00:00
TreeHugger Robot
0b66db6ce3 Merge "Add support for Scuf Vantage game controller." 2020-07-23 18:31:05 +00:00
Fabian Kozynski
974eefa779 Merge changes from topic "permission_chip" into rvc-qpr-dev am: 9a85dc9c0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12130778

Change-Id: I9405dd5653d5ea99ba998ab30e211494aef5ce21
2020-07-23 14:06:06 +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
0368d814d6 Merge changes from topic "permission_hub_2_framework" into rvc-qpr-dev am: b7130b274c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12154741

Change-Id: Icdf461632e2104e05c5d3148ea4c0741ea4b1291
2020-07-22 06:38:50 +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
Treehugger Robot
b124998000 Merge "Add KEYCODE_CAPTIONS mapping to LKC KEY_SUBTITLE" am: 3e21dc8b70 am: 0796fa5254 am: 1c4d68f863 am: d8447c1fa6 am: 4ca19816c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365552

Change-Id: I3c4e3df716e14943f97df2192e3f5382d7caba19
2020-07-21 22:23:44 +00:00
Treehugger Robot
4ca19816c0 Merge "Add KEYCODE_CAPTIONS mapping to LKC KEY_SUBTITLE" am: 3e21dc8b70 am: 0796fa5254 am: 1c4d68f863 am: d8447c1fa6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365552

Change-Id: Ie1d8ec63a3672eada17843346805e7a3e4c7c531
2020-07-21 22:10:51 +00:00
Treehugger Robot
d8447c1fa6 Merge "Add KEYCODE_CAPTIONS mapping to LKC KEY_SUBTITLE" am: 3e21dc8b70 am: 0796fa5254 am: 1c4d68f863
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365552

Change-Id: I455e3070b6692cd45cf94053b2112c06b87eb2b0
2020-07-21 21:53:28 +00:00
Chris Ye
2ec605090e Add support for Scuf Vantage game controller.
Add Scuf Vantage controller keyboard layout mapping.

Bug: 155223457
Test: ControllerTest App, Connect Scuf Vantage controller and play game with it.
Change-Id: I21d23dcbeb4ef24d212d4e386f6dbf8b1b89d9f6
2020-07-21 14:47:16 -07:00
Treehugger Robot
1c4d68f863 Merge "Add KEYCODE_CAPTIONS mapping to LKC KEY_SUBTITLE" am: 3e21dc8b70 am: 0796fa5254
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365552

Change-Id: I85a1b1a2f43df5cf78abc902abb0633fd97bf469
2020-07-21 21:28:23 +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
Aman Gupta
7b48e40231 Add KEYCODE_WINDOW mapping to USB HID Usage consumer page (0x0c/0x67) "Picture-in-Picture Toggle"
cc https://www.usb.org/sites/default/files/ce_devices_0.pdf

Change-Id: Iac94535823fa0a97e1a926d28d6f7376c11b8bf0
Signed-off-by: Aman Gupta <aman@tmm1.net>
2020-07-21 12:12:40 -07:00
Aman Gupta
6c984953ea Add KEYCODE_CAPTIONS mapping to LKC KEY_SUBTITLE
From https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h,
KEY_SUBTITLE is near the TV codes. Note that 0x172 == 370.

  #define KEY_CHANNEL		0x16b
  #define KEY_FAVORITES		0x16c
  #define KEY_EPG			0x16d
  #define KEY_PVR			0x16e	/* Media Select Home */
  #define KEY_MHP			0x16f
  #define KEY_LANGUAGE		0x170
  #define KEY_TITLE		0x171
  #define KEY_SUBTITLE		0x172
  #define KEY_ANGLE		0x173
  #define KEY_FULL_SCREEN		0x174	/* AC View Toggle */
  #define KEY_ZOOM		KEY_FULL_SCREEN

You can also see on https://www.kernel.org/doc/html/v4.9/media/uapi/rc/rc-tables.html it is listed in the "Movie play control" section:

  KEY_SUBTITLE	Allow changing the subtitle

Change-Id: I7690269cddd00b787a939f87ba651db38f1160ac
Signed-off-by: Aman Gupta <aman@tmm1.net>
2020-07-21 12:09:52 -07:00
Treehugger Robot
13b11a0194 Merge "Add KEYCODE_LAST_CHANNEL mapping to LKC KEY_LAST" am: 1710dbd097 am: c3fb05c1db am: 5dd5e5c937 am: 32f405be5d am: 3553c60737
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365551

Change-Id: I86caa7e5f02705cfd8e4b342ec94a8dda5af0a6e
2020-07-21 16:57:15 +00:00
Treehugger Robot
3553c60737 Merge "Add KEYCODE_LAST_CHANNEL mapping to LKC KEY_LAST" am: 1710dbd097 am: c3fb05c1db am: 5dd5e5c937 am: 32f405be5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365551

Change-Id: I74b751de02f78d9ec6801f5a1e0ba352d0ee005f
2020-07-21 16:28:11 +00:00
Treehugger Robot
32f405be5d Merge "Add KEYCODE_LAST_CHANNEL mapping to LKC KEY_LAST" am: 1710dbd097 am: c3fb05c1db am: 5dd5e5c937
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365551

Change-Id: Ib38af6404d351410af3c66e5c4bef97bc8f3cef3
2020-07-21 16:08:11 +00:00
Treehugger Robot
5dd5e5c937 Merge "Add KEYCODE_LAST_CHANNEL mapping to LKC KEY_LAST" am: 1710dbd097 am: c3fb05c1db
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365551

Change-Id: I6da0050ca6e1cf3907d4e19fefa391da1816641a
2020-07-21 15:56:11 +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
TreeHugger Robot
f277044b70 Merge "frameworks/base: fix Logitech Dual Action gamepad" 2020-07-17 20:05:54 +00:00
TreeHugger Robot
b210bbbe3f Merge "frameworks/base: Add Elecom gamepad support" 2020-07-17 18:31:44 +00: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
2f457b142d Add CAR_DRIVING_STATE and CAR_CONTROL_AUDIO_VOLUME permissions to run am: 39ba8c9cc3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142737

Change-Id: Iac1d2e3f7e4d0dbf93eaa86bfe4ccc7e26397be5
2020-07-17 17:53:03 +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
11f538f963 Merge "Add HANDLE_CAR_MODE_CHANGED permission" into rvc-d1-dev am: 2047572941
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12173845

Change-Id: Id90b846a504d7160bf24cf0bb058fde2c0be0596
2020-07-17 17:45:27 +00:00
Aman Gupta
48a06806f1 Add KEYCODE_LAST_CHANNEL mapping to LKC KEY_LAST
Change-Id: Idcf987c6e5541e29cac1b8a89263580bfcdc9636
Signed-off-by: Aman Gupta <aman@tmm1.net>
2020-07-16 18:27:02 -07: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
Chris Ye
a82529e6a0 Add support for Razer Junglecat game controller.
Add Razer Raiju Junglecat controller keyboard layout mapping.

Bug: 140958486
Test: Connect Razer Junglecat controller and play game with it.
Change-Id: I9f6d36db6b4b4dc024bc65af8c28ba19a997b029
2020-07-15 21:28:21 -07:00
TreeHugger Robot
98065fb667 Merge "Add support for Razer Kishi game controller." 2020-07-15 18:21:15 +00:00
Chris Ye
5230993c35 Add support for Razer Kishi game controller.
Add Razer Raiju Kishi controller keyboard layout mapping.

Bug: 140958486
Test: Connect Razer Kishi controller and play game with it.
Change-Id: I6f94e212fe10f777f04ad9815468e2148d4252f5
2020-07-15 09:20:53 -07:00
TreeHugger Robot
f8b7780623 Merge "Update permissions whitelist for calendar provider." 2020-07-15 06:05:49 +00:00
Ricardo Quesada
b929ac7647 frameworks/base: Add Elecom gamepad support
This CL adds support for the Elecom JC-U4113S gamepad.
Both when it is in X mode as well in D mode.

Bug: 160266876
Test: Manually tested. Launched "Gamepad Tester" APK.
      Verified the mappings both in D mode and X mode were correct.
Change-Id: I5f3f7e86e21fa05b9e2fed9b5a857d04a9d556e6
(cherry picked from commit a68571fe5d4e24a1aae60bf68eac7be0f34d6593)
2020-07-13 12:31:34 -07:00
Ricardo Quesada
cbb392fa69 frameworks/base: fix Logitech Dual Action gamepad
This CL fixes mappings in Logitech Dual Action gamepad:

- Swaps mappings of: A,B <--> X,Y
- Back was the old "Select" button.

Bug: 160637093
Bug: 27778061
Test: Manually tested by launching "Gamepad Tester" APK.
      Verified that A,B,X,Y and Back works as expected.
Change-Id: Ic3075e274794cc38104a23db2c08513b7a1c3992
(cherry picked from commit 7601d457b6c56d983311227ff6b974b9fe3eec6d)
2020-07-13 16:55:28 +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
4051ee024f Merge "Add support for Razer Raiju Tournament Edition Controller." 2020-07-07 23:03:31 +00:00