Commit Graph

19068 Commits

Author SHA1 Message Date
Louis Chang
6de0c0a56d Merge "Remove ATM#positionTaskInStack API" 2020-09-22 00:51:53 +00:00
Charles Chen
a73d039aee Merge "Make a context dervied from an UI context as an UI context" 2020-09-21 10:43:30 +00:00
Chilun Huang
3dda8e66d3 Merge "Revert "Revert "Introduce ActivityTransactionItem and reduce null checks""" 2020-09-21 05:09:48 +00: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
Hall Liu
780b2f753e Merge "Expose StatusBarManager#setDisabledForSimNetworkLock" 2020-09-18 19:12:58 +00:00
Winson Chiu
189a385fd7 Merge "Add getTargetSdkVersion without AppInfo" 2020-09-18 18:18:28 +00:00
Joanne Chung
64c78cba88 Merge "Update TEST_MAPPING file under Activity path." 2020-09-18 14:44:40 +00:00
Chilun Huang
d5af95b56f Revert "Revert "Introduce ActivityTransactionItem and reduce null checks""
This reverts commit fd2be2c178.

Reason for revert: Reland the CL

This class is used for activity-targeting item to inherit,
which encapsulate null checks of activity client record.
This patch also change signature of ClientTransactionHandler#handle*
and reduces null checks.

In addition, add some null pointer checks after getActivityClient().
Also fix a typo in performStopActivityInner() and
performDestroyActivity().

Bug: 127877792
Bug: 164982975
Test: atest frameworks/base/core/tests/coretests/src/android/app/servertransaction
Test: atest ActivityThreadTest ActivityThreadClientTest
Test: atest TransactionExecutorTests#testActivityItemNullRecordThrowsException
Test: atest TransactionExecutorTests#testActivityItemExecute
Test: atest CtsAppTestCases:LocalActivityManagerTest
Change-Id: Ida612f1c8af7ecd7a04e69ade461403b8711508a
2020-09-18 14:36:10 +08:00
Winson
050de3f78b Add getTargetSdkVersion without AppInfo
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.

Bug: 164459559

Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo

Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
2020-09-17 10:37:11 -07:00
Louis Chang
82ddec5645 Remove ATM#positionTaskInStack API
since this API is no longer needed.

Bug: 157876448
Test: existing tests
Change-Id: Ib89fcbddf65bcf2aee4676be66b3f27c9d9f5f78
2020-09-16 17:37:17 +08:00
Charles Chen
202a82802c Merge "Use Builder for ActivityView" 2020-09-16 08:38:13 +00:00
Charles Chen
87f67a9fe9 Use Builder for ActivityView
fixes: 162901735
Test: touched tests
Change-Id: I230d65d76b1bc8dfbae304b33579e7eb96d0593d
2020-09-16 10:44:07 +08:00
Hall Liu
3dbee7e17c Expose StatusBarManager#setDisabledForSimNetworkLock
Expose method for use by Telephony when it moves over to a mainline
module.

Fixes: 168647030
Test: atest android.app.cts.StatusBarManagerTest
Change-Id: I88807ff0e46acce67f683b71ea8621719e6fe6ac
2020-09-15 15:27:46 -07:00
Jorge Gil
eac9364f7a Merge "Rename autoEnterAllowed to autoEnterEnabled" 2020-09-15 22:12:26 +00:00
Jeff Sharkey
4b5b0174d0 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570 am: 487d394296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: Id01f468b43fd5b2aada78608010625b392c1b647
2020-09-15 21:01:48 +00:00
Philip Junker
c14b6b52ff Merge "Support for notification panel key on ATV" 2020-09-15 07:19:05 +00:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
Treehugger Robot
bc93881957 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae am: 1d3e694b97 am: e022945d69
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I5725049a13c30e122e1f8b5e4e772b7431a4e32d
2020-09-14 22:44:28 +00:00
Jeff Sharkey
c0b288133a Merge changes from topic "sep11"
* changes:
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
2020-09-14 21:52:13 +00:00
Treehugger Robot
1d3e694b97 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I70eb21c1ea9411974a1c07f6aaaf611760110c34
2020-09-14 21:27:14 +00:00
Julia Reynolds
71c18d2afc Replace 'whitelist' with 'allowlist'
Change-Id: If7422064e59e6c055c9dae092ead298b81cf41e8
Test: atest
Bug: 161889253
Merged-In: I94a43c1c995052b034d8a5377786e1a15e4c9c59
2020-09-14 18:29:23 +00:00
jorgegil@google.com
318397b034 Rename autoEnterAllowed to autoEnterEnabled
Bug: 167621602
Test: atest PinnedStackTests#testAutoPipAllowedBypassesExplicitEnterPip

