Commit Graph

6926 Commits

Author SHA1 Message Date
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
kopriva
f0ca62a3eb Merge "docs: fixed mistaken reference to NotificationManager" into pi-dev am: 206a50673d
am: bb252836e5

Change-Id: If12876c83c191b91235e16a69d7dad66fc682b80
2018-09-13 20:06:12 -07:00
kopriva
bb252836e5 Merge "docs: fixed mistaken reference to NotificationManager" into pi-dev
am: 206a50673d

Change-Id: I03ebc3385e89c5b71888d7a4d11b0e2608d80fed
2018-09-13 19:57:19 -07:00
kopriva
5495dbbb80 docs: fixed mistaken reference to NotificationManager
Test: make ds-docs

Bug: 36952345

Change-Id: Icc74db9f8808e67c6eafacc0e40a35f47cba32ba
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 14:18:34 -07:00
Jeff Sharkey
e0339a6f6e Merge "Support more createPackageContextAsUser() users." 2018-09-13 20:08:57 +00:00
TreeHugger Robot
456e4f5b59 Merge "Expose Resources.getFloat publicly" 2018-09-13 19:15:50 +00:00
Steven Moreland
8b4ce09de4 Merge changes from topic "remove-hidl-boot-jars" am: 82e3d2f066 am: fc8de0d9e3
am: d70998a8d9

Change-Id: Iee10a8281e023c9917fb81a2e72be1475dc10772
2018-09-13 10:35:38 -07:00
Steven Moreland
d70998a8d9 Merge changes from topic "remove-hidl-boot-jars" am: 82e3d2f066
am: fc8de0d9e3

Change-Id: If4d5c5e99bf605f31371426ab3a5def66f0a0137
2018-09-13 09:57:42 -07:00
Steven Moreland
fc8de0d9e3 Merge changes from topic "remove-hidl-boot-jars"
am: 82e3d2f066

Change-Id: I17b89f904ed17ee8f1f31c6d56cb96da705cb553
2018-09-13 09:40:50 -07:00
Jake Wharton
32365b91ce Expose Resources.getFloat publicly
This saves users from having to create a TypedValue, calling getValue, and then pulling out the float manually.

Test: none, just exposing existing functionality
Bug: 37116599
Change-Id: Ie4fcf51d64ec6113148e1fbf3c199cfff028f579
2018-09-13 12:12:27 -04:00
Jeff Sharkey
8068dfe6be Merge "Utilities for content:// Uris and file modes." 2018-09-13 15:20:59 +00:00
Ian Lake
666a965fd5 Annotate ComponentCallbacks with nullability annotations
BUG: 78245676
Test: make
Change-Id: Idd88ecbfc97672f3a234641c8892c245b4fe130a
2018-09-12 15:13:19 -07:00
Jeff Sharkey
ec5f7d1625 Support more createPackageContextAsUser() users.
We created this API to make it easy to pass a given UserHandle into
all Managers obtained from a given Context, which works great for
"normal" users, but we should also support special users like ALL
and CURRENT.

Also add an AutoCloseable marker to make try-with-resources easier.

Bug: 112153259
Test: atest android.content.cts.ContextTest
Change-Id: I261dfcc5cfdfc76bda5d70181785e11c2715a558
2018-09-12 14:02:11 -06:00
Jeff Sharkey
63280e06fc Utilities for content:// Uris and file modes.
Bug: 111268862, 111960973
Test: atest cts/tests/tests/content/src/android/content/cts/ContentUrisTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
Change-Id: I94373055468d279e6553d4a038267732b9b53745
2018-09-12 12:35:52 -06:00
Steven Moreland
f36ad62907 pm: Add hidl libraries to old class paths.
These two libraries:
android.hidl.base-V1.0-java
android.hidl.manager-V1.0-java

are being removed from BOOT_JARS. This change facilitates linking to them
for libraries or prebuilts in or before P.

Test: atest android.content.pm.AndroidHidlUpdaterTest
Bug: 77307025

Change-Id: Ic0db24cc68d66f5dbfab126ce7e304eec0bfc969
2018-09-12 09:18:40 -07:00
Mike Ma
43908f112b Merge "Avoiding potential NPE when dumping to proto." am: a52b601ef3
am: 8964390dd3

Change-Id: Ie9dc401990b4267b9bcf0469a3526db93dc438d2
2018-09-11 18:47:58 -07:00
Mike Ma
8964390dd3 Merge "Avoiding potential NPE when dumping to proto."
am: a52b601ef3

Change-Id: I9d5e520654877e6a46ea19ad3eddd3a901e58699
2018-09-11 18:26:45 -07:00
Xin Wei Chow
fb86f86e7e Merge "Fix typo - 'singed' to 'signed'" 2018-09-12 01:16:15 +00:00
Kweku Adams
ce8e43f8d2 Avoiding potential NPE when dumping to proto.
Inspired by aosp/736453. Cherry-picked from ag/4934453

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-11 19:21:52 +00:00
Philip P. Moltmann
a4b3022c51 Make PackageManager#arePermissionsIndividuallyControlled system-api
The PermissonController is going to become a mainline module, hence it
has to compile against @SystemApi.

