Commit Graph

17828 Commits

Author SHA1 Message Date
Neil Fuller
a41fdcb20a Change SystemApi as per API council feedback
API council have requested a manifest constant be added
to the SystemApi directly in preference to an indirect
SystemApi constant here:
android.provider.TimeZoneRulesDataContract.READER_PERMISSION.

This is the first of three changes to (1) add the new constant,
(2) switch over code using the constant, (3) remove the
constant.

Bug: 64568899
Test: None, build only
Change-Id: Ib9766591979886d1db3b1d7321536dabf5cf81a8
(cherry picked from commit 8bb4140516)
2017-08-11 15:09:52 +00:00
TreeHugger Robot
edf3384307 Merge "SharedMemory API changes" into oc-mr1-dev 2017-08-10 19:41:53 +00:00
Hall Liu
d259d8b80f Merge "Hide the SEND_EMBMS_INTENTS permission" into oc-mr1-dev 2017-08-10 18:20:47 +00:00
Jeff Sharkey
5cb2d64b9b Merge "Fix handling of @removed APIs." into oc-mr1-dev 2017-08-10 15:18:58 +00:00
TreeHugger Robot
c75f43c1ab Merge "Go: add features for low ram / normal ram devices." into oc-mr1-dev 2017-08-10 04:35:09 +00:00
Dianne Hackborn
2a103f126f Go: add features for low ram / normal ram devices.
Automatically populated from ActivityManager.isLowRamDevice().

Test: manual

Change-Id: I027b8ae0205c9793a91ffdd2635479610a62aff9
2017-08-09 17:14:00 -07:00
Hall Liu
14f52d9e9d Hide the SEND_EMBMS_INTENTS permission
Bug: 64340162
Change-Id: Ia9370c0e80bb3a99df5008febc994846204272c1
2017-08-09 16:25:45 -07:00
Jeff Sharkey
f52db085e2 Fix handling of @removed APIs.
The @removed docs tag means that a particular API should be considered
as removed from the API surface area that it otherwise would have been
exposed through.

This set of CLs is fixing a bug where we @removed had been treated as
always removing from the public API.

Bug: 62341924
Test: make -j32 update-api
Change-Id: I336b2df4804e947a0b93a12269d6e7c5594eef7e
2017-08-09 09:18:20 -06:00
TreeHugger Robot
e551d361ac Merge "Allow applications to define failure handlers" into oc-mr1-dev 2017-08-09 14:55:09 +00:00
TreeHugger Robot
81021c77c8 Merge changes from topic 'ClosebySystem' into oc-mr1-dev
* changes:
  Allow to close session from wrong context.
  Prevent closing by prev owner after transfer.
  Revert "Revert session-transfer change"
2017-08-09 01:01:11 +00:00
TreeHugger Robot
6bf2990e28 Merge "Add virtual preload bit to ApplicationInfo" into oc-mr1-dev 2017-08-08 23:33:03 +00:00
Todd Kennedy
d0084f7583 Allow applications to define failure handlers
Fixes: 37956764
Test: Manual
Test: Create a test app with no handler, see it's not passed to the installer
Test: Create a test app with a handler, see it's passed to the installer
Test: Create a test app with multiple handlers, see one is passed to the installer
Test: Create a test app with a handler defined in a split, see it's not passed to the installer
Change-Id: Idfc3648154afca7ec300019d9695417274118d6f
2017-08-08 22:17:13 +00:00
Todd Kennedy
5eb5a7db83 Add virtual preload bit to ApplicationInfo
Change-Id: I2735b3823a8709b2ffb65cc8085ffcd952d3e1f2
Fixes: 64205417
Test: Manual
Test: Create a sample app and install it as a normal app
Test: See that it returns 'false' for "isVirtualPreload"
Test: Create a sample app and install it as a virtual preload ["--preload"]
Test: See that it returns 'true' for "isVirtualPreload"
Test: Run sample apps after reboot and see they return the correct value
2017-08-08 13:50:07 -07:00
Philip P. Moltmann
7460c5917b Revert "Revert session-transfer change"
This reverts commit 9890f8b426.

Bug: 64467704
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionParamsUnitTest
      cts-tradefed run singleCommand cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
Change-Id: I0cc7e1129d85e4d0de16ade44232a9bd381d6c04
2017-08-08 13:17:15 -07:00
Philip P. Moltmann
7bec053dff Merge "Revert session-transfer change" into oc-mr1-dev 2017-08-08 19:49:13 +00:00
Philip P. Moltmann
9890f8b426 Revert session-transfer change
This reverts:
5d74493f64
94deaf7725

Bug: 64467704
Test: none, 100% revert
Change-Id: I6534c19c594dadfa41457725988485a67f0ed45f
2017-08-08 11:04:56 -07:00
Fyodor Kupolov
3102245b62 Merge "API Review update for SQLiteDatabase" into oc-mr1-dev 2017-08-08 16:46:24 +00:00
TreeHugger Robot
fdaad13803 Merge changes from topic 'TransferInstallSession-oc-mr1-dev' into oc-mr1-dev
* changes:
  Allow to read all params used to create session.
  Allow to transfer+seal a install session
