Commit Graph

9163 Commits

Author SHA1 Message Date
Aaron Huang
cd44942a14 Remove Context.NETWORK_POLICY_SERVICE from @SystemApi
Hide Context.NETWORK_POLICY_SERVICE as it has no usage.

Bug: 151266974
Test: make checkapi, build
Change-Id: I0586a5ef22f76fa1407219b96cb246f162f02947
2020-03-23 15:15:40 +08:00
Remi NGUYEN VAN
1f0355a1cd Merge "Fix javadoc for Context.TETHERING_SERVICE" into rvc-dev 2020-03-23 01:20:13 +00:00
TreeHugger Robot
9a58d5747a Merge "Un-expose APIs added for telephony mainline." into rvc-dev 2020-03-21 21:17:33 +00:00
Evan Severson
4846c5e3a9 Merge "Add one-time flag to test api" into rvc-dev 2020-03-21 05:44:34 +00:00
Amit Mahajan
4009110b3b Un-expose APIs added for telephony mainline.
Will be reworked on in R.

Test: basic sanity
Bug: 140908357
Change-Id: Ib18b66c9351b0434d7c46e004cd162928d7133f7
2020-03-21 00:21:48 +00:00
Evan Severson
1da1137fd1 Add one-time flag to test api
Test: Build
Fixes: 152076715
Change-Id: I63d327ff9df6075b4420db7df8ee2430fb7922ae
2020-03-20 15:16:54 -07:00
Taras Antoshchuk
2ecaeeba03 Merge "Change dynamic MIME feature accodring to API review" into rvc-dev 2020-03-20 21:04:15 +00:00
Jeff Sharkey
cb31e0486c Merge "Add missing symmetrical ContentResolver method." into rvc-dev 2020-03-20 20:31:52 +00:00
Ryan Mitchell
b0544a733c Merge changes from topic "res_loader_dir" into rvc-dev
* changes:
  Allow using loaders on non-RM Resources instances
  Move AssetsProvider to native layer
  Add ResourcesProvider.loadFromDirectory
  Refactor tests for ApkAsset loading APIs
  Refactor ApkAsset loading APIs
  Fix bugprone-use-after-move warnings
  Fix bugprone-use-after-move warnings
2020-03-20 18:16:30 +00:00
Taras Antoshchuk
8a6002477d Change dynamic MIME feature accodring to API review
Remove PackageManager#clearMimeGroup method. Add expected best
practices of the MIME group naming to Javadocs.
getMimeGroup/setMimeGroup throw in case of undefined MIME group.

Bug: 151101912
Test: atest CtsDynamicMimeHostTestCases
Change-Id: Ica468c77785cb0f9862b412a0bbc664f23e2f2d4
2020-03-20 17:07:56 +01:00
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
Ryan Mitchell
39cacf2de7 Allow using loaders on non-RM Resources instances
Currently there is a limitation where ResourcesLoaders cannot be  used
on Resources object not created through ResourcesManager. This change
creates an update handler for Resources objects that are not registered
with ResourcesManager.

The handler changes the loaders on the asset manager owned by the
Resources instance.

Bug: 151666644
Test: atest ResourceLoaderValuesTest
Change-Id: I5a89f686386bdb088dc964014e7becc0c2b4770f
2020-03-19 18:33:55 -07:00
Ryan Mitchell
4ea1e42889 Move AssetsProvider to native layer
Querying in the native layer for assets provided through
AssetsProviders does not currently work. This change refactors the
AssetProvider API to return a file descriptor that is read in the
native layer and can bubble up to the java layer.

This change also removes the InputStream API to favor of developers
using memfd_create.

Bug: 142716192
Test: atest ResourceLoaderValuesTest
Change-Id: I1a7eca0994c3b7cc32008d9a72bf91086ff0e816
2020-03-19 18:33:55 -07:00
Ryan Mitchell
c07aa70270 Add ResourcesProvider.loadFromDirectory
This API allows a directory to be loaded as if it was a zipped APK.
This is a substitute for the DirectoryAssetProvider API that
currently does not work in the native layer.