PackageManager#arePermissionsIndividuallyControlled controls how certain
permissions are presented in the UI, hence Permission controller needs
to read it. The value of this API comes from a config option.

Bug: 110953302
Test: Built
Change-Id: If78b1bb594af0c85e92abf70ae8315e7ba3f31fa
2018-09-10 16:46:30 -07:00
David Brazdil
0b62a08c76 Merge "Move ApplicationInfo.usesNonSdkApi to private flags" am: fdd378c594
am: de5cc1ff5b

Change-Id: I8849fab757c732ab600e243c187f9acd0aa2c9d7
2018-09-07 04:15:02 -07:00
David Brazdil
de5cc1ff5b Merge "Move ApplicationInfo.usesNonSdkApi to private flags"
am: fdd378c594

Change-Id: I43fe6b903eb4cd900da9ebc2b10893213329c691
2018-09-07 03:12:59 -07:00
David Brazdil
fa5e8361c4 Move ApplicationInfo.usesNonSdkApi to private flags
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.

This also solves an issue where the field was not propagated during
copying of the data structure.

Bug: 113315999
Test: phone boots
Merged-In: I09f8f39454c013a84893ac304904a4412fc542bf
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
(cherry picked from commit a5b4df2a89)
2018-09-06 15:31:33 +01:00
David Brazdil
b19f26e78f Merge "Move ApplicationInfo.usesNonSdkApi to private flags" 2018-09-06 14:10:22 +00:00
David Brazdil
a5b4df2a89 Move ApplicationInfo.usesNonSdkApi to private flags
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.

This also solves an issue where the field was not propagated during
copying of the data structure.

Bug: 113315999
Test: phone boots
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
2018-09-06 09:53:08 +01:00
TreeHugger Robot
329fd3bc0d Merge "Add FEATURE_FACE and FEATURE_IRIS" 2018-09-05 20:12:54 +00:00
Chia-I Wu
c803806efb Merge "Fix widecg and hdr ordering in Configuration" 2018-09-05 17:24:56 +00:00
TreeHugger Robot
73855d4071 Merge "Avoiding potential NPE when dumping to proto." 2018-09-05 01:11:26 +00:00
Kweku Adams
15afdebe38 Avoiding potential NPE when dumping to proto.
Inspired by http://aosp/736453.

Bug: 113087610
Test: Android builds
Change-Id: I9f0dae9cd5a839947c7ed150980eb30b928beef7
2018-09-04 11:57:34 -07:00
Xin Wei Chow
6ab8afbe7b Fix typo - 'singed' to 'signed'
Test: Not necessary due to Javadoc change.
Change-Id: Id7e315f893920de9e010eb79b83d5bb7604ecf69
2018-08-31 23:31:57 +00:00
Chia-I Wu
0d8acf5a96 Fix widecg and hdr ordering in Configuration
Wide Gamut qualifier should be before the HDR one.

Bug: 78136980
Test: am get-config
Change-Id: If0f09ddb750d586d29b4cedcbab3d5981f393b92
2018-08-31 17:18:36 +00:00
David Brazdil
3fb373d63a Merge "Add android:usesNonSdkApi manifest attribute" am: 9446fbbeb8
am: a872cb1fcc

Change-Id: I489673fe1b36c146b9b64f3da434b853e002a472
2018-08-31 03:38:08 -07:00
David Brazdil
a872cb1fcc Merge "Add android:usesNonSdkApi manifest attribute"
am: 9446fbbeb8

Change-Id: I53b5c85fc16cdea5413b35ba4ddeec0d64f22b11
2018-08-31 03:28:30 -07:00
Philip P. Moltmann
7a80e14184 Merge "Factor some RestrictedLockUtils out of SettingLib" 2018-08-31 04:47:28 +00:00
TreeHugger Robot
49fa609ba0 Merge changes from topic "biometric-prompt-service"
* changes:
  Add BiometricPromptService
  Remove common biometric directory
2018-08-31 01:21:07 +00:00
Kevin Chyn
15bb32d33c Add FEATURE_FACE and FEATURE_IRIS
Fixes: 110535333

Test: make update-api
Test: make -j
Change-Id: I64e99c1437a497a37bc7d89c9c76a4930455f767
2018-08-30 14:49:32 -07:00
Kevin Chyn
a24e9fd9ac Add BiometricPromptService
The change introduces the following:
  - BiometricPrompt communicatates with BiometricPromptService (new)
    system service. The service does the decision making for which
    biometric modality to use.
  - As a result, a lot of logic is moved from <Biometric>Manager
    to BiometricPrompt. FingerprintManager now does not care about
    BiometricPrompt logic anymore (reverts several P changes).

Face, and all future <Biometric>Service interfaces must be protected by
the signature-only MANAGE_BIOMETRIC permission. Settings, SystemUI, and
BiometricPromptService are their only clients.

Bug: 72825012

