Commit Graph

903 Commits

Author SHA1 Message Date
Heemin Seog
b0ec95ce0b Merge "Allow permission to change application state" into rvc-qpr-dev am: f068a1c665 am: 39bd586f6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12865656

Change-Id: Ic569b3543bbc2ee1858ef1fd239a4b9837fa86b0
2020-10-19 15:54:23 +00:00
Heemin Seog
39bd586f6f Merge "Allow permission to change application state" into rvc-qpr-dev am: f068a1c665
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12865656

Change-Id: I1cf1a67e136ee838aa4461c3d4c0da1bb561b7ba
2020-10-19 15:43:28 +00:00
Heemin Seog
52537c1ea2 Allow permission to change application state
Needed to give KitchenSink control over enabling/disabling rotary
functionality.

Bug: 170232080
Test: manual
Change-Id: Ic69222642884444597e7411b17b6c6f363076981
2020-10-16 16:16:56 -07:00
TreeHugger Robot
44a65b1e80 Merge "Added permissions for CarProvisioning app." 2020-10-15 01:32:43 +00:00
Chris Li
d93fff6c0f Support ignoring orientation request on DisplayArea level
1. Move the mIgnoreOrientationRequest to DisplayArea so that one can set
it on DisplayContent and DisplayAreaGroup to ignore orientation request
from non-app windows.
2. Have the DisplayContent to return SCREEN_ORIENTATION_UNSPECIFIED when
it is SCREEN_ORIENTATION_UNSET so that the display respects sensor
rotation.
3. Move the logic of using last orientation back to TDA, otherwise when
TDA returns UNSET because ignore is set, DC may incorrectly uses the
last orientation.

Bug: 170725334
Bug: 155431879
Test: manual: test with setting TDA and DC to ignore
Test: atest WmTests:TaskDisplayAreaTests
Test: atest WmTests:WindowOrganizerTests
Test: atest WmTests:DisplayAreaTest
Test: atest WmTests:DisplayContentTests
Change-Id: Ie92b059c453204799a58efd39dc9b23f7d62816d
2020-10-13 22:15:09 -07:00
Felipe Leme
ddd0f4ddd1 Added permissions for CarProvisioning app.
Test: build and boot AOSP automotive build
Bug: 170143095

Change-Id: I68657b4e4fe571079dd8c1a08371fcd8a95e340e
2020-10-12 18:56:20 -07:00
Kevin Chyn
fc26e8a0e0 Add wireframe for biometric TestApis
1) Adds BiometricTestSession and empty implementations
2) Adds TEST_BIOMETRIC permission
3) Grants Shell USE_BIOMETRIC and TEST_BIOMETRIC permission

Bug: 169459906
Test: make -j update-api && make -j

Change-Id: Iea9fd37d7234eb7e5e34a7a2698cbf0ca7a33a77
2020-10-09 11:15:03 -07:00
Charles Chen
9329fbdd72 Migrate IME switch dialog to WindowContext
Bug: 157888351
Test: manual - reproducible steps mentioned in the bug
Test: atest InputMethodMenuControllerTest
Test: atest WindowManagerServiceTests

Change-Id: I8adb0c569ea6c208aee659603ee1d69df9939267
2020-10-07 11:32:10 +08:00
Louis Chang
d1b79549d2 Renaming Stacks APIs to RootTasks
This CL is aimed to refine the AM/ATM API surface. The other
stack naming internally spread in AM and ATM will be covered
in later CLs.

Also Consolidate #removeStack() with #removeTask().

Bug: 157876448
Test: existing tests

Change-Id: I1254f972dab3bbe66a736a0402eebce9d0fb1496
2020-10-06 08:39:18 +08:00
TreeHugger Robot
e27fbdb2cf Merge "Grant new permission for storage manager" 2020-10-05 15:24:54 +00:00
Diego Vela
d4411a519e Migrate System Logs to ProtoLog
Migrate logs for States and Tasks
Remove DEBUG_PAUSE flag
Remove DEBUG_SAVES_STATE flag
Remove DEBUG_STATES flag
Remove DEBUG_TASKS flag

Bug: 153162675
Test: n/a
Change-Id: I3811f58ff5c904dab0b1ff61d29d83d78ec1a121
2020-10-01 19:17:10 -07:00
Evan Rosky
5577b8f591 Merge "Scaffolding for Shell Transitions" 2020-09-30 22:37:20 +00:00
TreeHugger Robot
dfd56946f8 Merge "Guard IResourceObserver::registerObserver with permission" 2020-09-30 18:43:45 +00:00
Evan Rosky
0dd1586bf7 Scaffolding for Shell Transitions
Initial rough implementation of Shell Transitions.

