Commit Graph

17191 Commits

Author SHA1 Message Date
Jing Ji
c0324f3a1f Merge "Update ApplicationExitInfo per API Review" 2020-02-07 21:22:58 +00:00
Evan Rosky
a85b3f1828 Merge "Add hierarchy operations to container transaction" 2020-02-07 19:19:12 +00:00
Charles Chen
848b6d4441 Merge "Fix that WindowContext token is always null" 2020-02-07 08:25:43 +00:00
Evan Rosky
a8fde159c7 Add hierarchy operations to container transaction
Also add a way to query for child containers of a container.

Combined, these provide enough flexibility to re-arrange
containers to system-ui. For now, it is locked-down a bit so
it only provides children of TaskTiles and can only reparent
ActivityStacks. Eventually, this can be expanded for nested
tasks or display areas.

Bug: 133381284
Test: Added TaskTileTest#testHierarchyTransaction
Change-Id: Id0e89a4e4b9352d9392349c4e1fe7d69b4f9f212
2020-02-06 20:11:01 -08:00
Yvonne Jiang
43361f713d Merge "Update secondary lock screen implementation to use the newly updated SurfaceControlViewHost API." 2020-02-06 23:02:49 +00:00
Robert Carr
e10ee3d2eb Introduce BLASTSyncEngine
Test: wmtests/TaskOrganizerTests, TaskOrganizerTests demo apps
Change-Id: I82c2e184e93782549bc4f78e0986a026d7ef8d03
2020-02-06 12:25:51 -08:00
TreeHugger Robot
90fbb634f4 Merge "Describe in which cases getLast* methods return -1/null" 2020-02-06 19:28:09 +00:00
Philip P. Moltmann
053dbad9fd Merge changes from topic "AppOpsFgBackgroundMode"
* changes:
  Package manager is not ready when reading app-ops state
  Use setUidMode when reading state
  Expose syntax for app-ops settings as test-api
  Callback startWatchingMode with the right op
  Force update uid state when pending uid state is applied
  Notify all packages is uid-mode is changed
2020-02-06 18:21:52 +00:00
Automerger Merge Worker
3ef03023e5 Merge "Add CompatChanges API." am: 54036c0525 am: 9f9657ee5e am: f1f1b1402a
Change-Id: Id473cf123c184eb4247f93ebc9d96bbb87f9f7a7
2020-02-06 18:13:41 +00:00
Automerger Merge Worker
f1f1b1402a Merge "Add CompatChanges API." am: 54036c0525 am: 9f9657ee5e
Change-Id: Ief0b05e44e55c562df4dd616ba9ffdc534463468
2020-02-06 17:55:28 +00:00
Automerger Merge Worker
746ba5d891 Merge "More renames for API council" am: b03661f5d8 am: 02e64e352c am: 9522f9ff0f
Change-Id: I642777126bf77db09c8b64a8302145472272c9c6
2020-02-06 17:48:17 +00:00
Automerger Merge Worker
9f9657ee5e Merge "Add CompatChanges API." am: 54036c0525
Change-Id: Ieade8f2b33423bad4219ab2982b876b06e355e84
2020-02-06 17:43:00 +00:00
Automerger Merge Worker
9522f9ff0f Merge "More renames for API council" am: b03661f5d8 am: 02e64e352c
Change-Id: I83a0a98b18cffd92a8f2eed727b5fa277d89a5be
2020-02-06 17:37:36 +00:00
Andrei-Valentin Onea
54036c0525 Merge "Add CompatChanges API." 2020-02-06 17:31:15 +00:00
Automerger Merge Worker
02e64e352c Merge "More renames for API council" am: b03661f5d8
Change-Id: I1bd4db67106f8e885ca8449103af569ab100c361
2020-02-06 17:22:28 +00:00
Philip P. Moltmann
7c0524fc0c Describe in which cases getLast* methods return -1/null
Test: None
Fixes: 149015680
Change-Id: Ic7d0564ac3d5fc821854321913ec7e074a262aa1
2020-02-06 09:21:31 -08:00
Jing Ji
a590e8e72b Update ApplicationExitInfo per API Review
Bug: 148980719
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I2982105f200fbe65c6b6bedfc23ed7b158298745
2020-02-06 07:54:18 -08:00
atrost
8a3cd58882 Add CompatChanges API.
This wraps our existing APIs for isChangeEnabled, and is exposed for
mainline modules to use.
Also upgrading PlatformCompatChangeRule to androidx to match with
frameworks coretests.

Test: http://aosp/1203413
Test: atest android.app.compat.CompatChangesTest
Test: atest com.android.tests.gating.PlatformCompatGatingTest
Bug: 142650523
Change-Id: I12b9436c2ea955e9b74228f150b872d6eb3a1081
2020-02-06 14:42:31 +00:00
Bernardo Rufino
2f167d3823 Don't block app-rendered text toast on apps with targetSdk < 30
We've decided to gate the text toast move on targetSdk due to an app
crash (b/148438364) but decided not to gate the background custom toast
block (in NMS) on targetSdk temporarily to gather dogfood and DP
feedback. This meant that app-rendered text toasts (which are only
possible for apps with targetSdk < 30) were being blocked in NMS since
they were being considered custom toasts.

