Commit Graph

20541 Commits

Author SHA1 Message Date
Charles Chen
030a75463e Merge "Enable WindowContext to associate with WindowToken" into sc-dev 2021-04-13 14:29:44 +00:00
Charles Chen
a5b660e386 Enable WindowContext to associate with WindowToken
This CL instroduces WMS#attachWindowContextToWindowToken
and the corresponding API in WindowContextController to make
WindowContext able to associate with a WindowToken.

Test: atest WindowContextControllerTest
Test: atest WindowManagerServiceTests#testAttachWindowContextToWindowToken*
Bug: 159767464

Change-Id: I807a67fba149cbdc4267442bab0b64e6a95bd4b5
2021-04-13 15:55:49 +08:00
Riddle Hsu
a77a0600cf Merge "Remove obsolete test APIs of split screen" into sc-dev 2021-04-13 02:20:37 +00:00
Meng Wang
6517e68d15 Merge "Revert "PasswordPolicy.getMinMetrics PIN"" into sc-dev 2021-04-12 23:22:21 +00:00
Meng Wang
3c167fe9ca Revert "PasswordPolicy.getMinMetrics PIN"
This reverts commit 8dd5021359.

Reason for revert: DroidMonitor: Potential culprit for Bug 185150796 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 185150796
Change-Id: Ie6809d9e20b5c32c076e7a790095c65a2295781a
2021-04-12 22:26:57 +00:00
Felipe Leme
6ebf3703f2 Merge "Documents that wipeData() is allowed for apps with MASTER_CLEAR permission." into sc-dev 2021-04-12 20:29:04 +00:00
Chloris Kuo
cfab1005d3 Merge "NAS Settings Migration" into sc-dev 2021-04-12 17:16:57 +00:00
Alex Johnston
60e65b4b6f Merge "PasswordPolicy.getMinMetrics PIN" into sc-dev 2021-04-12 15:45:06 +00:00
Mady Mellor
02b75bb425 Merge "API Update: extra_is_bubbled -> Activity#isLaunchedFromBubble" into sc-dev 2021-04-12 14:53:01 +00:00
Eran Messeri
b056b2c7bc Merge "Rename Enterprise Network Preference to Preferential network service" into sc-dev 2021-04-12 13:02:25 +00:00
Riddle Hsu
f6da995b05 Remove obsolete test APIs of split screen
The methods setTaskWindowingMode and resizePrimarySplitScreen
can be replaced with the methods of WindowContainerTransaction
and TaskOrganizer.

Bug: 174040691
Test: CtsWindowManagerDeviceTestCases

Change-Id: I975457887a87464456675010c7531738fa5f62f4
2021-04-12 17:47:37 +08:00
Eran Messeri
9ac9fe53bf Merge "Address API review for admin-granted permissions" into sc-dev 2021-04-11 11:44:26 +00:00
Jimmy Shiu
4c6e5036b7 ADPF: PerformanceHintManager API implementation
Test: Manual test, run bouncy ball
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Bug: 158791282
Change-Id: Ia0bf2b06675b8cf57cdf1668ee90e98026416439
Signed-off-by: Wei Wang <wvw@google.com>
2021-04-10 10:21:17 -07:00
Rubin Xu
2c34160c28 Merge "Recognize numeric PIN in resetPasswordWithToken()" into sc-dev 2021-04-09 23:21:18 +00:00
Chloris Kuo
3f03f51421 NAS Settings Migration
Change default NAS to AiAi for Pixel devices

Bug: 173106358
Test: manually on device, atest
Change-Id: I2fe0b3eed479188509df5ce65d1b2a1281e6c85a
2021-04-09 11:21:33 -07:00
Mady Mellor
3c0890601d Merge "API feedback: setSuppressableBubble/setSuppressBubble" into sc-dev 2021-04-09 17:49:12 +00:00
Rubin Xu
f5d0b425d4 Recognize numeric PIN in resetPasswordWithToken()
If the new password is numeric only, treat it as numeric
PIN when setting it as new lockscreen password.