Shell Transitions can be enabled by setting ENABLE_SHELL_TRANSITIONS
via `adb shell setprop persist.debug.shell_transit 1`

The main structure behind this is:

- TransitionController in Core responsible for handling the
collection of transition participants and communicating with
the TransitionPlayer in Shell.

- Transitions in Shell responsible for starting transitions
and playing associated animations.

This initial version only supports task open/show/close and does
a simple fade. The flow is:
1. activityStarter calls to Transitions.requestStartTransition
2. Transitions will prepare to start and then call
   WindowOrganizerController.startTransition().
2. Various operations in Core call TransitionController.collect()
   to track participants. This collect() acts as a replacement for
   adding to mOpening/ClosingApps.
3. The legacy executeAppTransition() is wired into
   TransitionController.setReady() for now. This signal
   is used to ready a BLASTSyncEngine.
4. When all participants are done drawing, TransitionController
   will commit any showing visibility changes and then will construct
   a TransitionInfo object summarizing all the changes needed for
   animation. This gets sent to Transitions.onTransitionReady()
5. Transitions then plays the transition animation and on
   completion will call WindowOrganizerController.finishTransition()
   which will tell TransitionController to do any finishing
   work (like commiting deferred hide changes).

Bug: 161980187
Test: enable the flag and try opening/closing tasks. Also added
      TransitionControllerTests
Change-Id: I80c3a241fc12004a894c26523a1e5828e0c533ff
2020-09-30 11:36:35 -07:00
Evan Severson
3b7af77649 Merge changes from topic "BackgroundMicCamera"
* changes:
  Do not show rationale when permission is restricted
  Add role allowlist for restricted permissions
  Add documentation to APIs using non-inclusive lanuage
  Treat background mic/camera normally
  Introduce new permissionFlag
  Split camera and microphone for background modes
  Add background microphone and camera permission
2020-09-30 16:46:57 +00:00
Neil Fuller
7e11d634fc Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0 am: 8a0ce64177 am: 75ae324fb9 am: 7a3481c35c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: I3a2b428be82d029c3cb7c8fa9b3102dd62eec8dc
2020-09-30 10:30:38 +00:00
Neil Fuller
7a3481c35c Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0 am: 8a0ce64177 am: 75ae324fb9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: Id9f67ecab2beabe967660b5a4407ef0f20d8efad
2020-09-30 10:15:21 +00:00
Neil Fuller
75ae324fb9 Merge "Add a new permission in AOSP" am: 4b22e7c281 am: 1f728acac0 am: 8a0ce64177
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440636

Change-Id: I0c4deb866e86feb77fe898e4bf643cd45ad9f086
2020-09-30 09:51:55 +00:00
Neil Fuller
770f5ab2db Add a new permission in AOSP
This adds a new permission in AOSP, so it can be referenced by the Shell
command, which presubmit suggests has to be maintained in AOSP.

Bug: 159891384
Test: build only
Exempt-From-Owner-Approval: jsharkey@ approved but it appears to have reset...?
Change-Id: Ic7d403e20731e9d6bd82d5b2e2758cc61989cc59
2020-09-30 08:39:25 +00:00
Tsung-Mao Fang
5d42fad212 Grant new permission for storage manager
We declard a new MANAGE_EXTERNAL_STORAGE permission in ag/12085709,
so grant this permisison to this application.

Fix: 143200051
Test: Rebuilt rom
Change-Id: Iea926a6fa9cc3092857b5150d6e358e06c5fb5c7
2020-09-30 14:19:37 +08:00
TreeHugger Robot
2577976f47 Merge "WindowStateAnimator: Remove mSurfaceResized" 2020-09-29 20:48:42 +00:00
Sarah Chin
0b7a97fc80 Merge "Add read/write logic for SubscriptionPlan network types field" into rvc-d1-dev am: 76b7c3ccb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12691247

