Commit Graph

8704 Commits

Author SHA1 Message Date
Kholoud Mohamed
8b678a4ca3 Merge "Change bindServiceAsUser from system to public API" 2020-01-10 18:54:02 +00:00
Roshan Pius
51fcccb3bb Intent: Promote broadcast flag needed by wifi to @SystemApi
FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT is used by wifi mainline
module, promoting to a @SystemApi.

Bug: 147374337
Test: Compiles
Change-Id: Ib822706700533c0b79833504dad5c8d5253d5d55
2020-01-10 10:25:31 -08:00
TreeHugger Robot
f9ace3f8aa Merge "Add can interact/request to interact across profiles APIs" 2020-01-10 04:25:31 +00:00
Daniel Bright
2b00f7fc54 Merge "Add feature flag android.hardware.telephony.data" 2020-01-09 21:45:40 +00:00
kholoud mohamed
946df39c29 Add can interact/request to interact across profiles APIs
Add CrossProfileApps#canRequestInteractAcrossProfiles,
and CrossProfileApps#canInteractAcrossProfiles public APIs.
This provides apps the ability to check if they can interact across profiles,
or can they request that from the user if not.

BUG: 136249261
Test: in progress

Change-Id: Ifd561d5d5efcd167e24a5f05c22496d1fe9c81fc
2020-01-09 16:01:45 +00:00
kholoud mohamed
da3ae494e9 Change bindServiceAsUser from system to public API
Also, add RequiresPermission annotation for INTERACT_ACROSS_PROFILES
INTERACT_ACROSS_PROFILES should work as a replacement for INTERACT_ACROSS_USERS
for this API when binding to the caller package in some user of the same user
group as the caller, so we don't have to give privileged system components a
permission that is more powerful than is necessary.

BUG: 136249261
BUG: 138645036
Test: Build succeeds
Change-Id: I53c59ecc78a67ea9d324d60787d3b647b7251ea9
2020-01-09 12:04:14 +00:00
TreeHugger Robot
2a3b7a21c0 Merge "Use new UnsupportedAppUsage annotation." 2020-01-09 09:41:06 +00:00
Jeff Sharkey
b8c30b3449 Merge changes from topic "jan7"
* changes:
  Respond to API council feedback.
  Final push to build against SDK.
2020-01-09 06:11:04 +00:00
Sarah Chin
c26dc202c4 Merge "Make MmsManager public" 2020-01-09 02:51:47 +00:00
Daniel Bright
9dd5ee63ed Add feature flag android.hardware.telephony.data
This is a part of two other features that will use this feature flag.

Bug: 146206136
Test: Compiled
Change-Id: Iae1f759ada8925a055f9dbddf2d480d9c2d7616c
2020-01-08 16:35:52 -08:00
Roshan Pius
bae9769e76 wificond: Mark wificond service name a @SystemApi
wifi mainline module needs to use this constant to retrieve the wificond
binder service.

Bug: 140062898
Test: Compiles
Change-Id: If42df001d3c7fa7c743c1448a22697daf06c0d81
2020-01-08 14:22:30 -08:00
Jeff Sharkey
c192ca5a54 Respond to API council feedback.
Adjust Exception to more general Throwable, and add docs for
new ContentResolver and ContentProvider overloads.  Also add docs
for default state of strict query options.

Bug: 131598520, 141227540, 147287177
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Icb0153b8c8a352db39de301074e948bfaa676ddb
2020-01-08 11:44:44 -07:00
Jeff Sharkey
197fe1f90f Final push to build against SDK.
The bulk of the work needed to get MediaProvider building against
the "system_current" SDK surface has been slowly merged over the
last few months, and this change makes the last few adjustments.

This adds a new StorageVolumeCallback which is simpler version of
StorageEventListener that simply delivers the changed StorageVolume.

Move DownloadManager logic into a onMediaStoreDownloadsDeleted()
method which hides the implementation details of how the OS connects
with that implementation.