This brings back the boolean inside Toast class that differentiates
between custom and text toasts for apps with targetSdk < 30, since both
are app-rendered in this case. This code won't be present on final
version and is temporary to gather feedback on dogfood and DP, since
almost no app currently targets SDK 30+. We'll gate both changes (the
system UI move and the bg custom toast block) on targetSdk later on.

Bug: 148761979
Bug: 148794147
Bug: 144754526
Test: Verify that, while on the background:
      App with       | Custom toast | Text toast
      targetSdk < 30 |      Blocked |    Allowed
      targetSdk 30+  |      Blocked |    Allowed
Test: atest android.widget.cts.ToastTest android.widget.cts29.ToastTest
            LegacyToastTest

Change-Id: Id529028bc463034cd2f64a6f2f97e71bc6ea7c36
2020-02-06 10:11:34 +00:00
Neil Fuller
c0d59e39d7 More renames for API council
Renames PhoneTime[|Zone]Suggestion to TelephonyTime[|Zone]Suggestion.
Makes changes to generally avoid PHONE and use SLOT_INDEX or telephony
as appropriate for the usage. Removes telephony / phone from a few
variable names where it doesn't add value.

This commit also renames some remaining phoneId instances to slotIndex
which were missed when that rename happened.

Bug: 148842434
Test: treehugger
Change-Id: I4302e68082b802b75b53c02a9c9b1ae39dff6085
2020-02-06 08:41:26 +00:00
Yunfan Chen
6ced1bff86 Merge "Do not write recycled icon to TaskDescription parcel" 2020-02-06 02:46:45 +00:00
TreeHugger Robot
d51f8c5639 Merge "Move compat behavior in #onPipRequested to ActivityThread" 2020-02-06 02:00:57 +00:00
Philip P. Moltmann
e565c7b896 Expose syntax for app-ops settings as test-api
Test: Built, used the constants in a test
Bug: 148180766
Change-Id: Iba8699ed9fccf02713ed4345e404f46d8b5b900e
2020-02-05 13:38:52 -08:00
Philip P. Moltmann
b2bc651ffc Callback startWatchingMode with the right op
... in case the op has a switchOp.

Some ops have a switch-op. This means the mode of this op is not unique
to this op but shared with the switch-op.

E.g. FINE_LOCATIONs switch-op is COARSE_LOCATION.

Before R when you registered a startWatchingMode for FINE_LOCATION the
callbacks actually came for COARSE_LOCATION. Now the callbacks will
actually come for FINE_LOCATION

This is a subtle API change, hence guarded by a target-api change-id.

Bug: 148180766
Test: atest CtsAppOpsTestCases:android.app.appops.cts.ForegroundModeTest
Change-Id: I6bcb6f4876e524da65dd54c1d9f5cf1ce14c396c
2020-02-05 13:38:52 -08:00
TreeHugger Robot
1527beb31e Merge "Add public docs to AppOpsManager" 2020-02-05 18:07:42 +00:00
Tony Mak
4624cdd12e Merge "Make TCS.getDefaultTextClassifierImplementation returns a ... SystemTextClassifier that is backed by ExtServices" 2020-02-05 14:44:39 +00:00
Charles Chen
bda14d040e Fix that WindowContext token is always null
fixes: 148921212
Test: manual
Change-Id: I5b4a28eb2f6cbe5950edee6876d450f4fc89f46f
2020-02-05 20:25:07 +08:00
Julia Reynolds
e79019393a Merge "Separate concept of VIC from DND" 2020-02-05 12:21:25 +00:00
Automerger Merge Worker
f202e1109a Merge "Remove System APIs not required for R" am: f5f137b9d3 am: 630aacdc73
Change-Id: I1e48c0ebc1fa1089336b3fbf2e4e28a195d6c050
2020-02-05 12:14:54 +00:00
Automerger Merge Worker
630aacdc73 Merge "Remove System APIs not required for R" am: f5f137b9d3
Change-Id: I02925dc4f4810032a7381832187c420253227664
2020-02-05 12:04:38 +00:00
TreeHugger Robot
b85646d57b Merge "Wipe device when COPE PO max password attemps exceeded" 2020-02-05 11:52:38 +00:00
Neil Fuller
1b883e2118 Merge "Remove System APIs not required for R" 2020-02-05 11:47:13 +00:00
Yuhan Zhao
be5015b00a Merge "Intercepting activites that could cause lock task mode violation in ActivityStartInterceptor." 2020-02-05 07:42:49 +00:00
Yunfan Chen
4df25f7aae Do not write recycled icon to TaskDescription parcel
This change prevent the recycled icon from writting to parcel. Some app
may recycle their icon while launch a new activity. Parceling tests is
added for TaskDescription.

