Commit Graph

1494 Commits

Author SHA1 Message Date
Automerger Merge Worker
d18bdcf5cb Merge "Merge "EmbeddedKitchenSinkApp BLUETOOTH_PRIVILEGED" into rvc-dev am: 928d88431a am: e3d05e322e" into rvc-d1-dev-plus-aosp am: dd596a19c6 am: c2590587a1
Change-Id: I176f70add9a548a13a80c9c44c55f691f53c0753
2020-05-05 00:30:03 +00:00
Joseph Pirozzo
e3d05e322e Merge "EmbeddedKitchenSinkApp BLUETOOTH_PRIVILEGED" into rvc-dev am: 928d88431a
Change-Id: Ic993b4665d910a921783ae2957cc8e36a2cbaaf6
2020-05-04 23:38:17 +00:00
Joseph Pirozzo
928d88431a Merge "EmbeddedKitchenSinkApp BLUETOOTH_PRIVILEGED" into rvc-dev 2020-05-04 23:30:55 +00:00
Siarhei Vishniakou
3e8e53dadc Merge "Add layout for xbox 360 wireless controller" into rvc-dev am: 0a19f87982 am: 7c7b26933a am: d66dbcec72 am: 1b1402b4c2
Change-Id: I30d057f0bc6ed654c6373e9b5713242be0199aba
2020-05-04 23:15:22 +00:00
Siarhei Vishniakou
7c7b26933a Merge "Add layout for xbox 360 wireless controller" into rvc-dev am: 0a19f87982
Change-Id: If60afe7042832a6eb67ac76c838bef5e53bd0169
2020-05-04 22:31:52 +00:00
Siarhei Vishniakou
0a19f87982 Merge "Add layout for xbox 360 wireless controller" into rvc-dev 2020-05-04 22:13:49 +00:00
Joseph Pirozzo
5212738a84 EmbeddedKitchenSinkApp BLUETOOTH_PRIVILEGED
Grant BLUETOOTH_PRIVILEGED permission to test app for Bluetooth testing.

Bug: 155672526
Test: In Kitchen Sink, connect on MAP profile.
Change-Id: I736f5a46e2f198947d7077a5542cf986aea7355c
2020-05-04 13:46:51 -07:00
Siarhei Vishniakou
046e478fd9 Add layout for xbox 360 wireless controller
We are currently missing a layout for the xbox 360 wireless controller,
with product id 02a1.

Bug: 144469012

Test: copied from Vendor_045e_Product_028e.kl
Change-Id: Ib0286d126273619352e9834e669413ecd699b1d9
2020-05-04 19:38:40 +00:00
Chong Zhang
9248b26375 Grant PACKAGE_USAGE_STATS permission to media uid
Allow media service to register UidObserver to get uid
state changes. Media transcoding uses uid states for
transcoding job scheduling purposes.

bug: 154734285
bug: 145233472

Change-Id: I20c7b33798ff5ede6620cccf65143da5ad77cba5
2020-04-29 10:55:37 -07:00
Jay Aliomer
f33e3de397 Merge "Adding P20 styles" into rvc-d1-dev am: d44d9cce56 am: 373d01857a am: fdbabe1ee7
Change-Id: I73771dc8c5f535dc8980ece3ab6cf272d6dcf8ff
2020-04-28 19:26:55 +00:00
Jay Aliomer
d44d9cce56 Merge "Adding P20 styles" into rvc-d1-dev 2020-04-28 18:27:17 +00:00
Jay Aliomer
6da7e0634e Adding P20 styles
adding fonts, colors and icon packs