Bug: 172054475
Bug: 181489206
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: Ie15f1966a76344d3bb8e8778599fbd604bfa8c69
2021-04-09 13:39:27 +01:00
Eran Messeri
a23111e74c Rename Enterprise Network Preference to Preferential network service
Rename the logging constant for the "Enterprise Network Preference" to
"Preferential Network Service".

Bug: 183663019
Test: atest FrameworksServicesTests:DevicePolicyManagerTest android.admin.cts.DevicePolicyManagerTest#testSetGetPreferentialNetworkServiceEnabled  com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetGetPreferentialNetworkServiceStatus com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetPreferentialNetworkServiceStatusLogged
Change-Id: I24508b42b3820091760c372d18a9f6157cd53d50
2021-04-09 12:39:21 +01:00
Charles Chen
c22aff4e4d Merge "Allow config context to inflate views" into sc-dev 2021-04-09 06:56:16 +00:00
Jeff Sharkey
7627719334 Merge "New BLUETOOTH_ADVERTISE manifest permission." into sc-dev 2021-04-09 05:22:23 +00:00
Jeff Sharkey
6dcac06a84 New BLUETOOTH_ADVERTISE manifest permission.
This change is part of defining a distinct BLUETOOTH_ADVERTISE
permission to guard the BluetoothLeAdvertiser APIs, since that's a
distinct enough of an operation from SCAN and CONNECT.  It'll
continue to be covered under the general "Nearby devices" runtime
permission group.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Change-Id: I8b62e4d625df1e201f12a73025cd29c431feea79
2021-04-08 20:15:02 -06:00
Steven Moreland
8e6aa6679e reflect libbinder/am split
(manual cherry-pick from AOSP to fix merge conflict)

Minimizing cost for using libbinder.

Bug: 183654927
Test: boot
Change-Id: I1a4785a58afcaf2d312ef52a07f41fe3dd3a8fa6
2021-04-08 23:56:27 +00:00
Ruslan Tkhakokhov
a10dc432ae Merge "[FSD2D] Remove left-over code from proof-of-concept" into sc-dev 2021-04-08 20:41:54 +00:00
Felipe Leme
ef5d119cd7 Documents that wipeData() is allowed for apps with MASTER_CLEAR permission.
Test: none
Bug: 169779216

Change-Id: Ic1e95efe77ca5289db6993caaffd590fcc1210cd
2021-04-08 13:25:49 -07:00
Mady Mellor
4da856e1ef API feedback: setSuppressableBubble/setSuppressBubble
Apps can't actually suppress the bubble, that is only
done by the system so that method is @hide.

Did a similar thing for setSuppressNotification for
consistency.

Test: atest NotificationManagerTest (see CTS CL)
Bug: 184204395
Change-Id: Ia17453507daf5bba4408bd6b386efa225c3051dd
2021-04-08 19:26:14 +00:00
Mady Mellor
a7e6b9481b Merge "API feedback: make bubble pref an int def" into sc-dev 2021-04-08 19:12:53 +00:00
Svetoslav Ganov
64b26b5c49 Merge "Activity recognition source app op tracking" into sc-dev 2021-04-08 18:34:58 +00:00
Ruslan Tkhakokhov
cd425e62c6 [FSD2D] Remove left-over code from proof-of-concept
This code was not meant to be shipped and was disabled by default. It
was accidentally enabled when productionizing the final version of FSD2D.

Bug: 184781934
Test: 1. atest CtsBackupTestCases
      2. atest CtsBackupHostTestCases
      3. Run a D2D transfer and verify system apps are properly restored
Change-Id: I47dbc769a316b17a38b6c21d7a1294d7ff977491
2021-04-08 17:35:50 +00:00
Alex Johnston
8dd5021359 PasswordPolicy.getMinMetrics PIN
* If the password quality is NUMERIC
  or NUMERIC_COMPLEX, the credential
  type should be CREDENTIAL_TYPE_PIN

Bug: 184103377
Test: atest com.android.server.devicepolicy.PasswordPolicyTest
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
      CtsVerifier > Device owner tests > policy transparency test
      > set password quality
