Commit Graph

1802 Commits

Author SHA1 Message Date
Philip P. Moltmann
fa24a327ab Merge changes from topic "PermAppOpsCrossUserCheck-Fixed"
* changes:
  Invalidate package/permission cache if cross-profile app is is changed
  Check cross-user interactions for permissions and app-ops operations
  Give all non-package services the power to interact accross users
2020-09-20 03:22:25 +00:00
TreeHugger Robot
722add884a Merge "Update Armenian fonts to a variable format" 2020-09-19 01:32:05 +00:00
Chris Ye
2004bc75ee Add support for Gamevice GV186 gamepad.
Add support for Gamevice GV186 gamepad, for joystick axes and
buttons mapping.

Test: atest GameviceGv186Test
Bug: 142591969
Change-Id: Id025f5fcd3d831ecd8a2842d5c5d7e05eb5b00c9
2020-09-18 17:08:29 +00:00
Paul Hu
9dab7e953e Merge "Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to DownloadProvider" into rvc-qpr-dev am: 8b9d40586b am: aed20efa42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12533920

Change-Id: Iff7cbae55a18e8e1c8072f2aa6c3c6b4db943d57
2020-09-18 04:06:20 +00:00
Paul Hu
aed20efa42 Merge "Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to DownloadProvider" into rvc-qpr-dev am: 8b9d40586b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12533920

Change-Id: I1d881a0c74870c700597e3ef3280ba349640591e
2020-09-17 16:26:52 +00:00
Julia Kawano
f342e054af Merge "Grant launcher control incall permission" 2020-09-16 17:34:57 +00:00
Vishnu Nair
02a5b03909 Merge "Add focus support for SurfaceControlViewHost" 2020-09-16 15:26:26 +00:00
Marek Z Jeziorek
f12499bb33 Update Armenian fonts to a variable format
Bug: 168657713

Test: All tests below are manual.
Test: 0. Open a reference device with an existing set of fonts
Test: 1. Upload new fonts.xml and the new fonts to a test device
Test: 2. Change language to Armenian on both devices (look for Հայերեն
or similar)
Test: 3. Open settings on both devices and visually compare them (they
should be the same)
Test: 4. Open the following pages on the test device (and on a reference
device):
Test:  https://en.wikipedia.org/wiki/Armenian_(Unicode_block)
Test:  https://unicode.org/udhr/d/udhr_hye.html
Test:
https://hy.wikipedia.org/wiki/%D5%80%D5%A1%D5%B5%D5%A5%D6%80%D5%A5%D5%B6
Test:  ... and visually compare them (they should be the same)

Change-Id: I440fd11bd219672b67e6aee37f9f192eeb722099
2020-09-16 00:02:14 +00:00
Vishnu Nair
204c023ae2 Add focus support for SurfaceControlViewHost
This change introduces a new call for clients to request focus on their
embedded views. In order to accomplish this, the owner of the
SurfacePackage sends an input token that can identify the input channel
of the embedded window. This token is forwarded as part of the focus
request.

WindowManager will authenticate the calling window and the relationship
between the host and the embedded window. Once authenticated, the
request will be forwarded to InputDispatcher. InputDispatcher will grant
the focus to the SurfaceControlViewHost if the host window is currently
focused or transfer focus back to the host window if the
SurfaceControlViewHost is focused. Otherwise the request is dropped.

In addition, SurfaceView, the host in this scenario, now overrides the
onFocused function to transfer focus to and from the embedded view.

Test: atest SurfaceControlViewHostTests
Bug: 151179149

Change-Id: Ia95545a60d73db4c03679bce9747d2e275806838
2020-09-15 14:48:13 -07:00
Philip Junker
c14b6b52ff Merge "Support for notification panel key on ATV" 2020-09-15 07:19:05 +00:00
Philip Junker
df3d59bfab Support for notification panel key on ATV
Add activity intents to open and toggle notification panel (requires
STATUS_BAR_SERVICE permission).
Add protected broadcast intent to close notification panel.
Make long-press-on-home configurable to open notification panel.
Create TvNotificationPanel class which forwards notification panel
requests to the configured handler.