Bug: 145530620
Test: manual
Change-Id: I38ad71945aee0f1bb3bcfefc3d4e5dad6e93bf37
2020-04-24 21:59:08 +00:00
Beverly Tai
c551107d56 Merge "Update ChargingStarted sound" into rvc-d1-dev am: 676d4a5085 am: 05c9d52c5a am: 4e74805e8f
Change-Id: If8988988736c1b4acb90970dbfac0a1380cc0886
2020-04-23 13:47:04 +00:00
Beverly
f0ce4f1451 Update ChargingStarted sound
Test: manual
Bug: 154293919
Change-Id: If14fad6189e4d216c892325e23d8607b2a0f3727
2020-04-22 18:21:18 +00:00
Anthony Chen
43159e0ba9 Merge "Remove all files associated with android.car.trust." 2020-04-20 22:24:43 +00:00
Mark Renouf
03f9a814a5 Merge "Scroll Capture Framework" into rvc-dev 2020-04-20 19:20:13 +00:00
Mark Renouf
a927929d99 Scroll Capture Framework
This is an implementation of long screenshots supporting
interactive, incremental capture of scrolling content using
a cooperative API between the app process and the system.

Design goals:

 - Provide for tile based incremental screenshots of scrolling content
 - Support existing apps without developer action
 - Provide support for non View-based Apps & UI toolkits

Bug: 148131831
Test: atest \
      FrameworksCoreTests:android.view.ScrollCaptureClientTest \
      FrameworksCoreTests:android.view.ScrollCaptureTargetResolverTest \
      FrameworksCoreTests:com.android.internal.view.ViewGroupScrollCaptureTest \
      FrameworksCoreTests:android.view.ScrollViewCaptureHelperTest \
      WmTests:com.android.server.wm.DisplayContentTest

Merged-In: I6c66a623faba274c35b8fa857d3a72030a763aea
Change-Id: I6c66a623faba274c35b8fa857d3a72030a763aea
2020-04-20 15:07:59 +00:00
Andrei Litvin
3b92b9682d Add support for GamePad api in ITvRemoteServiceInput.
Gamepad-specific API is a separtate input path from standard "remote"
service. Specifically it adds:
  - openGamepad that creates a virtual input device with
  gamepad-specific suport
  - send gamepad keys
  - send gamepad axis updates, which support joysticks, analog triggers
  and HAT axis (as an alternative to DPAD buttons).

Bug: 150764186

Test: atest media/lib/tvremote/tests/src/com/android/media/tv/remoteprovider/TvRemoteProviderTest.java

Test: flashed a ADT-3 device after the changes. Android TV Remote
      on my phone still worked in controlling the UI.

Merged-In: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
Change-Id: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
(cherry picked from commit 9b9f556af1)
2020-04-20 10:42:58 -04:00
Anthony Chen
2b545820f4 Remove all files associated with android.car.trust.
The `android.car.trust` package and feature has been deprecated in
R and is no longer supported.

Test: m -j
Bug: 150169315
Change-Id: I74f2beec4be1a838f575a05e225e2e36c3c2134b
2020-04-19 19:40:05 -07:00
Mark Renouf
b08cd1f8af Scroll Capture Framework
This is an implementation of long screenshots supporting
interactive, incremental capture of scrolling content using
a cooperative API between the app process and the system.

Design goals:

 - Provide for tile based incremental screenshots of scrolling content
 - Support existing apps without developer action
 - Provide support for non View-based Apps & UI toolkits

Bug: 148131831
Test: atest \
      FrameworksCoreTests:android.view.ScrollCaptureClientTest \
      FrameworksCoreTests:android.view.ScrollCaptureTargetResolverTest \
      FrameworksCoreTests:com.android.internal.view.ViewGroupScrollCaptureTest \
      FrameworksCoreTests:android.view.ScrollViewCaptureHelperTest \
      WmTests:com.android.server.wm.DisplayContentTest

