Commit Graph

9138 Commits

Author SHA1 Message Date
Jeff Sharkey
ce8a353b8b Add missing symmetrical ContentResolver method.
We have a new ContentProvider.checkUriPermission() method, but we
forgot to add the symmetric ContentResolver.checkUriPermission() to
the public API, and a first-party developer helped identify this
oversight.

Bug: 151165313
Test: atest CtsContentTestCases:android.content.cts.ContentResolverTest
Change-Id: Ic5496b5a6fda14c25cb3752f5af2f71564d003ba
2020-03-19 21:41:57 -06:00
Songchun Fan
2f83e15e18 Merge "remove dynamicArgs from public methods" into rvc-dev 2020-03-19 19:07:18 +00:00
Steve Elliott
a7aededa7d Merge "Populate conversation notifs from shortcut info" into rvc-dev 2020-03-19 15:18:33 +00:00
Yurii Zubrytskyi
793f73812d Merge "Incremental apps removal on data loader failures." into rvc-dev 2020-03-19 06:20:37 +00:00
Remi NGUYEN VAN
54a6565668 Merge changes from topic "netstack_api_review" into rvc-dev
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-19 01:21:29 +00:00
Sarah Chin
91604c2138 Merge "Remove Mainline APIs for MmsManger and TelephonyManager" into rvc-dev 2020-03-18 23:15:16 +00:00
TreeHugger Robot
c3752e30f0 Merge "Revert "Expose ACTION_USER_SWITCHED as system API"" into rvc-dev 2020-03-18 22:23:22 +00:00
Eugene Susla
733a81b9f7 Merge "Rename auto-revoke manifest flags to not contain "Dont"" into rvc-dev 2020-03-18 21:46:40 +00:00
Sarah Chin
8ac7ce5a5d Remove Mainline APIs for MmsManger and TelephonyManager
Test: build
Bug: 144004293
Bug: 147611125
Change-Id: I44682d1f33eee02d1dcf57f4de8ce2df0a9b126d
2020-03-18 14:28:06 -07:00
Amit Mahajan
9e9f7a6e93 Revert "Expose ACTION_USER_SWITCHED as system API"
This reverts commit ffe0cbe5ca.

Reason for revert: Not needed for now; will be redone in S.

Bug: 148180958
Merged-in: I426e00e1eb79af5b520fc8c59439614459720fa6
Change-Id: I426e00e1eb79af5b520fc8c59439614459720fa6
(cherry picked from commit 5a29b0447b)
2020-03-18 13:02:27 -07:00
Yurii Zubrytskyi
1d6e6bfe96 Merge "Removing race condition accessing shared binder object." into rvc-dev 2020-03-18 19:54:55 +00:00
Amit Mahajan
0ed16d7b4b Merge changes from topic "Remove telephony protection level" into rvc-dev
* changes:
  Remove telephony protection level.
  Revert "Allowed telephony to bind network service"
  Revert "add telephony role to some permissions needed by telephony module"
2020-03-18 19:22:36 +00:00
Steve Elliott
46bb2a10a2 Populate conversation notifs from shortcut info
Fixes: 151330577
Test: manual
Change-Id: Ib7b7037155fc1891935fcbe89ced9f1639378ba0
2020-03-18 13:23:51 -04:00
Alex Buynytskyy
2cf1d18fe1 Incremental apps removal on data loader failures.
Test: adb install --incremental megacity.apk over USB2.0, remove usb connection
after installed.
Bug: b/15041101

Change-Id: Ib848640dbe49c76021f7cf544de4413599c2c763
2020-03-18 10:18:48 -07:00
Alex Buynytskyy
b6e02f7b09 Removing race condition accessing shared binder object.
Test: incrementally installing two apks at the same time
Bug: b/150411019
Change-Id: I81231edf7a32470542ec529aa305b4f9fb2b80e3
2020-03-18 09:01:36 -07:00
Remi NGUYEN VAN
53f0193fca Remove NETWORK_STACK_SERVICE constant
Instead, have a dedicated method in android.net.NetworkStack allowing to
fetch the stable AIDL token for the service.