Bug: 158661029
Test: manually tested on ATV device with adapted launcher
Change-Id: I555bb3801ac949c8985692b41b02323c56332ccd
2020-09-14 11:59:44 +02:00
Philip P. Moltmann
5f9b30a11a Give all non-package services the power to interact accross users
Test: ManagedProfileTest#testCameraPolicy
Bug: 153996875
Change-Id: Ie8f0db231a29abc8f478cd519fc661c8fccaa1b7
2020-09-11 19:21:47 -07:00
Alex Stetson
5785f0cfbd Merge "Add CATEGORY_CAR notification restrictions" 2020-09-09 21:44:36 +00:00
paulhu
41c59babd5 Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to DownloadProvider
- DownloadManager will use the requestor app's default network to
open a connection. When the VPN app lists the DownloadProvider as
a disallowed application, this will fail with EPERM.
- This is because in R, the DownloadProvider lost its privileges
due to the removal of the CONNECTIVITY_INTERNAL permission. It's
removed without considering the corner case where the
DownloadProvider is excluded from using the VPN. It's the only
case where this makes a difference.
- Adding CONNECTIVITY_USE_RESTRICTED_NETWORKS will give
DownloadProvider the ability to use the VPN again in this case,
fixing the issue.

Bug: 165774987
Test: Build, flash rom and boot to home. Manully test that
      DownloadProvider can download file via VPN.
Change-Id: If8fa785568ace1f15f53daec67c06e1207d5dc9c
2020-09-08 11:19:01 +08:00
Vishnu Nair
3e5d102ef6 Request focus using setFocusedWindow
This change introduces two new SurfaceControl apis, one to request focus
to a particular window and the other to transfer focus to an embedded
window if the host window is currently focused.

WindowHandleInfo is updated to specify focusability instead of the
currently focused window. This will provide more information to
InputDipatcher on what all the focusable windows are on screen and
in the future allow it to determine a new focus target.

Lastly, after updating all the WindowHandles in InputMonitor, we switch
over to calling setFocusedWindow to specify the desired focused window.
There should be no functional changes with this cl.

Test: atest inputflinger_tests
Test: atest CtsWindowManagerDeviceTestCases
Test: atest FlickerTests

Bug: 151179149
Change-Id: Iefda51ce73247b208115e64f9f8159a182d93ded
2020-09-02 16:13:13 -07:00
Julia Kawano
64e53fe435 Grant launcher control incall permission
Launcher V2 adds a dialer widget, which requires the system permission
CONTROL_INCALL_EXPERIENCE. Permission is needed for the InCallController to bind to the launcher's InCallService, which allows the launcher to be notified about call activity.

Bug: 162955474
Test: manual - built on flame_car
Change-Id: I6426b044df90928e981941c8703ddd975dfa6f99
2020-09-01 18:27:32 +00:00
arthurhung
d14c02df91 Add Caps-Shift to lowercase letter mapping
Return lowercase letter if both caps/shift are on.

Bug: 79958081
Test: manual with physical keyboard
Change-Id: I91066c3403b3c61008747adac644b4ef2ce4aa93
2020-09-01 17:55:44 +08:00
Vishnu Nair
904ea67724 Misc clean up before requesting focus via setFocusedWindow api
Replace focus changed callback to use the callback from InputDispatcher.
Currently the system posts a message and informs accessibility services,
window focus observers and window change listeners. With the exception
of accessibility service (which requires to be notified before the
client gets notified), the other callbacks should be synchronized with
the callback from InputDispatcher.

This change also cleans up null checks for ActivityRecord#appToken
since it cannot be null.

Test: presubmit
Bug: 151179149
Change-Id: Id79553835048c090505589d62dee9cb8f38f23ff
2020-08-26 10:30:39 -07:00
Winson Chung
b754f5281b Add some protologs for window organizers & shell
- Refactor out base protolog impl so that shell can have it's own
  implementation which takes a different viewer config (from the resources
  directly instead of a separate file in /system/etc)