Change-Id: I6c66a623faba274c35b8fa857d3a72030a763aea
2020-04-17 15:26:53 +00:00
Wei Sheng Shih
3b17079b01 Merge "Support addWindow as other user" into rvc-dev am: 1a46294fdb am: bbc82f209c am: 648f3f1954 am: addde6e564
Change-Id: I66df80e7edcf543c52ae6f640cf09df9e67022de
2020-04-10 09:24:31 +00:00
Wei Sheng Shih
1a46294fdb Merge "Support addWindow as other user" into rvc-dev 2020-04-10 08:33:12 +00:00
Ming-Shin Lu
e9bd437978 Merge "Trigger onTaskAppeared when a task started from recents becomes ready." into rvc-dev am: 1c92e1f789 am: 7ffe6e70ae am: a22ad45c92 am: 82def810f5
Change-Id: I5389eadd171e9c658e01f5b13b57fbd0a39b7909
2020-04-10 07:52:15 +00:00
Ming-Shin Lu
1c92e1f789 Merge "Trigger onTaskAppeared when a task started from recents becomes ready." into rvc-dev 2020-04-10 05:46:13 +00:00
lumark
04bceb99f1 Trigger onTaskAppeared when a task started from recents becomes ready.
In quick switch flows, launcher will first swipe task snapshot
through recents animation, and then start new task with custom animation
options through startActivityFromRecents after gesture finish detected,
and then finish recents animation finally.

But that way user may experience flickering before the new task launch
and recents animation finish.

To improve quick switch flickering, we ignore the new task's custom
animation from recents and generate task remote animation target,
and then trigger a callback for launcher to control/animate this
task surface, more like a part of RecentsAnimation,

Also, adding removeTask method for launcher can flexibility remove the
new task animation target once no need to animate, so that launcher
can decide when to finish recents animation.

Bug: 152480470
Test: manual as below steps:
  1) Doing quick switch task.
  2) Make sure launcher can receive onTaskAppeared callback.
  3) Make sure launcher calls removeTask successfully.
  4) Make sure launcher can finish recents animation after 3).
Change-Id: I0692a280a49719229fa8871509bad37a1343a00f
2020-04-10 02:20:03 +08:00
Charles Chen
fa42fcc372 Merge "Fix WindowContext leak" into rvc-dev am: 5c082c998f am: c4750c036b am: 020b6173bb am: 57a0f90a57
Change-Id: I751bbbc8991c33679c22eba2e67f59a047fd997d
2020-04-09 11:50:59 +00:00
Charles Chen
5c082c998f Merge "Fix WindowContext leak" into rvc-dev 2020-04-09 07:39:29 +00:00
TreeHugger Robot
c9d2314df9 Merge "Add enable/disable permission to permissioncontroller" into rvc-dev am: 4af07bb5f7 am: b24babee50 am: 3383e4f0c9 am: 8828889937
Change-Id: Ib1482e177f6e211e7fc1580909e959a567e1da0c
2020-04-08 20:09:50 +00:00
Charles Chen
4bff5be1a9 Fix WindowContext leak
The root causes of this issue are:
  1. WindowTokenClient#attachContext makes WindowTokenClient has strong
     reference to WindowContext, which leads to WindowContext cannot be
     GC'd.
  2. WMS#removeWindowToken needs MANAGE_APP_TOKEN permission which
     normal apps don't hold.

This CL does following things:
  1. Use weak reference instead on WindowTokenClient#mContext.
  2. Relax WMS#removeWindowToken to check callingUid if
     MANAGE_WINDOW_TOKEN permission is not held
  3. Deliver config changes to the client side in
     WMS#addWindowTokenWithOption
  4. Some minor fixes

fixes: 150812449
Bug: 150715095
Test: atest WindowContextTest
Test: atest WindowManagerServiceTests
Test: atest WindowTokenTests
Test: atest WindowManagerPermissionTests#testMANAGE_APP_TOKENS
Test: atest
WindowManagerPermissionTests#testADD_WINDOW_TOKEN_WITH_OPTIONS

Change-Id: I9f1d73af2abb78fc9844e6d9eb25e9f0293514e7
2020-04-08 21:30:24 +08:00
wilsonshih
d0fc2ca51f Support addWindow as other user
Support addWindow with the other userId which can be different from Uid.

This can be used when client want to addView for secondary user.
Example:
1. Create context with createContextAsUser or similar method.
2. Get WindowManager with this context.
3. WindowManager#addView

Bug: 151414297
Test: atest WmTests WindowAddRemovePerfTest AddWindowAsUserTest
Change-Id: I13e58d76b1f056f3829bc984c2b61496c8f8d535
2020-04-08 15:15:01 +08:00
Nate Myren
068b2b0df2 Add enable/disable permission to permissioncontroller
Ensure the permission controller can enable and disable apps

