Commit Graph

8658 Commits

Author SHA1 Message Date
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
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
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
Oli Lan
b8edc67908 Merge "Add rollback parameters when submitting sessions to apexd." 2019-12-16 09:42:15 +00:00
Alex Buynytskyy
247901bb4f Merge "[incremental] Java service and shell command handler" 2019-12-16 06:44:49 +00:00
Felka Chang
0d824d4161 Add the root of crates by Context.getCrateDir
Context.getCrateDir() creates and returns the File for the
root of the crates for the application context. Any child directories
under the crates root in Context.getDataFile() is called
the crate directory.

For example:
  /data/user/0/com.exmaple.app/crates/IAmCratedFolder/decentFiles
  /data/user/0/com.exmaple.app/crates/IAmCratedFolder/decentDirs

Context.getCrateDir return the crate dir
  --> /data/user/0/com.exmaple.app/crates/IAmCratedFolder

The crate dir
  --> IAmCratedFolder
The decent directories or files are not crated folders
  --> decentFiles, decentDirs

Test: atest CtsOsTestCases:android.os.storage.cts.StorageCrateTest
Bug: 141660526
Change-Id: If3ec1e121fb8f72bab5571d6190378e3ae208832
2019-12-16 09:52:12 +08:00
Etan Cohen
5b4cdd863e Merge "Wificond: transfer implementation to android.net.wifi" 2019-12-14 15:04:14 +00:00
Robin Lee
75ba497beb Merge "Revert submission" 2019-12-14 03:06:25 +00:00
Winson
7ea528a380 Fix parsing <profileable> in AndroidManifest.xml
Missing a break. Hopefully this is easier to catch in the latest
refactor code because it one-lines the parsing methods.

Bug: 146021976

Test: manual install app with <profileable>, no failure/warning logs

Change-Id: Ia8db9c9e67f895f7ce436f0fd5e80b25722ad24b
2019-12-13 14:56:49 -08:00
Hansong Zhang
b62b7b724d Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test

Reason for revert: Break tests
Bug: 146198238
Change-Id: I65060ca389bf3ae1f107552ca828bfc1e7baa7c1
2019-12-13 22:10:01 +00:00
Winson Chiu
2fdaf81c7a Revert "Revert "Overlay, actor, and target app visibility handling""
This reverts commit 637138dd94.

Exempt-From-Owner-Approval: Revert of revert, all necessary review will be in follow up

Reason for revert: Revert of revert for re-merge, follow up will fix test conflict

Change-Id: I6c5c3209d1fdb62cb6f733961ee8737dea4ca89b
2019-12-13 12:07:04 -08:00
Etan Cohen
73450f2004 Wificond: transfer implementation to android.net.wifi
Move implementation of wificond to frameworks/base (android.net.wifi)
in prepration for making into a public API (which will be a wrapper
around the AIDL).

Bug: 140062898
Test: atest com.android.server.wifi
Test: atest android.net.wifi
Test: associates, soft AP client information received correctly
Change-Id: I3c5ede95d0421a1e00078e0316e9a2e751156f3e
2019-12-13 11:18:54 -08:00
Songchun Fan
f5c894f7ce [incremental] Java service and shell command handler
Renaming:

IIncrementalManager.aidl -> IIncrementalManagerNative.aidl
IIncrementalServiceProxy.aidl -> IIncrementalManager.aidl

Adding implementation of IIncrementalManager.aidl. Also adding
implementation of the shell command handler.

Test: $adb abb incremental help

Change-Id: Ia18fde097f6170f4774552428a2927186ede8389
2019-12-13 09:38:07 -08:00
TreeHugger Robot
b3fa0c77a4 Merge "Return to direct mutation for Provider authority" 2019-12-13 15:32:00 +00:00
TreeHugger Robot
1f7780553f Merge "Fix generatePermissionGroupInfo" 2019-12-13 15:29:39 +00:00
Alan Stokes
ef055fc65c Merge "Pass initiatingPackageName to verifier." 2019-12-13 14:43:17 +00:00