Commit Graph

3783 Commits

Author SHA1 Message Date
Youngsang Cho
11a27b19d1 Merge "PIP: Use long press HOME for PIP on Android TV (2/2)" 2016-01-15 19:56:55 +00:00
Christopher Tate
e9fd1fa31a Back up / restore runtime permission grants
Only user-originated grant actions are backed up/restored.  This
includes outright grants, one-time denials, and "never ask again"
type denials.

Bug 19870549

Change-Id: I78b4a8abb713dc5d74b93cb53217b212d57b26e4
2016-01-15 10:44:48 -08:00
Jaewan Kim
52632e21fa PIP: Use long press HOME for PIP on Android TV (2/2)
Bug: 25580820
Change-Id: Ic269132ec7de1e725989ad57a1ee205b3334e3bb
2016-01-15 09:29:34 -08:00
Etan Cohen
3da7357951 Merge "NAN: baseline NAN manager for discovery." into mm-wireless-dev
am: e540b64aaf

* commit 'e540b64aaf58460f7930a5e4937cee660215c948':
  NAN: baseline NAN manager for discovery.
2016-01-15 01:29:48 +00:00
Alex Klyubin
224af9e3f8 Merge "Verify APKs using APK Signature Scheme v2." 2016-01-14 23:14:46 +00:00
Etan Cohen
20d329b08d NAN: baseline NAN manager for discovery.
Initial framework for user API (all @hide for now). Supports:
- NAN configuration
- Publish/Subscribe = Discovery
- Message passing
- Notifications

Bug: 26216681
Change-Id: I72e467756a02f7b80c52fae916b9a47c8174af42
2016-01-14 11:34:07 -08:00
Dongwon Kang
32cb9ab5cc Fix javadoc related to ACTION_MEDIA_RESOURCE_GRANTED
This addresses comments left in If506a533c5c7b567e770217a9430bf68b539677a

Change-Id: I6f952db6a8fa246d974bab556be3e21fe1b7f3da
2016-01-13 18:11:10 -08:00
Dongwon Kang
ab064b3b36 Merge "Add a way for SystemUI to receive media resource (e.g. A/V codec) usage" 2016-01-13 18:21:00 +00:00
Alex Klyubin
e415718502 Verify APKs using APK Signature Scheme v2.
This makes Package Manager check whether an APK is signed using APK
Signature Scheme v2 and, if it is, verify the APK's signatures using
that scheme rather than the usual JAR signature scheme.

APK Signature Scheme v2 is a whole-file signature scheme which aims
to protect every single bit of the APK as opposed to the JAR signature
scheme which protects only the names and uncompressed contents of ZIP
entries.

The two main goals of APK Signature Scheme v2 are:
1. Detect any unauthorized modifications to the APK. This is achieved
   by making the signature cover every byte of the APK being signed.
2. Enable much faster signature and integrity verification. This is
   achieved by requiring only a minimal amount of APK parsing before
   the signature is verified, thus completely bypassing ZIP entry
   decompression and by making integrity verification parallelizable
   by employing a hash tree.

Bug: 25794543
Change-Id: If59fe013f2e62bac7677bb20e65f6061b91eec2e
2016-01-13 09:36:41 -08:00
Robert Sesek
81d867f5db Merge "Add external services, a way to run isolated processes as a different package." 2016-01-13 17:23:36 +00:00
Jeff Sharkey
c3132513bf Parsing a static archive should be stateless.
When the caller hasn't specific encryption-related matching flags,
we should match both aware and unaware components.

Bug: 26508249
Change-Id: I2c35f6e00e451ba3f5fa0810223b7a3d80dee233
2016-01-12 14:07:00 -07:00
Dongwon Kang
2034a4c4c5 Add a way for SystemUI to receive media resource (e.g. A/V codec) usage
Bug: 26175834
Change-Id: If506a533c5c7b567e770217a9430bf68b539677a
2016-01-12 10:54:34 -08:00
Robert Sesek
b9a8666eb5 Add external services, a way to run isolated processes as a different package.
This adds android:externalService boolean attribute to <service>. If that
attribute is true, then bindService() may be called with
BIND_EXTERNAL_SERVICE to create the new service process under the calling
package's name and uid. The service will execute the code from the package in
which it is declared, but will appear to run as the calling application.

External services may only be used if android:exported="false" and
android:isolatedProcess="true".

Bug: 22084679
Bug: 21643067
Change-Id: I3c3a5f0ef58738316c5efeab9044e43e09220d01
2016-01-12 13:00:42 -05:00
Jeff Sharkey
9229ee5959 Merge "Install non-EA providers once user is unlocked." 2016-01-12 03:16:22 +00:00
Todd Kennedy
12705131b9 Hide ephemerality
Change-Id: Ibf60366b3f00b1920e330cd804bcc1c550f8882a