This avoids returning IBinder from getSystemService, as getSystemService
should generally return manager classes.

Test: atest FrameworksNetTests NetworkStackTests
Fixes: 151243982
Change-Id: I58a6e1f27aff052050197d1901f43a98d7aa1167
2020-03-18 18:29:30 +09:00
Mehdi Alizadeh
f9275345db Merge changes Ibfb3cf6f,I9a4bd220 into rvc-dev
* changes:
  Load Uri based shortcut drawable in LauncherApps
  Adds icon URI field to shortcutInfo
2020-03-18 02:59:03 +00:00
Eugene Susla
1f466ece61 Rename auto-revoke manifest flags to not contain "Dont"
Fixes: 151311445
Test: presubmit
Change-Id: Idc78c35acef6828ac21f0d651a6d8efbc5094872
2020-03-17 17:42:40 -07:00
Mehdi Alizadeh
98ffa48a7a Load Uri based shortcut drawable in LauncherApps
Bug: 143106625
Test: Manual test by publishing shortcuts with uri icons in a sample app
Test: atest com.android.server.pm.ShortcutManagerTest1 \
            com.android.server.pm.ShortcutManagerTest2 \
            com.android.server.pm.ShortcutManagerTest3 \
            com.android.server.pm.ShortcutManagerTest4 \
            com.android.server.pm.ShortcutManagerTest5 \
            com.android.server.pm.ShortcutManagerTest6 \
            com.android.server.pm.ShortcutManagerTest7 \
            com.android.server.pm.ShortcutManagerTest8 \
            com.android.server.pm.ShortcutManagerTest9 \
            com.android.server.pm.ShortcutManagerTest10

Change-Id: Ibfb3cf6f7dabdeed36b845ab6e026506978d972a
2020-03-17 15:43:01 -07:00
Mehdi Alizadeh
bcaa266fa7 Merge "Make LauncherApps#ShortcutQuery#setLocusId() public" into rvc-dev 2020-03-17 17:02:39 +00:00
Mehdi Alizadeh
cc051d4d5e Make LauncherApps#ShortcutQuery#setLocusId() public
Bug: 150219458
Test: atest com.android.server.pm.ShortcutManagerTest1 \
            com.android.server.pm.ShortcutManagerTest2 \
            com.android.server.pm.ShortcutManagerTest3 \
            com.android.server.pm.ShortcutManagerTest4 \
            com.android.server.pm.ShortcutManagerTest5 \
            com.android.server.pm.ShortcutManagerTest6 \
            com.android.server.pm.ShortcutManagerTest7 \
            com.android.server.pm.ShortcutManagerTest8 \
            com.android.server.pm.ShortcutManagerTest9 \
            com.android.server.pm.ShortcutManagerTest10
Test: atest DataManagerTest
Change-Id: I546e12ac57db76ec40dc25316168c19e76393e20
2020-03-16 14:12:08 -07:00
Amit Mahajan
c48113aa14 Merge "Remove @SystemApi from some constants for R." into rvc-dev 2020-03-16 20:35:00 +00:00
TreeHugger Robot
74739ff81b Merge "Add a new test API for getting the list of approved rule providers." into rvc-dev 2020-03-16 12:35:42 +00:00
Mehdi Alizadeh
f38f2c7ddb Adds icon URI field to shortcutInfo
Bug: 143106625
Test: atest com.android.server.pm.ShortcutManagerTest1 \
            com.android.server.pm.ShortcutManagerTest2 \
            com.android.server.pm.ShortcutManagerTest3 \
            com.android.server.pm.ShortcutManagerTest4 \
            com.android.server.pm.ShortcutManagerTest5 \
            com.android.server.pm.ShortcutManagerTest6 \
            com.android.server.pm.ShortcutManagerTest7 \
            com.android.server.pm.ShortcutManagerTest8 \
            com.android.server.pm.ShortcutManagerTest9 \
            com.android.server.pm.ShortcutManagerTest10