Change-Id: I6e92c138c49b55f8641950bc9c45dd4631d62ee8
2020-09-14 09:45:44 -07:00
Alex Buynytskyy
d15391e426 Rollforward: Digest API: allow installer to provide digests for an APK.
5d9710d5b72136b2face76b578ac120ad6ed931e

Bug: 160605420
Fixes: 168445565
Test: atest ChecksumsTest
Test: atest ApkVerityTest:com.android.apkverity.ApkVerityTest

Change-Id: Ib559ad9107996290f4ae4661ccec4dc14658a7e9
2020-09-14 16:23:40 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Slava Shklyaev
a3d1d1452a Merge "Revert "Digest API: allow installer to provide digests for an APK."" 2020-09-14 15:43:44 +00:00
Slava Shklyaev
4a102df4f2 Revert "Digest API: allow installer to provide digests for an APK."
Revert "Tests for installer-provided checksums."

Revert submission 12538860-installer-digests

Reason for revert: Droidcop: Potential culprit for b/168445565
Reverted Changes:
I112ba8594:Tests for installer-provided checksums.
I69a787bde:Digest API: allow installer to provide digests for...

Bug: 168445565
Change-Id: I2276373024bb951719cf056d28c4de0838c0519f
2020-09-14 15:25:59 +00:00
Riddle Hsu
34723c1f04 Merge "Add app start source information to statsd" 2020-09-14 10:00:42 +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
Charles Chen
9c106a411c Make a context dervied from an UI context as an UI context
fixes: 165833103
Test: atest StrictModeTest ContextAccessTest
Test: atest InputMethodServiceTest InputMethodServiceStrictModeTest

Change-Id: Ia97e1a0cc290be516d2618148600238b3273c54c
2020-09-14 14:56:00 +08:00
Riddle Hsu
9b72caeded Add app start source information to statsd
Add more information about how the activity is launched
with the event time which is closer to user interaction.

Bug: 166614700
Test: ActivityMetricsLaunchObserverTests#testOnReportFullyDrawn
Test: Enable statsd log: "adb shell cmd stats print-logs"
      Check the logcat output contains the given string.

Change-Id: If153f0b9e8d8969a2122e5f2b8aac4a83aa524c9
2020-09-14 06:07:28 +00:00
Alex Buynytskyy
0138bf5f53 Merge "Digest API: allow installer to provide digests for an APK." 2020-09-12 03:45:19 +00:00
Philip P. Moltmann
bca4796525 Check cross-user interactions for permissions and app-ops operations
1.
We want to be quite permissive here as without being able to check
permissions or appops nothing else works. Hence allow cross-user
interactions if any cross-user permission is granted.

2.
Also we need to prevent infinite recursion as we are checking permission
and appops inside of permission and app-op checks.

2.
Clear Binder.callingUid when checking permission inside system server

Makeing the binder call "checkPermission" usually sets
Binder.callingUid to the calling processes UID. Hence clearing the
calling UID is superflous. If the call is inside the system server
though "checkPermission" is not a binder all, it is only a method call.
Hence Binder.callingUid might still be set to the app that called the
system server. This can lead to problems as not every app can check the
same permission the system server can check.

E.g. the system server can check permission accross user boundaries,
most regular apps can't

Test: atest CtsPermissionHostTestCases CtsAppOpHostTestCases // execute the new paths for both full users and profiles
      atest ManagedProfileTest#testCameraPolicy              // a previous version of the patch caused a regression in this test
      atest AccountManagerXUserTest                          // a previous version of the patch caused a regression in this test
      Accessed clipboard from chrome in work profile