Change-Id: If0b1fbc71bbd0b4e59bc05594cd14e99a32d8bd1
2021-04-08 15:51:22 +00:00
Neil Fuller
3556ad854b Merge "Adjust geotz feature config logic" into sc-dev 2021-04-08 13:28:50 +00:00
Kholoud Mohamed
45dc22e11c Merge "Add set/verify lock credentials testAPIs in KeygyardManager" into sc-dev 2021-04-08 00:38:36 +00:00
Sudheer Shanka
9576b5a2be Merge "Allow clients to register for listening to changes in capabilities." into sc-dev 2021-04-07 20:18:04 +00:00
Eran Messeri
1663624e5d Address API review for admin-granted permissions
Address API review for changes related to admin-granted permissions:
* Change the provisioning extra to indicate it only affects
  sensors-related permissions.
* Add an IntDef for the AdminPermissionControlParams grant state.

Bug: 184204476
Bug: 184204334
Test: atest ManagedProvisioningTests
Change-Id: I75c8b6de1e897e02916b17f0ae3a521f8384c242
2021-04-07 19:03:44 +01:00
Mady Mellor
813fc2af2c API feedback: make bubble pref an int def
Test: TH
Bug: 184204590
Change-Id: Ie8b138e8686dc8be89dbb9ef0698552040e89c8d
2021-04-07 10:34:46 -07:00
Makoto Onuki
779f120a91 Merge "Use descriptive exception for FGS start timeout" into sc-dev 2021-04-07 17:31:11 +00:00
Charles Chen
d12be75275 Allow config context to inflate views
Besides UI contexts, the context created via
Context#createConfigurationContext with a proper configuration
should be allowed to inflate views or obtain ViewConfiguration.
An example is that a wear device inflate views into bitmap and pass
the bitmap to the Wear OS Companion app on the phone.

Bug: 177847640
Test: atest StrictModeTest

Change-Id: Iab232a80a973f54bf0484262d45af3e4c2f0e5dc
2021-04-07 21:58:42 +08:00
Neil Fuller
59ff2dca0e Adjust geotz feature config logic
A set of related changes under the heading of "configuration logic
changes".

The ability to 'discover' the package of a LTZP has been removed. A
provider's package name must now match the package name held in
config.xml. This takes advantage of changes in ServiceWatcher (which,
due to a recent change, no longer insists on specific configuration
options). It will allow the package name to be determined at runtime via
server flags in a future change, which will make future testing easier.

The overall location time zone detection feature can also now be
configured on and will not "show up" if there are no providers currently
enabled. The ability to have the location time zone detection feature
"supported" on the device be on and not have it "show up" in the UI when
there are no providers will make testing easier when the secondary
provider has been removed from AOSP (bug 178169250).

To remove command line duplication of things that can now be achieved
via device_config (AKA server flags), there have been various command
line changes. It is also now possible to override a provider's "mode"
via the command line to be "enabled". Previously, a provider could only
be disabled or set into a simulation mode via the command line, which
assumed the default state was "enabled" (bug 178169250).

Bug: 175718363
Bug: 178169250
Test: See the associated change in cts/
Change-Id: I0d3314155cef4f122cae0d569b4687b658e777b1
2021-04-07 13:47:32 +00:00
Jeff DeCew
03a220d6ca Merge "Revert color of expand button on unread conversations" into sc-dev 2021-04-07 13:07:05 +00:00
Ashwini Oruganti
35871022c3 Merge "Enforce the PendingIntent mutability flag requirement for chrome" into sc-dev 2021-04-06 22:26:03 +00:00
Makoto Onuki
9de6e4e26b Use descriptive exception for FGS start timeout
If the app doesn't call startForeground() in time, throw a new exception
ForegroundServiceDidNotStartInTimeException.

Test: Manual test with a test app:
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: FATAL EXCEPTION: main
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: Process: com.google.omakoto.testapp, PID: 9078
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: android.app.ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{92c1599 u0 com.google.omakoto.testapp/.MyFgs}
04-01 15:24:39.438 10293  9078  9078 E AndroidRuntime: 	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1894)