Bug: 145504793
Test: Manual test with the reproduce steps in the bug.
Test: atest ActivityManagerTest:testTaskDescriptionParceling
Change-Id: Ib3bbfe6379419a0763c4d9da00cbd6670e488e1c
2020-02-05 16:34:08 +09:00
Jacky Kao
dc50df397b Merge "Changing the return type of takeScreenshot() (1/n)" 2020-02-05 05:53:34 +00:00
Alex Buynytskyy
716588dec9 Minor renaming: IIncrementalManagerNative -> IIncrementalService.
Manager(client)->Service(server) seems to be easier to understand.

Test: builds
Bug: b/136132412 b/133435829
Change-Id: I3bc447fbf7a7aac917df7b4632def75e0da3f1a0
2020-02-05 01:35:06 +00:00
Yvonne Jiang
7f97f732d7 Update secondary lock screen implementation to use the newly updated SurfaceControlViewHost API.
Previously we passed back a SurfaceControl to the keyguard, updated to pass a SurfacePackage instead. The updated SurfaceControlViewHost logic addresses underlying accessibility bugs.

Bug: 136085151
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I4881d5766f118b99f497ee306cd71d3c5a65a2f3
2020-02-04 15:44:13 -08:00
Yuhan Zhao
f3b3d41560 Intercepting activites that could cause lock task mode violation in ActivityStartInterceptor.
Test: Manual
Test: atest WmTests:ActivityRecordTests
Test: atest WmTests:ActivityStartInterceptorTest
Test: atest WmTests:LockTaskControllerTest
Bug: b/131614258
Screenshot: https://screenshot.googleplex.com/hPy1b9NgkNj
Change-Id: Ibba62d4cd0065cab9c46fcb575c207d1a88bd02f
2020-02-04 14:38:39 -08:00
Winson Chung
3d358dba3d Merge "Add lock task check when entering split screen" 2020-02-04 21:39:36 +00:00
jorgegil@google.com
b8ee18f002 Move compat behavior in #onPipRequested to ActivityThread
Removes the pause-hint-resume cycle to trigger PiP out of the
default implementation of #onPictureInPictureRequested and replaces
it with a bool check in its caller in ActivityThread.
This prevents exposing the pause/resume cycle to the public API.

Bug: 148011369
Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests
Test: atest WmTests:ActivityTaskManagerServiceTests
Change-Id: Iec4f602ccf411a31f0cee5a4599cf2fea6f25994
2020-02-04 13:38:25 -08:00
Neil Fuller
4222b7bec8 Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Merged-In: If022a726a058a90cb5446d220628c76800da8e96
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 21:21:34 +00:00
Tony Mak
c5a7432ebf Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices

1. The default textclassifier is always provided by
   config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
   config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
   by calling TCS.getDefaultTextClassifierImplementation(), so that
   they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
    is used to process requests from apps and the platform. Otherwise,
   the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
   can be overridden. If the overridden package is neither
   the default one nor the system one, the package is considered as a
   untrusted text classifier, which can only see requests from itself.

Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
      make sure smart selection works. Run dumpsys textclassification
      to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
      Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
      Run dumpsys textclassification to make sure everything is unbound.
      Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
      Observe that no TC is bound and fallback to NO_OP.

BUG: 148049185

Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
2020-02-04 20:36:52 +00:00
Pavel Grafov
a5b15b2531 Wipe device when COPE PO max password attemps exceeded
With this change when DPMS decides what user to wipe, it takes COPE
status into account.

Bug: 144978468
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I3841b04321090fdc035da91fdc1febea397640bb
2020-02-04 19:46:09 +00:00
Philip P. Moltmann
9e36700b49 Add public docs to AppOpsManager
Test: Built
Bug: 148816360
Change-Id: I5560ed20104a7a13f67dec3e8989a405b54d5fb7
2020-02-04 11:27:20 -08:00
Julia Reynolds
24edc00304 Separate concept of VIC from DND
(Very important conversations). Track VICs in a different
field, and update DND (and public apis) to allow
all, important, or no conversations through.

Test: atest, cts
Bug: 137397357

Change-Id: Iae04546eb7c0b1e79cfdbeec7311628cd7ad634a
2020-02-04 14:23:46 -05:00
Neil Fuller
567a91279f Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 18:59:23 +00:00
TreeHugger Robot
26fc52f729 Merge "enable dynamic binding in AppPredictionSession" 2020-02-04 17:50:32 +00:00
TreeHugger Robot
8b39a3373f Merge "Don't callback twice for app op changes in PermissionPolicyService." 2020-02-04 07:23:50 +00:00
TreeHugger Robot
5f87e0dfee Merge "Make the disconnecting list from activity up-to-date" 2020-02-04 05:29:04 +00:00
Hai Zhang
f4ef0394bb Don't callback twice for app op changes in PermissionPolicyService.
If an app op change is made while syncing app ops from permissions, we
know it's being set to our desired state and don't need to be notified
again. This cuts the performance cost to at least half of what it was,
and prevents potential looping.

Bug: 136503238
Bug: 147673896
Bug: 146039935
Bug: 148706747
Test: manual
Change-Id: I643472800c0dfbf96c202093a697f0a72eee0780
2020-02-03 14:49:35 -08:00