Change-Id: Iab79d997aaeec0524cf9f2d9fb61f3c1ce0afa71
2020-09-29 17:58:01 +00:00
Robert Carr
0cf5818391 WindowStateAnimator: Remove mSurfaceResized
This is a part of moving Surface size control to the client. We
currently see there are only two uses of mSurfaceResized:
	1. In WindowState to emit MSG_RESIZED. However for many
	releases now we have only resized surfaces from within
	relayoutWindow, so the client will already receive the
	result here and there is no need to emit MSG_RESIZED.
	2. In WindowStateAnimator to set REDO_WALLPAPER. The
	original meaning of this code is perhaps lost to archaeology.
	However I think the cases where resizing would be linked
	to wallpaper should be limited to rotation. This seems to match
	the idea that the historical meaning of "mSurfaceResized" was more
	or less "orientation changing" (back before multi-window).
	We also add this REDO_WALLPAPER flag from
	WindowManagerService#finishDrawingWindow, and so I think it should be
	added anyway in these sort of rotation cases (assuming it's still
	necessary)

Bug: 161937501
Test: Existing tests pass
Change-Id: I2f85b6a81d24eec5c4aaca205e92a5fe82aff41e
2020-09-28 12:15:29 -07:00
Chong Zhang
95ad2ceac8 Guard IResourceObserver::registerObserver with permission
bug: 154733526
bug: 168307955
test: mediatranscodingservice unit testing.
Change-Id: Ie210f704eb0982fcc50b8e7de7e84a7b96280e81
2020-09-25 23:56:38 +00:00
Collin Fijalkovich
177fb5371a Merge "Allow privapp Traceur access to STATUS_BAR and DUMP" am: 7ffd615b4c am: c1795594fc am: 007c395a60 am: 2b7e712e28 am: c9f2bbea61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1415308

Change-Id: I6f080e17b63a28d914f9b224cc712cd9018e1700
2020-09-25 05:51:45 +00:00
Sarah Chin
859dd69f6f Merge "Add read/write logic for SubscriptionPlan network types field" into rvc-qpr-dev am: 93e0bd19fc am: a608315e39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12672465

Change-Id: I60efe2858961dfbecc7eacd7dc3eeefaf92493ff
2020-09-25 05:48:33 +00:00
Collin Fijalkovich
c9f2bbea61 Merge "Allow privapp Traceur access to STATUS_BAR and DUMP" am: 7ffd615b4c am: c1795594fc am: 007c395a60 am: 2b7e712e28
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1415308

Change-Id: Icf6dcb3545876cc1f1fa55648d4af4912e8e18ac
2020-09-25 05:35:02 +00:00
Sarah Chin
a608315e39 Merge "Add read/write logic for SubscriptionPlan network types field" into rvc-qpr-dev am: 93e0bd19fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12672465

Change-Id: I45e6d253a09a7d82b454d869895b54d8631cc24b
2020-09-25 05:26:40 +00:00
Collin Fijalkovich
2b7e712e28 Merge "Allow privapp Traceur access to STATUS_BAR and DUMP" am: 7ffd615b4c am: c1795594fc am: 007c395a60
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1415308

Change-Id: I848a84ba27f4577b2744703943eb09d49b9922fa
2020-09-25 05:26:15 +00:00
Sarah Chin
8fce85a6f8 Add read/write logic for SubscriptionPlan network types field
Add permissions for Phone process to access SubscriptionPlans for
meteredness

Test: manual verification
Bug: 169187737
Change-Id: Ib821590a573db87b22619cfe7ebe64c0230c5031
2020-09-25 00:32:07 +00:00
Collin Fijalkovich
7ffd615b4c Merge "Allow privapp Traceur access to STATUS_BAR and DUMP" 2020-09-24 21:08:09 +00:00
Collin Fijalkovich
36d59fba49 Allow privapp Traceur access to STATUS_BAR and DUMP
Modifies the privapp allowlist to allow Traceur to grant Traceur the
STATUS_BAR permission, which is needed for quick settings tile functionality, and dump which is needed for the BUGREPORT_STARTED intent.

Bug: 166768816
Test: Built user and userdebug, exercised regular and long trace
functionality

Change-Id: I180527a9a1a30ef6a214b628f37affc69f9ae2f0
2020-09-24 17:45:53 +00:00
Sarah Chin
8517e8d998 Add read/write logic for SubscriptionPlan network types field
Add permissions for Phone process to access SubscriptionPlans for
meteredness

Test: manual verification
Bug: 169187737
Change-Id: Ib821590a573db87b22619cfe7ebe64c0230c5031
2020-09-23 23:59:02 -07:00
Evan Severson
4f30e0baeb Split camera and microphone for background modes
Test: adb shell dumpsys package [package targeting < 31]>
Bug: 158311343
Change-Id: Ia5d0c40551163772e7cc10fdaf067360c6885f5b
2020-09-23 14:06:05 -07:00
Ulyana Trafimovich
4719733d49 Merge "Drop dependency of android.test.mock -> android.test.base." am: f08e8871d4 am: 72003fb685 am: 10e02f55c0 am: 2dc7803823 am: 51f2298687
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1434135