Bug: 26404647
2016-01-11 16:21:03 -08:00
Jeff Sharkey
5eeefba37c Merge "Temporary patch to work around broken casting." 2016-01-11 03:41:22 +00:00
Jeff Sharkey
6c4b87be9e Temporary patch to work around broken casting.
Bug: 26481405
Change-Id: If91ecfbfda94a2cb694098d456126f87311e1d05
2016-01-10 20:40:08 -07:00
Jeff Sharkey
bc215b8426 Merge "Fix NPE when UID has no packages." 2016-01-10 20:18:20 +00:00
Jeff Sharkey
377ded0fce Fix NPE when UID has no packages.
Bug: 25224723
Change-Id: I637214666a1f02bd23474c27a285eea9152cfa9d
2016-01-10 13:15:43 -07:00
Jeff Sharkey
2bd31dbd02 Install non-EA providers once user is unlocked.
When starting encryption-aware apps while the device is locked, we
can only spin up ContentProviders that have been marked as
encryption-aware.  Once the user is unlocked, we need to go back and
install non-encryption-aware providers in already running apps.

Fix bugs in getPackageInfo() where only one of the various MATCH_
flags was being consulted (!).  Move matching logic to single unified
location in PackageUserState so we have consistent behavior.

Fix another class of bugs where Safe Mode wasn't correctly filtering
package details (!).  These bugs are fixed by splicing in the new
MATCH_SYSTEM_ONLY flag as part of state-based flag mutation that was
added for encryption.

Bug: 25944787
Change-Id: I39c8da74b1f9ba944cc817176983f50ba322329c
2016-01-09 19:28:09 -07:00
Jeff Sharkey
3ea44a52f0 Device encrypted storage is always available.
In order to support backup/restore on devices without native FBE
support, we always need to make the DE storage area available.  Add
docs clarifying the lifecycle.

Bug: 26279618
Change-Id: I789915f295b10aca6bf80ca58406aea212835ffd
2016-01-09 15:34:44 -07:00
Jeff Sharkey
5aa86938b8 Fix docs build by removing bad links.
Also define InstallFlags and DeleteFlags, and point installPackage()
users towards new PackageInstaller APIs.  Remove old movePackage()
API that is no longer used.

Change-Id: I661a65149e4778a7591dbd912b72b4dd81b266da
2016-01-08 19:13:43 -07:00
Amith Yamasani
2b60ca45a1 Fix typo in javadoc
Change-Id: I7a61f84f9d19d5ebc64c3a6e01eea42c3fac4fed
2016-01-08 17:53:18 -08:00
Jeff Sharkey
cd65448ccd Even more PackageManager caller triage.
Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
2016-01-08 18:35:54 -07:00
Jeff Sharkey
629f98466a Fix build.
Change-Id: If128c90225a2237ea015063cec526a64af5bf576
2016-01-08 16:36:54 -07:00
Jeff Sharkey
c4fd3c9871 Merge "Update javadoc for flags" 2016-01-08 23:18:13 +00:00
Todd Kennedy
6b9bfa1d16 Update javadoc for flags
Bug: 25997037
Change-Id: Ia44634b0271ad0195d857ef13afec2a1ef022fae
2016-01-08 16:16:25 -07:00
Jeff Sharkey
0ab0bdde2b Merge "More progress on triaging PackageManager callers." 2016-01-08 23:14:25 +00:00
Jeff Sharkey
c5967e9862 More progress on triaging PackageManager callers.
Catch a bunch of simple cases where the PackageManager flags are
obvious.  Add the ability to use the MATCH_SYSTEM_ONLY flag on
PackageInfo and ApplicationInfo queries.

Re-examine recent tasks after a user is unlocked, since some of the
activities may now be available and runnable.

Bug: 26471205, 26253870
Change-Id: I989d9f8409070e5cae13202b47e2c7de85bf4a5b
2016-01-08 16:10:33 -07:00
Jeff Sharkey
bd94022893 Oh look, GmsCore is using more hidden APIs.
Bug: 26429932
Change-Id: Ie949d4bbdead8864aaed16282a591258ef528ca8
2016-01-08 11:10:32 -07:00
Jeff Sharkey
703fe24e25 Null cursors don't need to be wrapped.
Change-Id: I59b604a60a066c2d808a796658757af952ef913c
2016-01-07 18:52:26 -07:00
Jeff Sharkey
ba75a9b6ba Instrumentation targets must have code.
If they don't have code, give the developer a somewhat helpful error
message instead of later falling into a weird classpath failure.