Test: BiometricPromptDemo works
Test: Keyguard works
Test: Settings works

Change-Id: I2b7d6eff81bc07950202c50e592d733032523bf0
2018-08-30 14:49:32 -07:00
Philip P. Moltmann
4e615e6986 Factor some RestrictedLockUtils out of SettingLib
Also make the new lib only use system-apis.

This allows mainline module to use the new
RestrictedLockUtilsSettingLib.

Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.

Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
2018-08-30 11:59:29 -07:00
David Brazdil
ca6f81d395 Add android:usesNonSdkApi manifest attribute
ActivityManagerService decides on the non-SDK API enforcement policy
of every newly spawned process. System apps can be exempted by adding
their package name to a config XML file, tests can pass a flag to
'am instrument'. This patch adds a new @hide attribute on the <application>
manifest tag, "android:usesNonSdkApi", which can be used by both
system apps and tests, and is automatically set by the build system.

The use of the attribute remains guarded as follows:
- if invoked via 'am instrument', must hold shell user permission,
- if app launched, must be a system app or an updated system app.
The attribute is ignored in all other cases.

Bug: 113315999
Test: N/A
Merged-In: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
Change-Id: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
(cherry picked from commit 787b6f22a6)
2018-08-30 14:10:33 +01:00
David Brazdil
03b72ae608 Merge "Add android:usesNonSdkApi manifest attribute" 2018-08-30 12:52:52 +00:00
Makoto Onuki
e183a40764 Add detailed log around requestSync.
Bug: 113136683
Test: Boot and trigger sync

Change-Id: I6b79696c57fbe80d77dcde85bebe57a1adc3e935
2018-08-29 12:55:53 -07:00
TreeHugger Robot
4379d6537e Merge "ContentResolver: Always set calling package name" 2018-08-29 01:01:00 +00:00
Makoto Onuki
2cc250b651 ContentResolver: Always set calling package name
Change-Id: I170fba7df8422c68d42c22eb5953b7a47f6c95d5
Fixes: 112306907
Test: atest CtsContentTestCases
2018-08-28 15:57:48 -07:00
Jeff Sharkey
202a16ec96 Merge "More robust MTP-to-MIME-type mappings." 2018-08-28 20:51:37 +00:00
Jeff Sharkey
3d80a7d36a Merge "Clean/destroy app shared storage via installd." 2018-08-28 19:37:19 +00:00
Jeff Sharkey
91e3cd4c6c More robust MTP-to-MIME-type mappings.
Recently in I830717428e72ac37c5ecd1f23d915aa878ef3744, we greatly
improved the underlying file-extension-to-MIME-type mappings defined
in libcore and used across the OS.

Instead of maintaining divergent mappings here in MediaFile, this
change delegates all file extension logic down to libcore, and
standardizes all MediaScanner internals on using MIME types.  To
register new file types in the future:

1. Add the MIME-to-extension registration in libcore.
2. Add the MIME-to-MTP mapping here in MediaFile.

This change also ensures that unknown MIME types are surfaced
across MTP, using constants like FORMAT_UNDEFINED_AUDIO for audio/*
until an explicit format is defined.

We now surface WMA/WMV file formats, even if the device can't
natively play them back, since we still want to offer the ability
for users to copy them around, and the user may have a third-party
app capable of playing them.

Keeps @UnsupportedAppUsage intact for now.

Bug: 111268862, 112162449
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaFileTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2f6a5411bc215f776f00e0f9a4b7d825b10b377d
2018-08-28 13:02:35 -06:00
Sudheer Shanka
8e7cf05d27 Merge "Remove DefaultContainerService usage in StorageManagerService." 2018-08-28 18:01:24 +00:00
David Brazdil
787b6f22a6 Add android:usesNonSdkApi manifest attribute
ActivityManagerService decides on the non-SDK API enforcement policy
of every newly spawned process. System apps can be exempted by adding
their package name to a config XML file, tests can pass a flag to
'am instrument'. This patch adds a new @hide attribute on the <application>
manifest tag, "android:usesNonSdkApi", which can be used by both
system apps and tests, and is automatically set by the build system.

The use of the attribute remains guarded as follows:
- if invoked via 'am instrument', must hold shell user permission,
- if app launched, must be a system app or an updated system app.
The attribute is ignored in all other cases.

Bug: 113315999
Test: N/A
Change-Id: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
2018-08-28 15:20:50 +01:00
Sudheer Shanka
25469aacb8 Remove DefaultContainerService usage in StorageManagerService.
StorageManagerService uses DefaultContainerService to obtain ObbInfo
for files passed through mountObb() transaction. This change moves this
logic to client side and so ObbInfo will be passed as part of mountObb()
transaction.

Bug: 111838160
Test: atest src/android/os/storage/cts/StorageManagerTest.java
Test: atest core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java
Test: atest services/tests/servicestests/src/com/android/server/MountServiceTests.java
Change-Id: I29aee3aa54a45057df96aae289888161a3e3af71
2018-08-27 15:50:59 -07:00