Commit Graph

16857 Commits

Author SHA1 Message Date
Automerger Merge Worker
655ad4a8f5 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975 am: e219088375
Change-Id: Ie4ede0037ee0c209e31c572c805948a17a83a6e4
2020-01-08 22:41:08 +00:00
TreeHugger Robot
22f2eb7208 Merge "Update Add/Remove Configuration" 2020-01-08 22:28:35 +00:00
Automerger Merge Worker
e219088375 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" am: f428f58080 am: 33d3e85975
Change-Id: Id3ea80c30e149588a6d97f02df978f258dda3495
2020-01-08 21:13:09 +00:00
Hall Liu
f428f58080 Merge "Add setDisabledForSimNetworkLock to StatusBarManager" 2020-01-08 20:54:48 +00:00
Eran Messeri
76a011ba2a Merge "DPM: Add method for Organization-owned device detection" 2020-01-08 19:35:46 +00:00
Neil Fuller
540f003086 Merge "Rename android.util.TimestampedValue to android.os" 2020-01-08 19:35:27 +00:00
Jeffrey Huang
94eafe74a3 Update Add/Remove Configuration
Test: GTS Tests
Bug: 146383400
Change-Id: Ibcd6802468fa3be3ffde4357b37060711deff9b3
2020-01-08 10:52:25 -08:00
Jeffrey Huang
df1b6de06c Merge changes Id640e568,I26348987,I9da3526d
* changes:
  Update getReports
  Update getStatsMetadata
  Update getRegisteredExperimentIds
2020-01-08 18:06:42 +00:00
Neil Fuller
d159015e54 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
2020-01-08 17:00:34 +00:00
Eran Messeri
a1015c8c95 DPM: Add method for Organization-owned device detection
Add a method to the DevicePolicyManager for finding out if the device is
an organization-owned device with a work profile (i.e. it has a work
profile but the work profile was created during the provisioning flow).

This method is currently available for privileged callers (system API),
since other methods (e.g. isDeviceManaged) are also restricted.

NOTE: Addition of GTS tests is pending final decision on whether this
will be public API or not.

Bug: 143518237
Bug: 144978467
Bug: 147340575
Test: atest FrameworksServicesTests:DevicePolicyManagerTest#testIsOrganizationOwnedDevice
Test: CTS tests that are on hold for now.

Change-Id: I26ce1de10844dc297924427a6d46df9208931ab0
2020-01-08 16:02:44 +00:00
TreeHugger Robot
aff43dbc03 Merge "Add pre-dump for input ANR" 2020-01-08 05:28:43 +00:00
Srinivas Paladugu
edfdd4153a Merge "Add new dpm api to disable user control over apps" 2020-01-08 01:32:55 +00:00
Jeffrey Huang
04f948b450 Update getReports
Test: GTS Tests
Bug: 146383638
Change-Id: Id640e568d41c5f30e7c42a06addfba644061c706
2020-01-07 17:15:52 -08:00
Jeffrey Huang
9613a973a2 Update getStatsMetadata
Test: GTS Tests
Bug: 146384074
Change-Id: I263489874616d4ed5d16f2796fa74c740059a35a
2020-01-07 17:15:52 -08:00
Jeffrey Huang
80c9a975d7 Update getRegisteredExperimentIds
Bug: 146384076
Test: GTS Tests
Change-Id: I9da3526d97d5adef423c69366f50fac59a1d6247
2020-01-07 17:15:51 -08:00
TreeHugger Robot
e4f93070ed Merge "Collect historical appops by feature" 2020-01-07 19:20:21 +00:00
Riddle Hsu
1286b571ff Add pre-dump for input ANR
If an input ANR is caused by the lock of window manager
or activity manager is held for a long time, we usually
get an unhelpful stack traces because the ANR reporting
is also blocked by the locks.

The pre-dump checks if the locks cannot be acquired within
a timeout, then dump the stack trace at the beginning of
notifying ANR.

Bug: 144987910
Test: 1. Launch a simple app.
      2. Set break-points inside the lock of window manager
         and activity manager.
      3. Press back key and wait 5s.
      4. Check the path /data/anr/ in device. There should
         be a filename ends with "_pre".