Make local copies of some ExifInterface parsing logic; they could
be added to the androidx version in an unbundled release.  Make a
local copy of RedactingFileDescriptor, since it's only needed for
the next few weeks until FUSE is globally enabled.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ib416eb8724781bdd234c8b7d728dee8b695ad6ac
2020-01-08 11:44:28 -07:00
Artur Satayev
2ebb31c00c Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'

Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
2020-01-08 16:06:00 +00:00
Automerger Merge Worker
6b913b9054 Merge "Make Context.NETWORK_POLICY_SERVICE @SystemApi" am: b5b0b321f6 am: fb1647dd3a am: 506e7c6b35
Change-Id: Iee3cbf1c945d15ccd1d42108db8e0d3c3f0d481c
2020-01-08 03:43:52 +00:00
Automerger Merge Worker
506e7c6b35 Merge "Make Context.NETWORK_POLICY_SERVICE @SystemApi" am: b5b0b321f6 am: fb1647dd3a
Change-Id: Ic7afab228d5d1bb8f222fb2e828674b03c9dd3e4
2020-01-08 03:31:37 +00:00
Aaron Huang
b5b0b321f6 Merge "Make Context.NETWORK_POLICY_SERVICE @SystemApi" 2020-01-08 03:22:43 +00:00
Kenny Root
155d5648fd Merge "Support Resume on Reboot" 2020-01-08 01:51:17 +00:00
Automerger Merge Worker
46c8efc4b0 Merge "docs: Add documentation for equals() method" into qt-dev am: 732a127636 am: 8bc1955d0e am: 45dbf8cc5a am: 01c6d1f405
Change-Id: I5ff4946d3a8971556a93236b9936217c4d0a4b75
2020-01-07 23:16:46 +00:00
Automerger Merge Worker
01c6d1f405 Merge "docs: Add documentation for equals() method" into qt-dev am: 732a127636 am: 8bc1955d0e am: 45dbf8cc5a
Change-Id: I42352aedf0b91b840078ada4566927c9878544fd
2020-01-07 23:07:01 +00:00
Automerger Merge Worker
45dbf8cc5a Merge "docs: Add documentation for equals() method" into qt-dev am: 732a127636 am: 8bc1955d0e
Change-Id: Ie77e185c38a1a5eda8efa73577d98babadb6e90d
2020-01-07 22:54:47 +00:00
Sarah Chin
0339a82c0a Make MmsManager public
Test: atest TelephonyFrameworksTests
Bug: 144004293
Change-Id: I6cd3587ecba36c9ff9d45a6c174077e8dd7d8fb0
2020-01-07 11:54:55 -08:00
Kevin Hufnagle
1757a96d7c docs: Add documentation for equals() method
Explain the conditions that must be true in order for two objects
of type `ComponentName` to be considered equal.

Test: make ds-docs -j32

Bug: 62991861

Change-Id: I162ecd825b187ca688af11271a937e3740a4a833
Exempt-From-Owner-Approval: Docs-only change
2020-01-07 18:30:50 +00:00
Kenny Root
f76cfc314c Support Resume on Reboot
When an OTA is downloaded, the RecoverySystem can be triggered to store
the user's lock screen knowledge factor in a secure way using the
IRebootEscrow HAL. This will allow the credential encrypted (CE)
storage, keymaster credentials, and possibly others to be unlocked when
the device reboots after an OTA.

Bug: 63928581
Test: atest FrameworksServicesTests:RebootEscrowDataTest \
            FrameworksServicesTests:LockSettingsServiceTests \
            FrameworksServicesTests:RecoverySystemServiceTest \
            FrameworksServicesTests:RebootEscrowManagerTests
Test: use fake OTA console app to apply update
Change-Id: I59df6942b27ea2bdd11b757922f5169085a325f0
2020-01-07 08:18:02 -08:00
TreeHugger Robot
ae70e4d9d3 Merge "Parse empty component permissions as null" 2020-01-07 02:06:09 +00:00
Winson Chiu
b07e14152b Merge "Test InstantAppResolverService method fallback" 2020-01-07 00:20:51 +00:00
Winson
7ef452c6dc Parse empty component permissions as null
An empty string is a valid value, and must be converted to null so
that the permission check is skipped.