- Setup the protolog transform for shell classes
- Add some basic protologs for displayarea/task organizer controller
  & shell task org (for now only text logging)

Bug: 161980327
Test: adb shell wm logging enable-text WM_DEBUG_WINDOW_ORGANIZER
Test: adb shell dumpsys activity service SystemUIService WMShell enable-text-logging WM_SHELL_TASK_ORG
Test: atest ProtoLogImplTest \
            ProtoLogViewerConfigReaderTest \
            WmTests:ProtoLogIntegrationTest \
            LogDataTypeTest \
            protologtool-tests
Change-Id: I4c3fd6aaea04987c26ac56e9baf9fc8ab75a3f34
Signed-off-by: Winson Chung <winsonc@google.com>
2020-08-25 10:07:55 -07:00
Alex Stetson
4a13e88b83 Add CATEGORY_CAR notification restrictions
Add permission for restricting the use of CATEGORY_CAR notifications
rather than restricting to system calls.

Bug: 159459663
Test: manual, atest
NotificationManagerServiceTest#testEnqueuedRestrictedNotifications*

Change-Id: I6e8a32fec1469f5e0cbc8aa0cb765e5c04069546
2020-08-24 14:28:18 -07:00
Diego Vela
f58acf9e39 Convert logs to use protologs.
Migrate add remove debug log from debug config to protolog.
Migrate configuration debug log from debug config to protolog.
Update protolog file

Bug: 153162675
Test: manual
Change-Id: Ie97f77ce3fe165a9be2ff970da7e777962b0db31
2020-08-21 18:51:32 +00:00
Yan Zhu
bcae40d94b Move floatingcardslauncher code out of AOSP
Bug: 165034482
Test: build and flash
Change-Id: I7f5445f56deb432a41b497180f1a5285c0633ad7
2020-08-17 18:30:44 -07:00
Yan Zhu
abc6944b9a Merge "Update language to comply with Android's inclusive language guidance." 2020-08-17 20:39:52 +00:00
Fabian Kozynski
5d434a4a05 Merge "Add MODIFY_AUDIO_ROUTING permission to systemui" into rvc-qpr-dev am: d951edaa48 am: a7149e7a53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12378082

Change-Id: Id9c81ccd72c10fa12b3972f466c6684fcf13c9ec
2020-08-17 19:13:17 +00:00
Fabian Kozynski
a7149e7a53 Merge "Add MODIFY_AUDIO_ROUTING permission to systemui" into rvc-qpr-dev am: d951edaa48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12378082

Change-Id: I2d29f6eec37ad75c83fd8e96351061116929a54a
2020-08-17 19:01:48 +00:00
Fabian Kozynski
d951edaa48 Merge "Add MODIFY_AUDIO_ROUTING permission to systemui" into rvc-qpr-dev 2020-08-17 18:40:14 +00:00
Yan Zhu
1cbe7726b0 Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for

Bug: 162864134
Test: build and flash
Change-Id: Ia3febc38cfe55017aecc5e74e81b1bce0d70ceec
2020-08-14 20:40:23 +00:00
Agatha Man
443decbb58 Merge "Remove car permissions from common shell package" into rvc-qpr-dev am: d029933aa5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12330563

Change-Id: I559c3cd33280083f88f4d9f7f2324153e49527ce
2020-08-14 18:51:55 +00:00
Agatha Man
39bcfc7c83 Remove car permissions from common shell package
Removing car permissions that were added into common shell so that they
can be re-evaulated to include into CarShell. Adding car permissions to
shell should be reviewed by car frameworks team to determine what can be
allowed to the end-user and in terms of car safety.

Bug: 160339243
Test: make then check permission for shell user with adb shell pm dump
com.android.shell

Change-Id: I5a3b2086f605ba31f4231ec425cb2cb7c51ea7e6
(cherry picked from commit 89e5cfe9d8)
Merged-In: I5a3b2086f605ba31f4231ec425cb2cb7c51ea7e6
2020-08-14 18:44:14 +00:00
Fabian Kozynski
5f617413aa Add MODIFY_AUDIO_ROUTING permission to systemui
Adds the privileged permission for AppOpsControllerImpl.