2017-08-08 00:45:48 +00:00
Tomasz Wasilczyk
ecacb9850c Merge "Change VENDOR program types to range." into oc-mr1-dev 2017-08-08 00:35:09 +00:00
TreeHugger Robot
be3e4a6285 Merge "Minor Autofill changes after API council review." into oc-mr1-dev 2017-08-07 23:35:56 +00:00
John Reck
e4f60cce85 SharedMemory API changes
Hides getFd & getFileDescriptor due to lifecycle concenrs.
Adds ASharedMemory_dupFromJava to allow sharing a shared
memory region between Java & Native as safe as possible.
Mis-use results in an FD leak instead of double-close.

Bug: 64394076
Test: SharedMemory CTS tests
Change-Id: I01a5eb978fc4e99559a79baac75754c32f13bdc4
2017-08-07 15:36:10 -07:00
Fyodor Kupolov
76436c04a4 API Review update for SQLiteDatabase
SQLiteDatabase openDatabase -- should take File for first parameter
  instead of a String path

SQLiteDatabase.OpenParams.Builder -- make sure the javadocs says what
  the default openFlags is and default idle connection timeout

SQLiteDatabase createInMemory -- throw if it has trouble instead of
  returning null.

Test: cts/SQLiteDatabaseTest
Bug: 64331777
Bug: 64331778
Bug: 64330914

Change-Id: Ibecf4f4a6498795f9a5d12b94b77481e5745b523
2017-08-07 11:12:38 -07:00
Philip P. Moltmann
5d74493f64 Allow to read all params used to create session.
So that they can be verified by the app calling commit().

This really only makes sense if the app calling commit is different from
the app that created the session.

Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
      Installed and uninstalled packages via the PackageInstaller app

Change-Id: I5c954ca59b7582555bea847f3ddbba0aeefba301
2017-08-07 10:50:58 -07:00
Philip P. Moltmann
94deaf7725 Allow to transfer+seal a install session
... so that one package can supply the data and another one can issue
the commit.

Also allow reading of sealed sessions.

Also lock more in PackageInstallerSession so that we can be sure the
session is not used by the old package anymore once transferred and that
all calls into the session work on consistent data.

Bug: 37281396
Test: cts-tradefed run cts-dev -m CtsContentTestCases --test=android.content.pm.cts.InstallSessionTransferTest
      Installed and uninstalled packages via the PackageInstaller app
      Installed and uninstalled packages via the Google Play Store

Change-Id: Id4b7a0071d703b7d18c9f5bf2bd15ebf67086d07
2017-08-07 10:50:57 -07:00
Tomasz Wasilczyk
d2b5cfbdaa Change VENDOR program types to range.
Bug: b/64331420
Test: instrumentation
Change-Id: If5c56f09e2b9e272a40f0ca074a590ca6ec3a703
2017-08-07 10:20:24 -07:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Tomasz Wasilczyk
0f1776d08b Pass vendor-specific info as map.
This solves a problem of identifying, if a given application is talking
to a hardware that can handle format of these strings.

Bug: b/64229617
Test: VTS, instrumentation
Change-Id: I6f525be90105bfdc01a899feea2a3151719ec8d2
2017-08-03 18:21:22 -07:00
TreeHugger Robot
26a4940296 Merge "media: Add scaled video thumbnail extractor api." into oc-mr1-dev 2017-08-02 19:14:23 +00:00
Felipe Leme
c7cea5b79e Minor Autofill changes after API council review.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 64262815
Fixes: 64262816
Fixes: 64263294

Change-Id: I18fa6f24c13233a54a5dae9061c07bcdadfaf4a7
2017-08-02 10:30:29 -07:00
Todd Kennedy
5e049eb884 Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev 2017-08-02 14:23:16 +00:00
TreeHugger Robot
2ca4449d6b Merge "Add new Dolby Vision Profile types" into oc-mr1-dev 2017-08-01 20:31:01 +00:00
Neil Fuller
70ddf0932b Merge "Add a new constant to TimeZoneRulesDataContract" into oc-mr1-dev 2017-08-01 10:06:16 +00:00
Fyodor Kupolov
82f289a4b4 Merge "Added setIdleConnectionTimeout method" into oc-mr1-dev 2017-07-31 23:56:02 +00:00
Todd Kennedy
9da8b8a7fc Add new API to retrieve app names in a batch
Change-Id: I57e5c132bc58a32d70007a7a105775b526ff7bb9
Fixes: 62805090
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_null
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_empty
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_valid
2017-07-31 11:29:37 -07:00
Fyodor Kupolov
cf97b6b7f7 Added setIdleConnectionTimeout method
It allows apps to set time SQLite connection is allowed to be idle
before it is closed and removed from the pool.

Test: manual + DatabaseGeneralTest
Bug: 63398887
Change-Id: Ie09eeb4dc2b9e52ba67d9355b1f9bd869b148613
2017-07-31 11:05:57 -07:00
Neil Fuller
af4cfc5c81 Add a new constant to TimeZoneRulesDataContract
This enables time zone data app code (provided by Google)
to check the manifest (provided by the OEM) uses the right permission
without referencing internal manifest permission Strings directly.

