Commit Graph

8671 Commits

Author SHA1 Message Date
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
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
Mark Chien
ebc76bc2e9 Merge "[Tether13] Move TetheringManager into framework" 2019-12-20 05:04:08 +00:00
JW Wang
0bb6808121 Add rollback data policy (1/n)
1. Do the plumbing to pass the data policy all the way to
   SessionInfo.
2. SessionInfo#rollbackDataPolicy will be used by RollbackManager to
   determine whether to wipe user data when enabling/committing
   rollback.

Bug: 144683152
Test: atest RollbackStoreTest RollbackUnitTest AppDataRollbackHelperTest
Test: atest RollbackTest StagedRollbackTest

Change-Id: Ie1e5457d0304f9cf8fc34fce17d707be75407a2b
2019-12-20 04:05:01 +00:00
TreeHugger Robot
724e336f4d Merge "[incremental/dataloader] make some class and methods system APIs" 2019-12-20 02:34:40 +00:00
markchien
ae8aa646dc [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
Eugene Susla
5fd6266552 Merge "[CDM] Bypass location setting when scanning for devices" 2019-12-20 00:58:57 +00:00
Songchun Fan
4062c3ca67 [incremental/dataloader] make some class and methods system APIs
These are the APIs that are needed for Incremental installations
initiated by privileged apps.

Only for internal development of Incremental.

BUG: 136132412
Test: m IncrementalScenarioTests
Change-Id: I258979df03943417f2a896160374f2f73841b733
2019-12-19 16:23:58 -08:00
Evan Severson
7f1ce8f903 Merge "Create system server component for one-time permissions" 2019-12-19 22:04:40 +00:00
Eugene Susla
1fa23ed08a [CDM] Bypass location setting when scanning for devices
Fixes: 140524365
Test: turn off location in settings and ensure devices still shown in UI
Change-Id: Ifea696c18977fc5e94d93ced4f5d8b916587d0ec
2019-12-19 12:04:05 -08:00
Mathew Inwood
03f4dc0a4b Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 08:02:31 +00:00
TreeHugger Robot
d8492dbfb2 Merge "Migrating Incremental* APIs to PackageManager APIs." 2019-12-18 21:38:46 +00:00
Alex Buynytskyy
ea14d19106 Migrating Incremental* APIs to PackageManager APIs.
This is the first step, migrating java parts.
CleanSpec.mk added as a workaround for b/146502407

Test: builds and flashes
Bug: b/136132412

Change-Id: Id0a26aa011b555ea457b5aafe7f5789c36d25bcc
2019-12-18 19:13:39 +00:00
Evan Severson
b252d8bdbf Create system server component for one-time permissions
In this change we introduce new system api to manage tracking apps for
inactivity when they hold one-time permissions. The api includes adding
a package, removing a package, and a callback to notify the app has gone
inactive and which permissions are considered one-time.

Also introduce a new permission flag so that it is possible to determine
if a currently granted permission is one-time.

Test: Manual
Bug: 136219229
Change-Id: Iac3cb776a0204c64953f0a03abe76c8e320c9e56
2019-12-18 11:01:33 -08:00
Jeffrey Huang
18e52123ce Merge "Create statsmanager service" 2019-12-18 18:20:25 +00:00
Artur Satayev
e23a0eb5ee 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
Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f
2019-12-18 16:15:02 +00:00
Felka Chang
0384736c1d Merge "Add the root of crates by Context.getCrateDir" 2019-12-18 03:44:30 +00:00
Jeff Sharkey
04b4ba1e15 Shuffling to prepare for MediaProvider APEX.
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX.  This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:

-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().

Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
2019-12-18 01:35:46 +00:00
Jeffrey Huang
8c1ae5aef8 Create statsmanager service
Bug: 146074170
Test: Manual
Change-Id: Ia96f2df24e660fe3293fb2e873e9050a55398cee
2019-12-17 16:54:11 -08:00
Ytai Ben-tsvi
0d52f4202c Merge changes from topic "soundtrigger_refactor"
* changes:
  Migrate SoundTrigger implementation to new service
  Implement the soundtrigger_middlewware service
  Add a permission for preempting sound trigger sessions
  Sound trigger middleware service definition
  Add audio.common types AIDL definition
2019-12-17 22:33:55 +00:00
David Su
073ec93bbe Merge "Expose @hide APIs needed by ParceledListSlice" 2019-12-17 19:24:41 +00:00
Winson Chiu
14610721fe Merge changes from topic "overlay-vis-remerge"
* changes:
  Move MockitoUtils to server om package
  Revert "Revert "Overlay, actor, and target app visibility handling""
2019-12-17 19:06:28 +00:00
TreeHugger Robot
5f97823473 Merge "Expose request data to InstantAppResolverService" 2019-12-17 17:16:27 +00:00
Alex Buynytskyy
da20815511 DataLoader version of installation API.
Test: atest PackageManagerShellCommandTest
Bug: b/136132412 b/146080380

Change-Id: Ifd899c7d43d20fb1851118676fbc892c4e40a3ff
2019-12-17 01:26:58 +00:00
David Su
87e22207bf Expose @hide APIs needed by ParceledListSlice
Expose @hide APIs referenced by ParceledListSlice/
BaseParceledListSlice as public APIs.

ParceledListSlice will not be made a stable API
in Android R. Thus, allow it to be copied into
modules that need it by ensuring it does not use
any @hide APIs.

Bug: 145317012
Test: compiles
Change-Id: Ife85b66005ba22b03c09bf9446661368dea31945
2019-12-16 16:26:18 -08:00
Automerger Merge Worker
960a8cf90a Merge "[RCS] Add IMS service into system service registry" am: 6a1d13f58e am: a962a65575 am: fb829df378
Change-Id: Ic52862b93399069b4792df8fe924ff152bef2326
2019-12-17 00:24:19 +00:00
Automerger Merge Worker
fb829df378 Merge "[RCS] Add IMS service into system service registry" am: 6a1d13f58e am: a962a65575
Change-Id: I61549d3d4da7ffdf5f2d497e52cd7a2fdd0f2c05
2019-12-17 00:10:51 +00:00
James Lin
6a1d13f58e Merge "[RCS] Add IMS service into system service registry" 2019-12-16 23:28:44 +00:00
Ytai Ben-Tsvi
93c117c86f Implement the soundtrigger_middlewware service
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h

This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
  concerns).
- Permission-based security model (as opposed to some baked-in
  assumptions about process affinity).

Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343
2019-12-16 14:15:37 -08:00
TreeHugger Robot
92454a87f8 Merge "Fix parsing <profileable> in AndroidManifest.xml" 2019-12-16 17:43:59 +00:00