Test: build and record
Fixes: 164213112
Change-Id: Ib23749542bb41eb1df2fb7cfe62db57fba73d0cf
2020-08-14 11:40:29 -04:00
Treehugger Robot
28e91a4c38 Merge "Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents" am: 4ec7604b48 am: ab5d157062 am: 2db2e500ee am: c7b8432e5a am: ff5bde9751
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388616

Change-Id: I6bb98e89c5e32a42d81e5e4e63746edd3fc4788c
2020-08-07 18:07:15 +00:00
Treehugger Robot
ff5bde9751 Merge "Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents" am: 4ec7604b48 am: ab5d157062 am: 2db2e500ee am: c7b8432e5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388616

Change-Id: I82e0b5bd6030b1ca0833bfbe7a684747370ca633
2020-08-07 17:49:44 +00:00
Treehugger Robot
c7b8432e5a Merge "Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents" am: 4ec7604b48 am: ab5d157062 am: 2db2e500ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388616

Change-Id: I21b9567bf11eda9a678f4b6e2549d8297f395bd9
2020-08-07 17:33:04 +00:00
Treehugger Robot
2db2e500ee Merge "Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents" am: 4ec7604b48 am: ab5d157062
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1388616

Change-Id: I31d939fbb443e76fc912dfe663d0b5a060ecba22
2020-08-07 17:31:17 +00:00
Treehugger Robot
4ec7604b48 Merge "Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents" 2020-08-07 16:54:11 +00:00
TreeHugger Robot
525571fa77 Merge "Allow permission controller to read audio configuration" into rvc-qpr-dev am: b7e594e9f1 am: 1410b4a395
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308439

Change-Id: I2d0d169dd892081ff22edb5bd90219f47ff66321
2020-08-06 23:52:36 +00:00
TreeHugger Robot
1410b4a395 Merge "Allow permission controller to read audio configuration" into rvc-qpr-dev am: b7e594e9f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308439

Change-Id: I86aecf16784baf432aecd60f3a35f818d8ad9734
2020-08-06 23:50:59 +00:00
Aman Gupta
7395b0a265 Add KEYCODE_PROG_{BLUE,RED,GREEN,YELLOW} mappings to LKC equivalents
My goal is to allow colored keys on HDMI-CEC and Bluetooth remotes to be used by an Android TV app.

The USB HID spec [1] and CEC spec [2] both define distinct codes for these keys.

The kernel converts both the HID [4] and CEC [5] codes to standard LKC codes [6]:

  #define KEY_RED		0x18e
  #define KEY_GREEN		0x18f
  #define KEY_YELLOW	0x190
  #define KEY_BLUE		0x191

Android also defines KEYCODE_PROG_ constants for these keys in KeyEvent.java [3]. This commit maps these LKC codes starting at 0x18e (i.e 398) to the existing KeyEvent equivalents.

[1] https://www.usb.org/sites/default/files/color_buttons_0.pdf
[2] https://github.com/floe/CEC/raw/master/extras/CEC_Specs.pdf
[3] https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/view/KeyEvent.java#L539-L550
[4] https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c#L897-L900
[5] https://github.com/torvalds/linux/blob/master/drivers/media/rc/keymaps/rc-cec.c#L142-L145
[6] https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L470-L473

Signed-off-by: Aman Gupta <aman@tmm1.net>
Change-Id: I26c63732c8533390de91460acec312fd27ad8866
2020-08-06 08:03:19 -07:00
Philip P. Moltmann
f379917d3e Allow permission controller to read audio configuration
- Unfortunately there is no read-only permission that allows to read the
audio configuration
- Unfortunately there is no API bump before the feature ships that would
allow us to add such a read-only permission