Change-Id: I3a9f55e09d4dd452445bee3b834f23ce2e98fbbd
2020-09-23 17:08:34 +00:00
Ulyana Trafimovich
51f2298687 Merge "Drop dependency of android.test.mock -> android.test.base." am: f08e8871d4 am: 72003fb685 am: 10e02f55c0 am: 2dc7803823
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1434135

Change-Id: Ided901188cdaee6a0bc7cafe751e9344bcba8d9b
2020-09-23 17:07:11 +00:00
Ulyana Trafimovich
2dc7803823 Merge "Drop dependency of android.test.mock -> android.test.base." am: f08e8871d4 am: 72003fb685 am: 10e02f55c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1434135

Change-Id: I2739873d55b2cff1f5ecc722e1877603ba6e22c6
2020-09-23 16:30:27 +00:00
Ulyana Trafimovich
f08e8871d4 Merge "Drop dependency of android.test.mock -> android.test.base." 2020-09-23 14:54:16 +00:00
Paul Hu
9830fe8a19 Merge "Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to DownloadProvider" am: 41344e427c am: a5bd8f91f5 am: 451ab5646b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431470

Change-Id: I44f2db6b3563cf002372a2e97cb6849275d139fd
2020-09-23 11:31:46 +00:00
Ulya Trafimovich
c578ab0ada Drop dependency of android.test.mock -> android.test.base.
There should be no such dependency.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 169137403
Bug: 132357300
Change-Id: Iaa7414be66581c01c6acbf367dc165cd8af78615
2020-09-23 11:08:01 +01:00
Evan Rosky
f4f842b65f Merge "Added some protologs to BLASTSyncEngine" 2020-09-23 00:52:54 +00:00
Philip P. Moltmann
faeec12c7d Merge changes from topic "revert-12439864-PermAppOpsCrossUserCheck-Fixed-DGFFMARPXU"
* changes:
  Revert "Give all non-package services the power to interact accr..."
  Revert "Check cross-user interactions for permissions and app-op..."
  Revert "Invalidate package/permission cache if cross-profile app..."
2020-09-22 15:20:22 +00:00
Chris Li
f747948b6d Merge "Only allow TaskDisplayArea to specify orientation if it is focused" 2020-09-21 23:35:35 +00:00
Philip P. Moltmann
aba996799d Revert "Give all non-package services the power to interact accr..."
Revert "Add dedicated host side tests for permissions and appops"

Revert submission 12439864-PermAppOpsCrossUserCheck-Fixed

Reason for revert: Bug 169044600
Reverted Changes:
I95d015e01:Invalidate package/permission cache if cross-profi...
I2a8a84f57:Check cross-user interactions for permissions and ...
Ie8f0db231:Give all non-package services the power to interac...
I11af434a8:Test package/permission cache invalidation when IN...
Ib6d609a4d:Add dedicated host side tests for permissions and ...

Change-Id: I47d371832c119fe4ce4890e10c1ac87aba92acbc
2020-09-21 22:26:51 +00:00
Chris Li
bbe25f59ba Only allow TaskDisplayArea to specify orientation if it is focused
(1/n Orientation on DisplayAreaGroup)

Record the last focused TDA and only allow it to specify orientation
if it is the last focused one on the logical display, so that when
there are multiple TDAs, we only respect the TDA with focus.

Bug: 155431879
Test: manual: test with fixed-orientation app
Test: atest WmTests:TaskRecordTests
Test: atest WmTests:TaskDisplayAreaTests
Change-Id: Ia574550368ce45a6e2c2f81b543adcfa4cf01ba1
2020-09-21 13:37:40 -07:00
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
Evan Rosky
4e8518a43b Added some protologs to BLASTSyncEngine
To enable easier debugging of sync-related issues

Bug: None
Test: adb shell wm logging enable-text WM_DEBUG_SYNC_ENGINE
Change-Id: Id5b6e47de6958a5b81ac3bf5617038831282165e
2020-09-18 13:43:16 -07:00
paulhu
2cbae66fcb 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
Merged-In: If8fa785568ace1f15f53daec67c06e1207d5dc9c
2020-09-18 08:24:12 +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
Julia Kawano
f342e054af Merge "Grant launcher control incall permission" 2020-09-16 17:34:57 +00:00