Change-Id: I9831a31e17661d822572c73e64fe9980fe018b22
2020-01-07 17:30:54 +00:00
TreeHugger Robot
e131981931 Merge "Log to SecurityLog if camera is disabled by admin" 2020-01-07 14:00:28 +00:00
Kholoud Mohamed
b848a1017c Merge "Add default cross-profile package APIs" 2020-01-07 11:29:09 +00:00
Kholoud Mohamed
ae9545e102 Merge "Add INTERACT_ACROSS_PROFILES appop" 2020-01-07 11:28:18 +00:00
Automerger Merge Worker
8303c9def2 Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756 am: ef100e45fe
Change-Id: Ie4ab2ecaa0778fa6ff7d75e5677dfb4bed1d443d
2020-01-07 10:45:04 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Jeffrey Huang
89e95d5b5f Merge changes I1510e44b,I9313299e,I7df5c644
* changes:
  Update setBroadcastSubscriber
  Update activeConfigsChangedBroadcast
  Creating PendingIntentRef
2020-01-07 02:18:22 +00:00
Automerger Merge Worker
2d3c66da00 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7 am: cccf7a2b84
Change-Id: Id3b15d9d4d58235034405c85b7e10fc42f3e4172
2020-01-07 01:12:52 +00:00
Automerger Merge Worker
cccf7a2b84 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" am: 2ada7fbac2 am: b128b793c7
Change-Id: Icee2c41d635883c6b9ede6bf6ec3bbfda22cdc1f
2020-01-07 01:01:54 +00:00
Hall Liu
2ada7fbac2 Merge "Clean up SmsApplication and expose getDefaultSmsPackage" 2020-01-07 00:36:51 +00:00
Jeffrey Huang
4f2e6bd68d Update setBroadcastSubscriber
change #setBroadcastSubscriber and #unsetBroadcastSubscriber
to avoid using intentsender

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I1510e44bcdf49b579fd49f51081c6a40618039fa
2020-01-06 16:25:41 -08:00
Jeffrey Huang
47537a1c58 Update activeConfigsChangedBroadcast
avoid using intentsender in #sendActiveConfigsChangedBroadcast
and #removeActiveConfigsChangedBroadcast.

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I9313299ea0bc89f092b1c62fbfc34e06a127eaa9
2020-01-06 16:25:41 -08:00
Jeffrey Huang
ad21374842 Creating PendingIntentRef
Update #setDataFetchOperation to avoid using intentsender.

Bug: 146074295
Test: Ran GTS Tests
Change-Id: I7df5c6441725aa4e46fac18925664c9455f50fb9
2020-01-06 16:25:41 -08:00
Winson Chiu
b07e14152b Merge "Test InstantAppResolverService method fallback" 2020-01-07 00:20:51 +00:00
Hall Liu
9ded659a50 Add setDisabledForSimNetworkLock to StatusBarManager
Add a new @SystemApi disable utility method to allow telephony's
mainline module to disable the status bar when the device is SIM-locked

Bug: 146834818
Bug: 138956541
Test: atest StatusBarManagerTest
Change-Id: Id3757fc560c5b70bed553f19b050524a024b4c78
2020-01-06 15:47:45 -08:00
Philip P. Moltmann
4aacd7138f Collect historical appops by feature
This
- pipes through the featureId from AppOpsService to HistoricalRegistry
- changes the file format of historical app ops by adding the feature-id
  tag. This will make us loose all previously collected app-ops. This is
  ok as we never shipped a device with historical app-ops enabled
- Adds a new layer to the HistoricalOps hierarchy. For backwards
  compatibility it is possible to go directly from package to op. In this
  case a combined HistoricalOp object is generated on the fly.
- It is possible to filter historical ops requests by featureId.
  Unfortunately a 'null' featureId is a valid ID. Hence there is now a
  dedicated mask of paramters to filter for (@HistoricalOpsRequestFilter).
- Fixes the equals methods of HistoricalOp by implementing an equals
  method for LongSparseLongArray

Test: atest CtsAppOpsTestCases AppOpsServiceTest
Bug: 136595429
Change-Id: I92c41e8ae2cd471051c2d628d49a3ad6a5a66330
2020-01-06 14:42:56 -08:00
Automerger Merge Worker
070e602547 Merge "Add new permissions" am: 62ace8c46a am: c0f9b27214 am: ec776dfda9
Change-Id: I8193a10bef4d829f41fd2609b571c9fa52365783
2020-01-06 21:35:59 +00:00
Automerger Merge Worker
ec776dfda9 Merge "Add new permissions" am: 62ace8c46a am: c0f9b27214
Change-Id: I2114c613729f0d84d773b7e8b58402cda302a8c8
2020-01-06 21:20:53 +00:00
Neil Fuller
62ace8c46a Merge "Add new permissions" 2020-01-06 19:38:25 +00:00
Automerger Merge Worker
9db2625b56 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b am: fc94ebae09 am: fe03e4c510
Change-Id: Ic7f014d01c361f43d91b811d8dbfb48aa66d0a1a
2020-01-06 19:01:10 +00:00
Automerger Merge Worker
fe03e4c510 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b am: fc94ebae09
Change-Id: I24a825364458eafd6d101d47a1cd467d7401cc42
2020-01-06 18:41:36 +00:00
Automerger Merge Worker
fc94ebae09 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b
Change-Id: Id0683ebab467f7baaac1650b15dd8e98f8057306
2020-01-06 18:24:58 +00:00
Automerger Merge Worker
edcfda720b docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8
Change-Id: I32360f63be584c4223c6aae692beb48c0bdf4802
2020-01-06 18:13:01 +00:00
kholoud mohamed
fff057610a Add default cross-profile package APIs
Add cross_profile_apps.xml and
DevicePolicyManager#getAllCrossProfilePackages. This sets the list of default package names set by the OEM for the user to approve/disapprove for
cross profile communication during managed provisioning setup.