Bug: 162547999
Test: Read audio configuration from permission controller
Change-Id: Icfe2b5ae54cae1cfc1be44a1370ffb0692365316
2020-08-05 02:40:55 +00:00
Agatha Man
89e5cfe9d8 Remove car permissions from common shell package
Removing car permissions that were added into common shell so that they
can be re-evaulated to include into CarShell. Adding car permissions to
shell should be reviewed by car frameworks team to determine what can be
allowed to the end-user and in terms of car safety.

Bug: 160339243
Test: make then check permission for shell user with adb shell pm dump
com.android.shell

Change-Id: I5a3b2086f605ba31f4231ec425cb2cb7c51ea7e6
2020-08-04 16:25:48 -07:00
Automerger Merge Worker
e4177f5cb4 Merge "Merge "Add KEYCODE_MEDIA_AUDIO_TRACK mapping to USB HID Usage consumer page (0x0c/0x173) "Alternate Audio Increment"" am: 21e6488ae7 am: ecd346e431 am: 6b96fe8128 am: 67236850f5" into rvc-qpr-dev-plus-aosp am: 34c6c66153
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365554

Change-Id: I40b85269a1f0c9ae065b12a7842d3be1e7c9b0f4
2020-08-03 22:31:36 +00:00
Siarhei Vishniakou
d6a3193071 Merge "Add KEYCODE_MEDIA_AUDIO_TRACK mapping to USB HID Usage consumer page (0x0c/0x173) "Alternate Audio Increment"" am: 21e6488ae7 am: ecd346e431 am: 6b96fe8128 am: 67236850f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365554

Change-Id: Ia52fbe23826565f4fa785a1b52a4d1196a516b6f
2020-08-03 22:27:56 +00:00
Siarhei Vishniakou
67236850f5 Merge "Add KEYCODE_MEDIA_AUDIO_TRACK mapping to USB HID Usage consumer page (0x0c/0x173) "Alternate Audio Increment"" am: 21e6488ae7 am: ecd346e431 am: 6b96fe8128
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365554

Change-Id: I20ccd5483de1903f7330b36c00ead5be788cc201
2020-08-03 22:26:30 +00:00
Siarhei Vishniakou
6b96fe8128 Merge "Add KEYCODE_MEDIA_AUDIO_TRACK mapping to USB HID Usage consumer page (0x0c/0x173) "Alternate Audio Increment"" am: 21e6488ae7 am: ecd346e431
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1365554

Change-Id: Ib727f09a3426172ac789f0a2e5bab06491e7b002
2020-08-03 22:12:22 +00:00
Siarhei Vishniakou
21e6488ae7 Merge "Add KEYCODE_MEDIA_AUDIO_TRACK mapping to USB HID Usage consumer page (0x0c/0x173) "Alternate Audio Increment"" 2020-08-03 21:29:08 +00:00
Treehugger Robot
abc8502551 Merge "Add support for Razer Kishi game controller." am: dab3aaa5c6 am: d13c410dfa am: b2ccd88b3f am: 85ec9950e2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384139

Change-Id: I1914d2712aa5802ca212f05b41954a61b84c1256
2020-08-01 13:45:59 +00:00
Treehugger Robot
85ec9950e2 Merge "Add support for Razer Kishi game controller." am: dab3aaa5c6 am: d13c410dfa am: b2ccd88b3f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384139

Change-Id: I78d0dded98f00114e90fb5b8fe6b054becccba95
2020-08-01 13:21:45 +00:00
Treehugger Robot
b2ccd88b3f Merge "Add support for Razer Kishi game controller." am: dab3aaa5c6 am: d13c410dfa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384139

Change-Id: I5e5ce4f05763347ebe7e1cd5dd80be82489d436c
2020-08-01 13:08:10 +00:00
Treehugger Robot
dab3aaa5c6 Merge "Add support for Razer Kishi game controller." 2020-08-01 12:29:58 +00:00
Treehugger Robot
696d25e48c Merge "Add support for Scuf Vantage game controller." am: 8ee49446ef am: 8114f3607b am: 889b8deaed am: eac0d11024
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1384181

Change-Id: Iab006565a19056c04d00669fc84b15886d2ee480
2020-08-01 05:51:46 +00:00