Change-Id: I9a4bd2206084a20977a90ba13e3db8a76096910c
2020-03-15 21:40:14 -07:00
Eugene Susla
41b448e39b Merge "Introduce per-app API for installer whitelisting" into rvc-dev 2020-03-14 05:43:11 +00:00
Eugene Susla
922cd08f62 Introduce per-app API for installer whitelisting
Test: presubmit
Bug: 146513245
Change-Id: I5a4502aeb78d2e35209ed88312d24bcafbb4ba7c
2020-03-13 22:09:22 -07:00
Jayant Chowdhary
6241aceae8 Merge "camera2: rename getConcurrentStreamingCameraIds() -> getConcurrentCameraIds()" into rvc-dev 2020-03-14 01:44:50 +00:00
TreeHugger Robot
c670246edb Merge "Treat MODE_FOREGROUND as ALLOWED for appop checks" into rvc-dev 2020-03-14 01:34:04 +00:00
Philip P. Moltmann
e6c5650e88 Treat MODE_FOREGROUND as ALLOWED for appop checks
noteOp always resolved MODE_FOREGROUND into IGNORED/ALLOWED
checkOp resolves it too, but checkOpRaw does not resolved it and might
return it.

Preflight checks should be independant of the uid state, hence treat
MODE_FOREGROUND similar to ALLOWED as MODE_FOREGROUND might allow it.

Bug: 150508177
Fixes: 148197098
Test: TH
Change-Id: I7b4f53c7ce638f92747d452f2d2f72d098e94b78
2020-03-14 01:22:55 +00:00
Eugene Susla
2ac02b0d3e Add public API to check if current app is auto-revoke exempt
Test: presubmit
Bug: 146513245
Change-Id: I18ac5957eb9ae1ea0d7de2daf407e6d797079937
2020-03-13 22:44:00 +00:00
Eugene Susla
ff17a587a8 Merge "Introduce per-app manifest flags for autoRevoke" into rvc-dev 2020-03-13 22:40:36 +00:00
Evan Severson
a285890237 Merge "Update reserved permission controller flags name" into rvc-dev 2020-03-13 18:30:25 +00:00
Eugene Susla
db77bc14de Introduce per-app manifest flags for autoRevoke
This introduces extra attributes on <application/> tag corresponding to
requesting to be shown in UI for the user to disable auto-revoke
(allowDontAutoRevokePermissions)
and being whitelisted by the installer (dontAutoRevokePermissions)

Test: presubmit
Bug: 146513245
Change-Id: I07902632812b70ea418a667d343b74d7ae170bb9
2020-03-13 11:23:26 -07:00
Amit Mahajan
c55b01552e Remove @SystemApi from some constants for R.
These were exposed for telephony mainline. Will be revisited in S.

Test: basic sanity
Bug: 148171847
Bug: 148171388
Change-Id: Ibdcac557cf35e723f09a7b7a2e59c7deae1fc94e
2020-03-13 10:44:27 -07:00
Garfield Tan
7fcb7d59c4 Merge "Add window layout affinity." into rvc-dev 2020-03-13 16:16:18 +00:00
Philip P. Moltmann
d7a823623f Merge "Rename featureId -> attributionTag" into rvc-dev 2020-03-13 14:26:31 +00:00
Song Pan
4d37486cef Add a new test API for getting the list of approved rule providers.
This allows us to check the list in GTS tests.

Bug: 145674131
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I3cb9c8379061b4a57bc6ae714b2a29204d34fa0f
2020-03-13 10:49:45 +00:00
Garfield Tan
5901e7ce4f Add window layout affinity.
Window layout affinity is used to combine launch params records for
activities from the same UID that have the same value.