Some Javadoc can be improved once all CLs are in, since different APIs
should refer to each other.

BUG: 136249261
BUG: 144577776
BUG: 145970297
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest

Change-Id: I214b521ffc7fb0179bff1ca65d6bc2a9f8decea3
2020-01-06 17:52:02 +00:00
kholoud mohamed
20ded1f79a Add INTERACT_ACROSS_PROFILES appop
Also, removes the 'privileged' protection level from the INTERACT_ACROSS_PROFILES permission and replaces it with 'appop'. 'Wellbeing' is also added temporarily, which will also be removed in this release.

This is part of a change to enable users to consent to cross profile app communications

BUG: 136249261
BUG: 144577776
BUG: 141690885
Test: atest AppOpsTest
Test: atest PermissionPolicyTest

Change-Id: I910daf7605f83946af171f38db002b920079f30b
2020-01-06 16:55:05 +00:00
Alex Johnston
e81f05cbce setTime and setTimeZone callable by profile owner of org-owned device
Modified setTime and setTimeZone to be callable by a a profile owner
of an organization-owned device as well as a device owner.

Bug: 138709470
Test: Manual testing with testdpc and the set auto time zone toggle
      atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetTime

Change-Id: I2de94035c20fc53cdd629860c84f237f3e7eaa1f
2020-01-06 11:06:36 +00:00
Shafik Nassar
729e4d7422 Merge "Add permission for MANAGE_EXTERNAL_STORAGE AppOp" 2020-01-06 07:09:11 +00:00
Philip P. Moltmann
54354063a9 Merge "Collect AsyncNotedAppOp in same call as noteOp" 2020-01-04 03:24:00 +00:00
TreeHugger Robot
a812432da3 Merge "Remove obsolete comment from AppOpManager" 2020-01-03 20:49:33 +00:00
Philip P. Moltmann
da554e4de0 Collect AsyncNotedAppOp in same call as noteOp
This reduces the overhead of collecting noted app-ops to the same amount
of binder calls as if we would not have the feature

Before (conceptionally):
---------------------------------
mode = service.noteOp()
if (mode == allowed && shouldCollectAsyncOp) {
   fixup(message)
   service.noteAsyncOp()
}
----------------------------------

After (conceptionally):
----------------------------------
if (shouldCollectAsyncOp) {
   fixup(message)
}
mode = service.noteOp(shouldCollectAsyncOp, message)
----------------------------------

Bug: 136505050
Test: atest CtsAppOpsTestCases
Change-Id: If1b535a7c4b0f431f251c5d06cdf496c34920e23
2020-01-03 12:37:23 -08:00
Kevin Hufnagle
08a4e470b8 docs: Fix typo in IMPORTANCE_SERVICE description
Test: make ds-docs -j32

Bug: 140783404

Change-Id: Ife86109eebefe9c87f7c9ed4a0587676e3392d90
Exempt-From-Owner-Approval: Docs-only change
2020-01-03 20:05:31 +00:00
shafik
fc2130239d Remove obsolete comment from AppOpManager
Test: build
Change-Id: I6222c5f21b45adec10fbbf3b81030769424a8931
2020-01-03 19:40:43 +00:00
shafik
77cabc750b Add permission for MANAGE_EXTERNAL_STORAGE AppOp
Add new MANAGE_EXTERNAL_STORAGE permission. Couple it with
OP_MANAGE_EXTERNAL_STORAGE. Protection level for the permission is
currently signature|appop but will probably change later to |preinstalled.

Bug: 146425146
Test: device boots
Test: atest CtsPermission2TestCases:android.permission2.cts
            .RuntimePermissionProperties#allAppOpPermissionNeedAnAppOp
Change-Id: I0298ca0f6f463c88b95da6ba9853d061c6983da2
2020-01-03 19:32:07 +00:00