Bug: 146596667

Test: manual verify failure using APK from bug, success after fix

Change-Id: Ia5cc915124a6ecb7ec6a9c907b5f2afed98cd44e
2020-01-06 16:00:37 -08:00
Songchun Fan
70d860e333 Merge "Make Context.ACTION_LOAD_DATA a system API" 2020-01-06 21:53:06 +00:00
Philip P. Moltmann
e52bd98d3f Restrict the number of features or size of ids.
Test: atest CtsAppOpsTestCases
Change-Id: I57c4bcee784e28afde0960f93f3b86f1143d2c65
2020-01-03 10:08:03 -08:00
Philip P. Moltmann
9046d82b8f Allow apps to define featureIds in the manifest
Test: CtsAppOpsTestCases (with newly added test for featureIds declared
      in manifest)
Bug: 144997947
Change-Id: I5563ae6861318e4cc1d196e3f6aea378a4dcf748
2020-01-03 10:08:03 -08:00
JW Wang
8108251a87 Implement VersionedPackage#equals (1/n)
So we don't need to call VersionedPackage#getPackageName and
VersionedPackage#getVersionCode to compare 2 VersionedPackages.

Note you must also override #hashCode whenever you override #equals.

Bug: 147028082
Test: atest StagedRollbackTest
Change-Id: Ib1fac7e0521e2ccde0c2bb1f3fd28c0a7cd70234
2020-01-03 14:30:04 +08:00
JW Wang
3cdf7d9a57 Merge "Respect the rollback data policy (3/n)" 2020-01-03 00:55:06 +00:00
Jonathan Scott
5ebb1c5fba Merge "Add manifest attribute to signal the intent of an app to operate cross-profile." 2020-01-02 14:24:27 +00:00
Jonathan Scott
ec60b2604b Add manifest attribute to signal the intent of an app to operate
cross-profile.

Test: Manual
Fixes: 146128107
Change-Id: I576113d05f594b79656c0ed1ebf6c4fe770bcd1e
2020-01-02 14:11:09 +00:00
JW Wang
82768bf925 Respect the rollback data policy (3/n)
1. Don't snapshot user data when the policy is WIPE.
2. Add tests to verify user data is wiped/restored correctly.

Bug: 144683152
Test: atest RollbackStoreTest RollbackUnitTest AppDataRollbackHelperTest
Test: atest RollbackTest StagedRollbackTest
Change-Id: I470233080efbba724ace6f0dbf2ab5256db49054
2020-01-02 22:07:00 +08:00
Automerger Merge Worker
e977504e7a Merge "Add an override for getUser in ContextWrapper" am: 5a049f5cf2 am: 5d9fc9340b
Change-Id: I33223887a6807d2f3caa81df3ead1caa10a015ea
2020-01-02 06:26:20 +00:00
paulhu
5c0f07c4f6 Add an override for getUser in ContextWrapper
This is to fix an issue when calling getUser for a context that
is different than the context of the current foreground user.
getUser for a ContextWrapper would call the base
class Context#getUser which returns the user of the current foreground
process rather than returning the user of the calling context.

Currently, this is a bug that does not meet the ContextWrapper class Javadoc.
It looks like the ContextWrapper call was missed in Ib772ec4438e57a2ad4950821b9432f9842998451.

Fix: 144024489
Test: called the API from a test App with a different context than the
current application context.

Change-Id: I58ec9fda24bf135ba8c648a905ef0c81d36ea098
Merged-In: I2d24f5141e8cbc2546c8dc5894a1aeab376b7632
(cherry-pick from ag/9673528)
2020-01-02 02:09:45 +00:00
Aaron Huang
1aa5ca3f70 Make Context.NETWORK_POLICY_SERVICE @SystemApi
Includes Context.NETWORK_POLICY_SERVICE into system API
so that system apps(including mainline modules) could
obtain the service.