Change-Id: Iebda10173ff99943cbbd71127ae24aa455b709f4
2016-01-07 12:03:16 -07:00
Jeff Sharkey
8588bc1ef1 Add flags to requests for package UID/GIDs.
This gives callers the ability to request details for missing
packages.  Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
2016-01-07 10:33:26 -07:00
Jeff Sharkey
8b0db0401e GmsCore is casting to a concrete subclass, sigh.
Since this technically wasn't an API change, there isn't a good
reason to protect with target API.  So change the behavior based on
the caller for now.

Bug: 26438049
Change-Id: I65aa1fc9af1f935544f8e191444440af4f98f26f
2016-01-07 09:47:23 -07:00
Jeff Sharkey
a73b8fd1f4 Add some TestApis to fix build.
Change-Id: Icf0d8d63f3a41d99e46ebe96003863bae637bd9d
2016-01-06 17:37:32 -07:00
Jeff Sharkey
51f3908c6a Merge "Consistent naming for PackageManager methods." 2016-01-06 22:26:16 +00:00
Jeff Sharkey
e06b4d1d9f Consistent naming for PackageManager methods.
When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix.  This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
2016-01-06 15:21:06 -07:00
Jeff Sharkey
81cf69a3b4 Merge "Update logic for resolving verifiers." 2016-01-06 21:50:06 +00:00
Jeff Sharkey
2a90f673f5 Update logic for resolving verifiers.
Verifiers or installers may not be encryption-aware, or the user may
have disabled them, so we probe pretty deeply during system boot to
resolve them.  Use the new MATCH_SYSTEM_ONLY flag to limit results to
packages on the system image.

When there are multiple matches, pick the one with highest priority
instead of crashing the system.

Switch to updated MATCH_ constants in more places.

Bug: 26250295
Change-Id: Ia7a3b1fb74da6c3b9d2c2edbf1deaa9fb52fc40a
2016-01-06 13:49:55 -07:00
Alan Viverette
946502f50a Merge "Cache XML blocks against file name rather than resource ID" 2016-01-06 20:36:05 +00:00
Alan Viverette
b7e3363359 Merge "Clean up asset manager package-private methods" 2016-01-06 20:29:49 +00:00
Alan Viverette
ec76b2a1d8 Merge "Skip the cache when loading drawables from a foreign density" 2016-01-06 20:29:19 +00:00
Alan Viverette
1097961389 Cache XML blocks against file name rather than resource ID
Caching against resource ID leads to incorrect cache hits, since multiple
files (ex. within drawable-mdpi, drawable-ldpi) may map to the same ID.

Also adds nullability annotations.

Bug: 26400880
Change-Id: I4d83caf3c44dc9b546511753e9e72171e8850eb2
2016-01-06 15:27:35 -05:00
Jeff Sharkey
11dce73277 Merge "Add Ethernet feature." 2016-01-06 18:04:57 +00:00
Jeff Sharkey
4efb8b4030 Add Ethernet feature.
Change-Id: I1f1badff5a8c9237d9489497e36e2578266e34b4
2016-01-06 11:02:52 -07:00
Jeff Sharkey
62728e3107 Merge "Discourage use of "_data" column." 2016-01-06 17:26:25 +00:00
Jeff Sharkey
60cfad80bd Discourage use of "_data" column.
Moving forward, all client file access really needs to be going
through explicit APIs like openFileDescriptor(), since that allows
the provider to better protect its underlying files.

This change also changes several classes to use the AutoClosable
pattern, which enables try-with-resources usage.  Older release()
methods are deprecated in favor of close().

Uniformly apply CloseGuard across several classes, using
AtomicBoolean to avoid double-freeing, and fix several resource
leaks and bugs related to MediaScanner allocation.  Switch
MediaScanner and friends to use public API instead of raw AIDL calls.

Bug: 22958127
Change-Id: Id722379f72c9e4b80d8b72550d7ce90e5e2bc786
2016-01-06 10:19:35 -07:00
Clara Bayarri
8819c61bcf Merge "Work Challenge: Handle Recents launches" 2016-01-06 16:57:55 +00:00
Clara Bayarri
ea9b10e644 Work Challenge: Handle Recents launches
Intercept calls to start activities from the recents
stack and show the Work Challenge if needed. This requires
passing the taskId to ConfirmDeviceCredential so it can
launch the recents task itself when the credentials are
confirmed.

Change-Id: I013b134f3f31a35b551ad683c68cc89b8af44499
2016-01-06 16:17:08 +00:00
Alan Viverette
7941a7fd8e Skip the cache when loading drawables from a foreign density
Bug: 26400880
Change-Id: I87c06b30afc61495fe62aa6a9dfe77990200cde7
2016-01-06 11:11:53 -05:00