Bug: 124137635
Change-Id: I7d97e15ba47a32a242fb461e7312adf3f28ab3a6
2021-04-06 12:03:36 -07:00
Svet Ganov
99d6115e99 Activity recognition source app op tracking
The activity recognition source may access activity
recognition in its operation as being the activity
recognition source. Accesses from an AR source
(for special tags it designates - the APK may contain
other components) for location and AR are tracked in
a dedicated app op.

bug: 182204957

Test: atest CtsActivityRecognitionTestCases

Change-Id: If29fba1c51d70a2806a0907a73a96d3d8d7a3100
2021-04-06 11:59:03 -07:00
TreeHugger Robot
0751e1b15f Merge "Make note/startOperation return SyncNotedAppOp, add mode" into sc-dev 2021-04-06 18:34:05 +00:00
Kholoud Mohamed
a09e44982d Merge "Add testAPI to get adopted shell permissions." into sc-dev 2021-04-06 16:50:05 +00:00
Jeff DeCew
57851315bd Revert color of expand button on unread conversations
Fixes: 183710694
Test: manual
Change-Id: I2cc6d98f9a8ede430a69a7d37ec32c05e41b8759
2021-04-06 11:15:58 -04:00
Jeff DeCew
6a39b82e8b Merge "Do not highlight group expanders" into sc-dev 2021-04-06 15:10:57 +00:00
kholoud mohamed
60742372cb Add set/verify lock credentials testAPIs in KeygyardManager
Added the following testAPIs that are guarded by
SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS and
ACCESS_KEYGUARD_SECURE_STORAGE permissions:
* setLock
* checkLockCredentials

Also refactored methods out of LockPatternUtils
to LockSettingsService to allow clearing the caller identity.

Test: atest com.android.server.locksettings
Test: atest LockscreenCredentialTest
Test: atest PasswordComplexityTest after replacing usage of adb
commands with the new testAPIs
Bug: 182260585
Change-Id: Idc0432773c92ada9deb3e370526cb2ce219595dc

Change-Id: I28cbe6093a56a231022c61a6821accf01d28cda6
2021-04-06 15:15:36 +01:00
kholoud mohamed
0ac02444e8 Add testAPI to get adopted shell permissions.
Added a new testAPI in UiAutomation to get the currently adopted
shell permissions using adoptShellPermissionIdentity.

Test: atest UiAutomationTest
Bug: 183716601
Change-Id: I66a6c753480cecf971f7354daaddbb404f5c1453
2021-04-06 14:08:03 +00:00
Roshan Pius
a88aa31269 UwbManager: Use AttributionSource for runtime permission enforcement
This attribution source is going to be used by Gmscore to proxy
the blame for uwb_ranging runtime permission check (since Gmscore which
is the direct caller of this surface is in most cases proxying the
request from 1p/3p apps).

Note: This CL just adds the skeletal API to start the API reviews. The
actual implementation needs a major refactor of the stack which is WIP.

Bug: 183904955
Test: atest android.uwb
Change-Id: Ia0338b573306f44c493bf1c136e68b4f46877816
2021-04-05 17:31:31 -07:00
Jeff DeCew
018dd31970 Do not highlight group expanders
Bug: 181048615
Test: manual
Change-Id: I491e0cf5aeb97bf6baf13a467481dd799893106e
2021-04-05 20:21:06 +00:00
Sudheer Shanka
ce7fc42291 Allow clients to register for listening to changes in capabilities.
Clients can register for listening to changes in procstates and if
they are only interested in knowing if the procstate crosses a certain
threshold, they can specify a "cutpoint" and they will only get
a callback if the procstate crosses that "cutpoint" but clients cannot
use this if they are also interested in changes in capabilities. So,
add a way for clients to use the "cutpoint" facility and also listen
to changes in capabilities.

Bug: 177641226
Test: atest services/tests/servicestests/src/com/android/server/am/ActivityManagerServiceTest.java
Test: atest services/tests/servicestests/src/com/android/server/am/UidObserverControllerTest.java
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I1198e602ca81382975500b10f930dacfd16919e3
2021-04-05 10:55:57 -07:00