Bug: 146513245
Test: Manual
Change-Id: I185335bd729c8fa94b150d3b3adb95b89013aa16
2020-04-07 12:07:54 -07:00
Andrei Litvin
9b9f556af1 Add support for GamePad api in ITvRemoteServiceInput.
Gamepad-specific API is a separtate input path from standard "remote"
service. Specifically it adds:
  - openGamepad that creates a virtual input device with
  gamepad-specific suport
  - send gamepad keys
  - send gamepad axis updates, which support joysticks, analog triggers
  and HAT axis (as an alternative to DPAD buttons).

Bug: 150764186

Test: atest media/lib/tvremote/tests/src/com/android/media/tv/remoteprovider/TvRemoteProviderTest.java

Test: flashed a ADT-3 device after the changes. Android TV Remote
      on my phone still worked in controlling the UI.

Change-Id: I49612fce5e74c4e00ca60c715c6c72954e73b7a3
2020-04-07 13:15:15 -04:00
TreeHugger Robot
6bb03f2447 Merge "Do not remove window if IWindow#resized is failed" into rvc-dev 2020-04-06 04:15:49 +00:00
Riddle Hsu
839b5f55f9 Do not remove window if IWindow#resized is failed
Even DeadObjectException is thrown, it is not equivalent to the
window is died (transaction failed by small size data will be
DeadObjectException). Sometimes it may be caused by the binder
buffer of process is temporarily full. If the window is removed
directly but the process is still alive, the application client
and window manager are out of sync. Especially if the window is
important system window, e.g. status bar, notification shade,
navigation bar, which might need to reboot to recover. Ideally,
if the process is really dead, there should be a binderDied
callback that also removes the window.

The original purpose of the removal is to avoid display frozen
(e.g. rotation) always timeout which is caused by resetting
WindowState#mOrientationChanging in each layout traversal. Now
the window states are still updated as "resized" has reported,
so it won't block unfreeze display.

Bug: 151814107
Bug: 147448299
Test: atest WindowStateTests#testReportResizedWithRemoteException
Test: Hard code to throw RemoteException for a specified window
      and rotate the display.

Change-Id: Id295456cc99ab9af30aa5fad2eedada6afb862a2
2020-04-03 14:59:12 +00:00
Ytai Ben-Tsvi
152e25b804 Remove obsolete permission
Bug: 146157104
Merged-In: I95aafe0e41977ca2656163fce9796abc6127c202
Change-Id: Ia528e3017d25625931a84249872f699659ae6b9a
2020-04-01 10:00:25 -07:00
Andrii Kulian
86d676c81f 3/n Refactor TaskContainers to TaskDisplayArea
Renamed TaskContainers to TaskDisplayArea and added getDisplayArea()
method to WindowContainer that finds the first display area in the
hierarchy above the node. ActivityRecord and Task override it to
return the TaskDisplayArea class.

Bug: 152116619
Test: WM CTS and unit tests
Change-Id: I4525afbcd794848e1020213cdca04d89a646dd55
2020-03-31 12:15:57 -07:00
Xiangyu/Malcolm Chen
0c654b66f9 Merge "Allow implicit broadcast of multi SIM config change." into rvc-dev 2020-03-31 01:16:00 +00:00
Malcolm Chen
2b93ea07f7 Allow implicit broadcast of multi SIM config change.
This is a important broadcast that needs to be picked by multiple
components and apps.

Bug: 152655546
Test: build and sanity
Change-Id: I17befbb8814c09c24498b4e534e04f0fbce24c2f
2020-03-30 16:02:09 -07:00
Adam Bookatz
9968525afb Merge "UserSystemPackageInstaller only (un)installs when appropriate" into rvc-dev 2020-03-30 18:09:25 +00:00
Andrii Kulian
526ad439c3 1/n Move TaskContainers out of DisplayContent class
No changes in logic, just moving the code around.