Bug: 142716192
Test: atest FrameworksResourceLoaderTests
Change-Id: Ia13e15653e75b421423dd56f9fe89e183ab4cb9a
2020-03-19 18:33:55 -07:00
Ryan Mitchell
ef40d2e832 Refactor ApkAsset loading APIs
To add the partner requested ResourcesProvider#loadFromDir APIs, this
change adds format type integer that allows us to reduce the number of
ApkAssets loading overrides.

This change also adds hidden offset and length based ResourcesProvider
APIs that could not make R.

Bug: 142716192
Test: atest FrameworksResourceLoaderTests
Change-Id: I926fde257cae701901dcd4ca408024feae8c90a6
Merged-In: I926fde257cae701901dcd4ca408024feae8c90a6
2020-03-19 18:33:55 -07:00
Evgenii Stepanov
21c6a0f598 Merge "Convert enableGwpAsan to @IntDef and rename to gwpAsanMode." into rvc-dev 2020-03-19 22:47:05 +00:00
Winson Chiu
5051748f22 Merge "Convert InstantAppRequestInfo to getters and add @MainThread" into rvc-dev 2020-03-19 21:02:36 +00:00
TreeHugger Robot
cff44bd82e Merge "Change createRequestInteractAcrossProfilesIntent to throw Exception" into rvc-dev 2020-03-19 20:51:30 +00:00
Peter Wang
24f63edb41 Merge "[Telephony Mainline] Hide setSystemAppState and related constants for R" into rvc-dev 2020-03-19 20:50:10 +00:00
Patrick Baumann
8a25d0fa42 Merge "Fixes wildcard intent filter matching logic" into rvc-dev 2020-03-19 20:43:32 +00:00
Songchun Fan
2f83e15e18 Merge "remove dynamicArgs from public methods" into rvc-dev 2020-03-19 19:07:18 +00:00
Evgenii Stepanov
d43d109af8 Convert enableGwpAsan to @IntDef and rename to gwpAsanMode.
Following API feedback, make
  ApplicationInfo.enableGwpAsan
  ProcessInfo.enableGwpAsan
a @IntDef integers instead of @Nullable booleans.

Rename both, and the manifest attribute, to gwpAsanMode.
Turn the manifest attribute into an enum.
Fix manifest documentation to match the implementation.

Bug: 151262688
Test: CtsGwpAsanTestCases
Exempt-From-Owner-Approval: cherrypick
Merged-In: Ie33954700e1526f9764a751e474a3f930a65e957
Change-Id: Ie33954700e1526f9764a751e474a3f930a65e957
(cherry picked from commit 7487f249dd)
2020-03-19 16:35:41 +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
Peter Wang
1b0836a826 [Telephony Mainline] Hide setSystemAppState and related constants for R
Bug: 146904426
Fix: 146904426
Test: Build
Change-Id: Ia331068ac49f6f6bc97643766b521b27bff2e6b6
2020-03-18 21:55:52 -07:00
Remi NGUYEN VAN
d06f14700f Fix javadoc for Context.TETHERING_SERVICE
Users of the API receive a TetheringManager from getSystemService; they
do not call ServiceManager.getService.

Bug: 151243982
Test: m
Change-Id: If75f590da17f07ea9d65635065689d8f4e17b40f
2020-03-19 11:37:42 +09: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
Patrick Baumann
28a68105e1 Fixes wildcard intent filter matching logic
Fixes: 151638510
Test: atest IntentFilterTests AppEnumerationTests
Change-Id: I5f0297b5f1ca0458bc6d9ada5ac6d623b7b9a89f
2020-03-18 15:07:54 -07: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
kholoud mohamed
e39e9b2f69 Change createRequestInteractAcrossProfilesIntent to throw Exception
Change to the API to throw a security exception if the app can't
request to interact rather than returning null, this is to address
an API review feedback.

Fixes: 151157516
Test: atest CrossProfileAppsPermissionHostSideTest
Change-Id: Icdc9798a8a315cdffbe35b118c988fb60bb285af
2020-03-18 18:56:43 +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