Commit Graph

20525 Commits

Author SHA1 Message Date
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
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
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
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
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
Yuri Lin
048571dd57 Remove notification channels from history when they're deleted.
To make this possible, this change adds functionality for notification channel removal to NotificationHistory, NotificationHistoryDatabase, and NotificationHistoryManager and corresponding tests.

This change does not remove the notifications from deleted channels from the "recently dismissed" list (stored in mArchive); will follow up with that later.

Test: atest NotificationHistoryTest, NotificationHistoryDatabaseTest, NotificationManagerServiceTest; manual via creating channels, deleting them and verifying
Bug: 169349809

Change-Id: I7b1c137e516d14703665750f06554ac7ca44c90e
2021-04-05 10:49:07 -04:00
Julia Reynolds
47fe65234f Merge "Allow apps to migrate NLS filter settings" into sc-dev 2021-04-05 13:30:57 +00:00
Svetoslav Ganov
6f7e03244d Merge "Hookup renounced permissions" into sc-dev 2021-04-05 00:55:30 +00:00
Jeff DeCew
7116f04929 Merge "Fix NPE in obtainThemeColor due to use of Mocks" into sc-dev 2021-04-02 20:52:37 +00:00
Nate Myren
ee9a4741d4 Make note/startOperation return SyncNotedAppOp, add mode
Use the SyncNotedAppOp when collecting self/sync ops in AppOpsManager.
Also adds "mode" to SyncNotedAppOp

Fixes: 184111263
Test: Atest AppOpsServiceTest
Change-Id: Ia20c7054d06e241cbe017a641d728e11c7eccd06
2021-04-02 13:24:21 -07:00
Caitlin Cassidy
4be0810f5b Merge "[Ongoing Call Chip] Add feature flag + controller" into sc-dev 2021-04-02 18:12:20 +00:00
Jeff DeCew
6ec691868b Fix NPE in obtainThemeColor due to use of Mocks
Fixes: 184358158
Test: atest DisconnectedCallNotifierTest
Change-Id: Ia561e262e288d71b93cc18e842eefcba054a32d8
2021-04-02 13:32:26 -04:00
Svet Ganov
48801b0bbd Hookup renounced permissions
Propagate renounced permissions from context params
to the context attribution source. Throw if one
tries to request at runtime a renounced permission.

Also make the AttributionSource take null for the
setters to ease usage, otherwise folks should always
check for null before calling a builder method.

Additionally, we allow apps that have UPDATE_APP_OPS_STATS
to register arbitrary trusted AttributionSource for
testing. Note that this permission allows abritrary app
op operations, thus we are not relaxing the security
model.

bug: 158792096

Test: atest CtsPermission5TestCases

Change-Id: I4330684bb8695fb998cf31e9363b94ad981ba2cc
2021-04-02 17:30:10 +00:00
Julia Reynolds
0e36d959d0 Allow apps to migrate NLS filter settings
On a per user vs manifest wide basis.

Test: atest, cts-verifier
Bug: 184027330
Change-Id: Iae591765e410e360f289692bac012a1f26574add
2021-04-02 17:04:58 +00:00
Jeff Sharkey
a1d8bbb3ba Merge changes from topic "uwb_ranging_permission" into sc-dev
* changes:
  Add a new uwb ranging app-ops
  Add a new uwb ranging runtime permission
2021-04-02 14:45:57 +00:00
Roshan Pius
f5b1cf217e Add a new uwb ranging app-ops
This will be part of the nearby devices permission group.

Bug: 183904955
Test: Compiles
Change-Id: I8d225f6b9f40cc106aeb5ad661282cd394d7b826
2021-04-01 14:07:35 -07:00
Caitlin Cassidy
6a0fdd47e5 [Ongoing Call Chip] Add feature flag + controller
Bug: 183229367
Test: atest ran and manual
Change-Id: I8f754f4d894999a4bd5c13db81324e9abe204747
2021-04-01 18:38:54 +00:00
Jeff DeCew
2016350655 Merge "Remove unused code" into sc-dev 2021-04-01 16:24:26 +00:00
Jeff DeCew
9c95884765 Merge "Notification color fixes" into sc-dev 2021-04-01 14:34:45 +00:00
Kholoud Mohamed
58d0a2a950 Merge "Remove DATA_SHARING_RESTRICTION_CHANGED broadcast" into sc-dev 2021-04-01 14:21:00 +00:00