Bug: 64139059
Test: Ran internal xTS tests
Change-Id: I4b1a8608beff3b5218ecf5162cfe8e31027e2007
(cherry picked from commit 8e2a85752b)
2017-07-31 18:20:05 +01:00
Jeff Sharkey
b7479988d2 Migrate plans to @SystemApi, evolve permissions.
We're not yet ready to commit to SubscriptionPlan as public API, so
relax to be @SystemApi instead.  Add a new MANAGE_SUBSCRIPTION_PLANS
permission that we require apps to hold, unless they've been
delegated access via a trusted CarrierService.

Since several apps have the ability to provide plans for a single
subId, we now remember the "owner" who set the current plan
information, and we refuse to leak plan information beyond the app
that originally set it.

Relax permissions check to not require READ_PHONE_STATE, since we're
only returning data that an app provided to us earlier.  Also fix
NPE when SubscriptionInfo is missing.

Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 63997177, 63928277, 64156138, 63903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
2017-07-28 16:59:14 -06:00
Hangyu Kuang
0552036bc8 media: Add scaled video thumbnail extractor api.
Bug: 62198298
Test: CTS test
Change-Id: Ic78e2dac38b596a10d2fae76bc22f8c43fadf444
2017-07-27 13:31:46 -07:00
Tima Vaisburd
2ebddfc398 Merge "Unhide get/setTextClassifier in WebView" into oc-mr1-dev 2017-07-27 00:45:21 +00:00
Fyodor Kupolov
56bd583162 Merge "Tests for lookaside configuration" into oc-mr1-dev 2017-07-26 20:50:47 +00:00
Tomasz Wasilczyk
68a0dafc13 Merge "Rename ACCESS_FM_RADIO to ACCESS_BROADCAST_RADIO permission." into oc-mr1-dev 2017-07-25 17:18:50 +00:00
TreeHugger Robot
be74124264 Merge "Add API for virtual preloads" into oc-mr1-dev 2017-07-25 16:13:08 +00:00
Todd Kennedy
78a72501af Add API for virtual preloads
Virtual preloads are applications that aren't actually on the
/system partition, but, act as if they were. One such distinction
is that these apps receive Intent.ACTION_BOOT_COMPLETED and start
out of the stopped state.

Change-Id: I812d3e7008b9d87e84aa33dbc4b3d8e8b334533c
Fix: 34855677
Test: Manual
Test: Install an app with "--preload"
Test: See that it receives Intent.ACTION_BOOT_COMPLETED
2017-07-25 06:48:39 -07:00
Fyodor Kupolov
b773312982 Tests for lookaside configuration
Test: android.database.sqlite.cts.SQLiteDatabaseTest
Test: android.database.sqlite.cts.SQLiteOpenHelperTest
Bug: 63998707
Change-Id: I2e84a6e98baf889001ef7537a290f7e2aa2d709a
2017-07-24 23:33:00 +00:00
Andrii Kulian
bfa0ed5110 Merge "DO NOT MERGE Add permission to launch activities on VD" into oc-mr1-dev 2017-07-24 18:42:25 +00:00
TreeHugger Robot
572cb5242d Merge "Expose shared buffer mode/auto refresh on Surface" into oc-mr1-dev 2017-07-22 03:01:02 +00:00
Romain Guy
0bbf0b41cc Expose shared buffer mode/auto refresh on Surface
These features can be set on a surface to reduce perceived latency
at the expense of visible tearing.

Bug: 63858546
Test: Manual, CTS test coming

Change-Id: Ica3f480bd1cb8f77dff57218d2fa8783433d3396
2017-07-21 16:11:17 -07:00
Tomasz Wasilczyk
df77643cd8 Rename ACCESS_FM_RADIO to ACCESS_BROADCAST_RADIO permission.
This is a backwards incompatible change against System API,
but as there are no existing radio apps, nobody uses it.

Bug: b/63405337
Test: manual
Change-Id: Iaf6085914434be01e1c1e363609e5b0087ffe127
2017-07-21 14:22:05 -07:00
Andrii Kulian
02689a7884 DO NOT MERGE Add permission to launch activities on VD
1. Added permission ACTIVITY_EMBEDDING which allows apps to launch
activities on virtual displays.
2. Allow owner of display to launch activities from same app without
permission check to owned display.
3. Added permission checks for launching on secondary displays to
more target task/stack resolution paths in ActivityStarter.

Bug: 63117330
Test: android.server.cts.ActivityManagerDisplayTests
Test: go/wm-smoke
Change-Id: If169a77fb56241e06f7de20168dc38c4b0a217f5
(cherry picked from commit 7158764983)
2017-07-21 18:31:20 +00:00
Previr Rangroo
307da62b1c Add new Dolby Vision Profile types
Test: build

Change-Id: I475a0ec5b510523434e0c53c5085c58908e4ed83
Signed-off-by: Previr Rangroo <prang@dolby.com>
2017-07-21 18:18:08 +00:00