Bug: 152116619
Test: WM CTS and unit tests
Change-Id: I4aa142e07e39950d077c685bb157b4abb2172886
2020-03-27 17:20:46 -07:00
Adam Bookatz
1efd27cde3 UserSystemPackageInstaller only (un)installs when appropriate
The UserSystemPackageInstaller (USPI) uninstalls system
packages that are not needed, depending on the user type.
When that determination changes (or the feature is disabled)
it can also re-install those packages.
This cl specifies when it is appropriate for USPI to actually
perform the (un)installation.

1.
Introduces uninstallReason: records the reason why a package
was uninstalled from a given user. Right now, the only values
are UNKNOWN and USER_TYPE. The latter indicates that the USPI
system uninstalled the package. If the USPI whitelist changes
(or the USPI feature is disabled), uninstalled packages will
only be installed by USPI if the uninstallReason was USER_TYPE.
Any further uninstalls (e.g. by ManagedProvisioning) will reset
the uninstallReason to UNKNOWN, so USPI will no longer install
such packages in the future.
This prevents USPI from reinstalling system packages that other
mechanisms (such as ManagedProvisioning) uninstalled.

2.
USPI will uninstall a system package if it is blacklisted, but
only if that system package is new, i.e in two circumstances:
a. on first boot
b. on an OTA where the package was not present prior to the OTA

Bug: 143200798
Test: atest UserSystemPackageInstallerTest
Test: Confirmed (un)installations during manually simulated OTAs
Change-Id: Ia0714d1faa8f7c79082f2cc93a92ae36b9a4c918
Merged-In: Ia0714d1faa8f7c79082f2cc93a92ae36b9a4c918
2020-03-28 00:19:37 +00:00
TreeHugger Robot
1410b406d7 Merge "Allow WRITE_SECURE_SETTINGS for ANGLE to provide developer options." into rvc-dev 2020-03-27 17:16:35 +00:00
Geoff Lang
4b5a106542 Allow WRITE_SECURE_SETTINGS for ANGLE to provide developer options.
ANGLE is a system library which adds a developer option to control when
it is used as the default OpenGL ES driver.

Test: manual, ANGLE.apk's developer options work.
Bug: 142239747

This is a cherry-pick of https://android-review.googlesource.com/c/platform/frameworks/base/+/1222890

Change-Id: I3e616d6252d0daa0e32c942b05987d17e73a2709
2020-03-25 16:13:24 +00:00
Anton Hansson
7fe2d29f1b Merge "Remove the tethering hiddenapi whitelist entry" into rvc-dev 2020-03-25 12:42:23 +00:00
TreeHugger Robot
e0b1bfb87d Merge "Add tuner permissions to Shell" into rvc-dev 2020-03-24 06:26:00 +00:00
shubang
d7a3204c4e Add tuner permissions to Shell
So we can test system APIs in cts.

Bug: 150952758
Test: atest android.media.tv.tuner.cts.TunerTest
Change-Id: Ife5a5f712cdf3d3c2e5dd747fa1d3bc8c165b85b
2020-03-23 19:41:35 -07:00
markchien
1f47e1c22e Give tethering bluetooth privilege permission
Permisssion of PanService#setBluetoothTethering is change from
BLUETOOTH_ADMIN to BLUETOOTH_PRIVILEGED.
Tethering service need bluetooth privilege permission to enable
bluetooth tethering.

Bug: 146045934
Test: on/off bluetooth tethering
Merged-In: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
Change-Id: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
2020-03-23 11:42:39 -07:00
Anton Hansson
e11221c738 Remove the tethering hiddenapi whitelist entry
Dexes under /apex are automatically whitelisted.

Bug: 146757305
Test: presubmit
Change-Id: I97af6d911c7e9bafdaa2a97102b2131dea6c0896
2020-03-20 15:27:27 +00:00
TreeHugger Robot
48bd1c9ccf Merge "Shell: Allow usage of wifi usability score APIs" into rvc-dev 2020-03-19 22:33:43 +00:00
TreeHugger Robot
591bb7b1fe Merge "Enforce permission on native puller API" into rvc-dev 2020-03-19 21:12:52 +00:00