Commit Graph

16843 Commits

Author SHA1 Message Date
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
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
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
Philip P. Moltmann
d8c0bda6a6 Use Pools for noteOp related data objects
... to avoid too frequent allocations of small objects.

There is no pool for NoteOpEvent objects as they are only freed in very
uncommon situation. Hence they are directly reinited instad of going
through a pool.

Test: atest CtsAppOpsTestCases
Bug: 136595429
Change-Id: Ia39ca9682771cbc44ddbeaadc55f7e3f17c86449
2020-01-03 10:08:03 -08:00
TreeHugger Robot
f0031d2eba Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-03 17:58:18 +00:00
Rubin Xu
3ea0f6f3ef Log to SecurityLog if camera is disabled by admin
This is part of the NIAP audit logging requirement.

Bug: 137937540
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testSecurityLoggingWithSingleUser
Change-Id: I4fe1e856337787dcd4fbe1b25ff2e9e5a18c2ce9
2020-01-03 13:27:55 +00:00
Automerger Merge Worker
08c2f021de Merge "Use ro.product.vndk.version for unbundled product apks" am: cbfcd44f68 am: e0e165f06e am: bbce9e0c5a
Change-Id: I781e0f1f9e70e584b986d5b2c7e7e87804c52157
2020-01-03 07:51:13 +00:00
Automerger Merge Worker
bbce9e0c5a Merge "Use ro.product.vndk.version for unbundled product apks" am: cbfcd44f68 am: e0e165f06e
Change-Id: I6507b31c3a1b36830a231064e560d978b9427f5c
2020-01-03 07:36:52 +00:00
Justin Yun
1ef374f98b Use ro.product.vndk.version for unbundled product apks
Instead of using "ro.product.apps.unbundled", use
"ro.product.vndk.version" to determine if product apks are unbundled.
"ro.product.vndk.version" will be defined by
PRODUCT_PRODUCT_VNDK_VERSION. If it is defined, all product apks must
be unbundled.

Bug: 144534640
Bug: 127738095
Bug: 128557860
Test: boot and check logs if product apps are loaded successfully
Change-Id: I6d0f7c20e131dfe12203c63a14e6254a8223893b
2020-01-02 06:30:02 +00:00
Hall Liu
35c243caa4 Clean up SmsApplication and expose getDefaultSmsPackage
- Clean up usages of hidden AppOpsManager APIs in SmsApplication
- Add unit tests for SmsApplication
- Expose RoleManager#getDefaultSmsPackage for use in SmsApplication.

Bug: 146834818
Test: atest SmsApplicationTest
Change-Id: I4ab49d7f6274389e7de7cd7223cab3c433936044
2019-12-31 14:41:02 -08:00
Tej Singh
b8f296da22 Unit tests for PullAtomMetadata
Bug: 146385269
Test: bit FrameworksCoreTests:android.app.PullAtomMetadata
Change-Id: I4c78d2744348dbab6ee792caa0a7a8bbd3c17f28
2019-12-30 13:04:46 -08:00
Daulet Zhanguzin
0af97d60d7 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I42117ebfb640e3b0b133183e5e146860bed8471a
2019-12-30 15:41:28 +00:00
Chavi Weingarten
9ec9264138 Merge "Removed regionId from updateTapExcludeRegion request." 2019-12-27 16:24:50 +00:00
chaviw
aa0d74e6c6 Removed regionId from updateTapExcludeRegion request.
There was no need for regionId in the request since you can just replace
the previous region with a new one. This reduces confusion and
simplifies the code. This also allowed TapExcludeRegionHolder to get
deleted and just store the excluded region in the WindowState.

Additionally, this fixed a bug where the excluded region would get
overwritten when the window region was smaller. If the window region was
resized later, the exclude region would remain small.

This is also preparing for more uses of this API with embedded windows
and window magnification.

Test: ActivityViewTest
Change-Id: Ia151115b5a5e8f2ce5e606fe627821dcfef5d9b5
2019-12-26 15:47:37 -08:00
Wale Ogunwale
194435b5a2 Introduce WINDOWING_MODE_MULTI_WINDOW
Generic multi-window with no presentation attribution from the wm-core.
Needed for wm-shell to correctly drive multi-window cases like Bubbles
and n-way-split.
Current windowing modes split and freeform will probably be migrated to
this once wm-shell drives their presentation.

Test: N/A
Bug: 139371701
Change-Id: I5247f41b4f67d21b2bb5929a52e8ec93c41644c2
2019-12-26 12:56:09 -08:00
TreeHugger Robot
1e4c5237df Merge "Add minimal post processing API to framework" 2019-12-25 13:14:51 +00:00
Ben Lin
eefcd54641 Merge "Add #onPictureInPictureRequested to Activity and ATM" 2019-12-23 22:08:59 +00:00