I didn't choose to replace component name as the key to launch params
map by window layout affinity because keeping both has some good traits
when app is updated with some window layout affinity changes:
1) The record with component name is still updated even if it starts to
have a window layout affinity so we don't have to worry about the
orphaned record;
2) Activity that changes/loses window layout affinity can always use the
last launch param that activity saves, instead of starting from default
launch behavior again;
3) App removal can still naturally clean up all useless records.

Those come at a cost that we need to iterate all activities in the same
window layout affinity when getting the launch params, but it's OK
because it's not very common to have specific task affinities and in
cases where they do the number of activities sharing the same task
affinities is limited.

Bug: 146015757
Test: Manual test that 2 activities in a single test app shares the same
launch params record.
Test: atest LaunchParamsPersisterTests

Change-Id: Idb2e7509c6bdf22ac6c9cf41059e9c696419028b
2020-03-12 17:04:45 -07:00
Evgenii Stepanov
91482ccc8a Merge "Add "enableGwpAsan" tag to android manifest." into rvc-dev 2020-03-12 21:13:25 +00:00
Jayant Chowdhary
44bc7d8c23 camera2: rename getConcurrentStreamingCameraIds() -> getConcurrentCameraIds()
Bug: 150896133

Test: builds
Test: atest ConcurrentCameraTest.java

Change-Id: I0634358ed2591448d2f69be329a524fe1a197813
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-03-12 13:20:48 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Patrick Baumann
987b12ddcf Merge "Do not set referrerUri on SessionInfo for non-owners" into rvc-dev 2020-03-12 19:16:40 +00:00
Alex Kershaw
6fa3741fdb Merge "Add overloaded API with activity options parameter" into rvc-dev 2020-03-12 17:47:59 +00:00
Evgenii Stepanov
102d3d8669 Add "enableGwpAsan" tag to android manifest.
This tag can be used to enable and disable gwp-asan on applications and
their components. The default setting is disabled, except for the system
applications which are enabled with a small probability (approx. 1% of
processes).

Enabling gwp-asan can be used to crowd test an app.

This change includes a compat feature that overrides the default value
of enableGwpAsan for an app.

Bug: 149991821
Test: atest CtsGwpAsanTestCases
Exempt-From-Owner-Approval: cherrypick
Merged-In: I5eb647c517e5487b1d1eed6b9a43242490f19289
Change-Id: I5b4db666f38af846927f88702cc690f0916cadb1
2020-03-12 17:19:23 +00:00
TreeHugger Robot
c688e204e1 Merge "Remove misleading comments" into rvc-dev 2020-03-12 03:39:07 +00:00
Alex Kershaw
a9f0052af5 Add overloaded API with activity options parameter
This is from calendar team's feedback. It allows them to
create a nice animation when launching the activity. This also mirrors
the implementation in the Activity class.

Fixes: 151150552
Test: atest com.android.cts.devicepolicy.CrossProfileAppsHostSideTest#testStartActivityIntent
Change-Id: Ie120896e50d8b2c033b9cb156357bd696eb033e0
2020-03-12 01:29:27 +00:00
TreeHugger Robot
592181386c Merge "Making time-zone an API constant" into rvc-dev 2020-03-12 01:23:28 +00:00
Pinyao Ting
021faf9d19 Remove misleading comments
The display order of the shortcuts is solely determined by launcher apps
implementation at their own discretion, the rank of the shortcut merely
serves as a guideline. Thus removing the misleading paragraph to prevent
confusions.

Bug: 150254995
Test: make
Change-Id: I4cdb9a5779edfdb5b56659e4787b3f13e7e3054e
2020-03-11 23:42:58 +00:00
Amit Mahajan
7931b2efff Remove telephony protection level.
Test: manual sanity & TH
Bug: 148482594
Change-Id: Iae57fddd400ca7549f32d755d478ee225a5375c5
2020-03-11 16:09:35 -07:00
TreeHugger Robot
76b221c84b Merge "WindowContext: Add @WindowType intdef" into rvc-dev 2020-03-11 22:02:27 +00:00