Fixes: 153996875
Change-Id: I2a8a84f574fbf07ab88ed991445830fa85aa4450
2020-09-11 19:23:07 -07:00
Alex Buynytskyy
48c717ecc1 Digest API: allow installer to provide digests for an APK.
Bug: 160605420
Test: atest ChecksumsTest

Change-Id: I69a787bde596c9841ba04772a06c227d902f721f
2020-09-11 13:00:43 -07:00
TreeHugger Robot
1a1a8d4c61 Merge "UiAutomation supports new flag, FLAG_DO_NOT_USE_ACCESSIBILITY" 2020-09-11 13:01:30 +00:00
Joanne Chung
39a0aa07af Update TEST_MAPPING file under Activity path.
Restruct cts changes the test path. Correct the path in TEST_MAPPING.

Bug: 154961272
Test: atest --test-mapping frameworks/base/core/java/android/app/
Change-Id: Icf9fec3ac07663fdb3a3099b858e03353c474e36
2020-09-11 15:20:19 +08:00
TreeHugger Robot
ae95e2a448 Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f am: 1ed53ed94e am: 089f82deb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483

Change-Id: I42bada5cf24216465486fe8b4a3c97c5f6c2edae
2020-09-10 00:54:48 +00:00
Louis Chang
80ffe3f0ae Merge "Replace StackInfo with TaskInfo" 2020-09-10 00:49:16 +00:00
TreeHugger Robot
1ed53ed94e Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483

Change-Id: Ief6065688eb49cd0d795dbd892ea9bfa76290f2b
2020-09-10 00:20:15 +00:00
TreeHugger Robot
ceb7aefd6f Merge "Sanitize more of the notification text fields" into rvc-dev 2020-09-09 23:55:10 +00:00
TreeHugger Robot
c2476f18aa Merge "Revert "clean-up unrequired slice access from default home app"" 2020-09-09 20:26:48 +00:00
Pinyao Ting
a8fee79b81 Revert "clean-up unrequired slice access from default home app"
This reverts commit d1f7f96a58.

Reason for revert: regression, see b/167993144. (original bug: b/163121804)

Change-Id: I54699b02e7de8c6e6ecebe0a5b684b7383caa81b
2020-09-09 18:10:46 +00:00
TreeHugger Robot
b837e23d71 Merge "Revert "Add setSchedPolicyCgroup to AM service"" 2020-09-09 17:05:47 +00:00
TreeHugger Robot
aa9a577c35 Merge "Update AssistStructure.ViewNode#getMaxTextLength() javadoc." 2020-09-09 02:57:58 +00:00
Joanne Chung
863a9ad90b Update AssistStructure.ViewNode#getMaxTextLength() javadoc.
Since S, we limit characters for single line TextView due to the
performance reason(459f35a). The return value for not set case is
not -1. Update the API javadoc to prevent giving wrong information.

Bug: 159037010
Test: n/a
Change-Id: Ic5aa93083f48fa50e097579e61320cc13897265f
2020-09-09 09:24:22 +08:00
mincheli
40c9baad6b UiAutomation supports new flag, FLAG_DO_NOT_USE_ACCESSIBILITY
UiAutomation should have an option not to engage accessibility.
go/uiautomation_not_use_a11y

Bug: 93087044
Test: atest UiAutomationManagerTest, atest CtsUiAutomationTestCases
Change-Id: Icc6c359844817a07869a18345fe44ef3b2813dae
2020-09-08 17:29:44 +08:00
Chilun Huang
849b6933ea Revert "Revert "Let activities can be recreated in ON_START state""
This reverts commit 167538021b.

Reason for revert: Reland the CL
- Extend the timeout period for low-end devices.

We should also allow the activity to be recreated in ON_START state,
since ON_START is also a resting state and we don't see a reason to
prevent applications from doing so.

Bug: 162906202
Test: atest FrameworksMockingCoreTests
      atest FrameworksCoreTests
      atest WmTests
Change-Id: Idb17514619c6501474f7fc6844dda9da98a4dd72
2020-09-08 06:50:38 +00:00