Bug: 138306002
Test: FrameworksNetTests
      FrameworksTelephonyTests

Change-Id: I3f751b14e55969952c69b33c97ef86d859cef8b5
2019-12-31 22:12:16 +08:00
Daulet Zhanguzin
a2044e1bc8 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: Iaa2abbefc532965e257a68502ec60aadbe465ed2
2019-12-30 16:34:59 +00:00
Songchun Fan
05d1689dab Make Context.ACTION_LOAD_DATA a system API
This intent is used by Incremental's adb data loader which is a system
app. This means the intent needs to be a system API.

BUG: 146763909
Test: atest CtsIntentSignatureTestCases
Change-Id: Ibf23e3c28a771687bcd72abea9ae2639f99dff7f
2019-12-25 12:58:49 -08:00
TreeHugger Robot
1e4c5237df Merge "Add minimal post processing API to framework" 2019-12-25 13:14:51 +00:00
TreeHugger Robot
3f7ef32b9f Merge "New API for query trust of a fs-verity certificate" 2019-12-23 20:18:40 +00:00
Victor Hsieh
20fe1f6f22 New API for query trust of a fs-verity certificate
The corresponding service is also added.

The API can be used by a store to know whether their certificate is
trusted on the device. As optimization, they only need to download
.fsv_sig signature file if it will be used.

The API can also be used to gradually switch to stronger key. The store
can query with their certificates in priority order and download the best
signature.

Test: Passed new GTS working in progress
Bug: 142573505
Change-Id: Ic788cd04aeaed35ad62113fe9e7535b8fa63b5ee
2019-12-23 09:21:19 -08:00
Galia Peycheva
056b3ee745 Add minimal post processing API to framework
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.

This CL adds 2 public method:
 - Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.

If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.

 - Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.

Bug: 135116095

Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native

Change-Id: I5508bb9e5c138b0f2b42d8f8fab10e1915ba3cb6
2019-12-23 17:27:55 +01:00
Song Pan
6e3677c0c3 Implement methods in AppIntegrityManagerServiceImpl.
1. Pushing rules.
2. Getting version/rule provider.
3. Handle integrity verification request

Bug:143689885

Test: atest AppIntegrityManagerServiceImplTest
Change-Id: I0f2d554efbd3ba115eab10238908c9c2a3f2139c
2019-12-23 13:24:08 +00:00
Winson
191069d56e Test InstantAppResolverService method fallback
Verifies the appropriate methods are called or not called
when onGetInstantAppResolveInfo and onGetInstantAppIntentFilter
are invoked and different API versions are implemented.

There are 5 versions tested, with version 0 meaning no API was
implemented.

Bug: 137962971

Test: atest FrameworksInstantAppResolverTests
Test: manual swapped platform implementation to log method calls
		and verify call stack when under test

Change-Id: I66f84630d9824b74de57eaae71422d8773279a0f
2019-12-20 16:13:19 -08:00
TreeHugger Robot
756a623594 Merge "Send broadcast to integrity component during installation." 2019-12-20 22:07:40 +00:00
Song Pan
26dee80139 Send broadcast to integrity component during installation.
Change-Id: Icf3d9b8602f0922d1f41a64df6f7e8fa4e23eeb0
Test: locally flashing device and installing app and verifying logcat
2019-12-20 19:06:49 +00:00
Alex Buynytskyy
1ecfcece45 Migrating Incremental* APIs to PackageManager APIs.
Step 2, merging Data Loader params.

Test: builds and flashes
Bug: b/136132412

Change-Id: I2102554316dadcdcb49790c133ece110c43c29b3
2019-12-20 06:55:32 -08:00
Automerger Merge Worker
08074c62b0 Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5
Change-Id: I9ec25eb984e3b534ddcc9313836a319b21526998
2019-12-20 14:00:29 +00:00