Commit Graph

3043 Commits

Author SHA1 Message Date
Dmitriy Ivanov
d95e58cb60 Merge "Load libraries directly from apk" 2015-04-07 17:28:15 +00:00
Dmitriy Ivanov
dec4688f40 Load libraries directly from apk
Introduced new 'extractNativeLibs' attribute to manifest/application.
 Setting it to false prevents installer from extracting library from apk.

 The default value for extractNativeLibs is true.

Bug: 8076853
(cherry picked from commit ff193d642e)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-04-07 17:25:23 +00:00
Fyodor Kupolov
b94c1657eb Support for storing OAT files in app directory
In installPackageLI, dexopt is now performed on a staging directory of the app
(dexopt phase 1). For each codepath:
 - /oat/<isa> directory is created
 - dexopt output goes to the newly created directory. Optimized files have
   .odex extension.

Bug: 19550105
Change-Id: Iec59790d97837b78af82b079fd1970de3388c91d
2015-03-30 11:32:56 -07:00
Alex Klyubin
01a959d60a Add app-level usesCleartextTraffic manifest attribute.
The attribute declares whether the app intends to use cleartext
network traffic (e.g., HTTP, WebSockets, XMPP, SMTP, IMAP -- without
TLS or STARTTLS). The default value is true. If set to false, the app
declares that it does not intend to use cleartext network traffic. In
this case the app requests the platform, tooling, and third-party
libraries to prevent it from using cleartext traffic. The danger of
cleartext network traffic is that its confidentiality, authenticity,
and integrity are not guaranteed.

This feature is designed to help apps which care about security of
data exchanged over the network. These apps can accidentally
regress/downgrade to using cleartext network communications. This
typically happens when the server the app communicates with all of a
sudden tells it to use cleartext communications (e.g, HTTP URL
instead of an HTTPS URL) or when one of the components of the app gets
updated and regresses to cleartext communications without the
developer noticing.

In general, the prevention measures are on best effort basis. It's
impossible to automatically prevent all instances of cleartext
traffic. For example, an app bent on bypassing restrictions could
perform low-level network I/O with unusual TCP packet fragmentation,
or could use a custom application-level protocol.

The expectation is that most apps use libraries for network
communications and these libraries over time will start to honor this
flag, thus increasing the protections offered by it.

Bug: 19215516
Change-Id: I8700d51ddbc5d528faa4b6a5fa5bc9551ad02d13
2015-03-18 10:46:56 -07:00
Fyodor Kupolov
7487657ee9 Extracted a separate class to run dexopt on packages
performDexOptLibsLI and related methods were extracted to PackageDexOptimizer
class. Minor refactoring of PackageManagerService.

This is a non-functional change. It should simplify further work to allow
storing OAT files inside package dir.

(cherry picked from commit eeea67b8c3)

Change-Id: I3494a2da70605362bb6fb4625ffbee1cbe1cd457
2015-03-11 16:03:41 -07:00
Andreas Gampe
5596600697 am 7a4cb563: Merge "Frameworks/base: Remove unnecessary Pattern instance"
* commit '7a4cb563a29f05658760739d3bc2e70bd6342174':
  Frameworks/base: Remove unnecessary Pattern instance
2015-03-07 17:13:16 +00:00
Andreas Gampe
055678b5fe Frameworks/base: Remove unnecessary Pattern instance
Using a static Pattern in UriMatcher prevents compile-time
initialization.

It is also not efficient, as String.split has a fast path for simple
splits.

Bug: 19542228

Change-Id: Ie9e5bfe6da04c6d05ec10b1426d0cd136ef46ef2
2015-03-07 00:19:01 +00:00
Narayan Kamath
948682d15f am 6e208cdd: Merge "Remove wrong javadoc comment"
* commit '6e208cddad3315c4e38accdb801908b2b9b5cbbd':
  Remove wrong javadoc comment
2015-02-24 10:11:52 +00:00
Narayan Kamath
6e208cddad Merge "Remove wrong javadoc comment" 2015-02-24 10:04:33 +00:00
Alex Klyubin
33d3c53da0 resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp
Change-Id: Ic20b6c8851458483dd73a144bd5ae6e8d141e62a
2015-02-11 12:37:12 -08:00
Alex Klyubin
b9f8a5204a Move hidden ApplicationInfo flags into a separate field.
The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).

The new privateFlags field is not public API and should not be used
for flags that are public API.

The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.

NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.

Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
2015-02-11 11:06:40 -08:00
Amith Yamasani
2b865d7e16 am a6318cd7: am d09878c1: am 61333d1b: Merge "Limit cache update to packages that have changed" into lmp-mr1-dev
* commit 'a6318cd7f29c87bce2dfe9b74ff4a89c945be591':
  Limit cache update to packages that have changed
2015-02-09 20:41:55 +00:00
Amith Yamasani
460a7b4619 Limit cache update to packages that have changed
When updating the RegisteredServicesCache, don't remove any packages
that are not in the list of modified packages.

Bug: 19228972
Change-Id: Id4f264403b7ceca9005854dfbbc25abfd7b54889
2015-02-09 11:10:31 -08:00
Ricardo Cervera
1e59b338e6 am 08314642: am 90312d80: am 22878790: am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '083146428420dd3daa887d6e9c019e747a604cb5':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:47:08 +00:00
Ricardo Cervera
90312d808f am 22878790: am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '2287879039556ad3c8fce58974e2396b4a2dab45':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:36:45 +00:00
Ricardo Cervera
2287879039 am 93f94c2c: resolved conflicts for merge of e8f6bd48 to lmp-dev
* commit '93f94c2ca5bf23533fc5a9bd70a4795584d20618':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 18:29:25 +00:00
Ricardo Cervera
93f94c2ca5 resolved conflicts for merge of e8f6bd48 to lmp-dev
Change-Id: Idc370182914d5060a721d34c26cd72598f2c6dff
2015-01-16 09:54:30 -08:00
Ricardo Cervera
e8f6bd4846 am 98f07d90: am 92f6a747: docs: Added info on noHistory and onActivityResult(). Bug: 13807256
* commit '98f07d901492335f51258655fbfa032fa3f2d58e':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 17:21:32 +00:00
Ricardo Cervera
98f07d9014 am 92f6a747: docs: Added info on noHistory and onActivityResult(). Bug: 13807256
* commit '92f6a747085b4b5ed692de4bdb0050c096eae393':
  docs: Added info on noHistory and onActivityResult(). Bug: 13807256
2015-01-16 17:14:44 +00:00
Dianne Hackborn
fce232b408 am 5a4b4084: am b96a6916: Merge "Fix issue android-app doc, bump battery stats checkin version" into lmp-mr1-dev
* commit '5a4b4084215b1efc5308c0c914185599b4d502bf':
  Fix issue android-app doc, bump battery stats checkin version
2015-01-15 01:52:21 +00:00
Dianne Hackborn
0ee10f6d26 Fix issue android-app doc, bump battery stats checkin version
Issue #18983662: API Reivew: clarify Intent docs for URI_ANDROID_APP_SCHEME
Issue #19019830: Bump up battery stats checkin version

Change-Id: I0bd8f32b9d8d5978bd01d421ea2232d20def340a
2015-01-14 16:16:13 -08:00
Olawale Ogunwale
0f8ecc84c8 am 9d293911: am ebdfb6e8: Merge "[ActivityManager] Distinguish FG or BG receiver finished"
* commit '9d293911221cac930eb8edfef01362ea083eeaab':
  [ActivityManager] Distinguish FG or BG receiver finished
2015-01-12 16:44:28 +00:00
riddle_hsu
1f5ac4d322 [ActivityManager] Distinguish FG or BG receiver finished
Symptom:
Assume a foreground broadcast FG and a background BG.
If a recevier registers both FG and BG. When sending
BG and FG to the receiver, and the receiver BG receiver
completes first, its finishReceiver will trigger next FG
receiver rather than BG, and also deliver wrong result
code/data to the next.

More detail and sample:
https://code.google.com/p/android/issues/detail?id=92917

Root cause:
Due to BroadcastQueue:getMatchingOrderedReceiver will match
by receiver(IBinder), so the caller ActivityManagerService:
broadcastRecordForReceiverLocked will always match the first
queue(fg) if a receiver is both receiving fg and bg.

Solution:
Add a parameter flags to finishReceiver, then server side
could know the finished receiver should belong to which queue.

Another general solution but with bigger scope:
I60dce4a48e20c1002a61a979e4d78b9b0a8b94a0

Change-Id: I913ca6f101ac8ec6c7a8e42754e6781f80247b7f
2015-01-03 15:38:21 +08:00
Michael Wright
342e903000 am 95700457: am a33424a5: Merge "Add MEDIA_PROJECTION_SERVICE to the ServiceName list." into lmp-mr1-dev
* commit '95700457139803af54a5e731816cedf1c924f3a6':
  Add MEDIA_PROJECTION_SERVICE to the ServiceName list.
2014-12-30 19:51:20 +00:00
Michael Wright
446e019a06 Add MEDIA_PROJECTION_SERVICE to the ServiceName list.
This prevents our lint tooling from complaining that we're passing
invalid values when trying to get the MediaProjectionManager.

Bug: 18830590
Change-Id: I34633248e895b0ac7f5083e18a7d2385ca6f8adb
2014-12-23 17:01:49 -08:00
Jay Shrauner
58d66c30d7 am 12b5e504: Merge "Fix NPE in Transport.applyBatch" into lmp-mr1-dev
automerge: 59e96ee

* commit '59e96ee423f4fc810f29451144143a581a8cd99a':
  Fix NPE in Transport.applyBatch
2014-12-16 01:45:09 +00:00
Jay Shrauner
ac2506c7e3 Fix NPE in Transport.applyBatch
Bug:18756774
Change-Id: I1da4f0131b1529598043e4cb9fb226d02bff8669
2014-12-15 13:25:52 -08:00
Dianne Hackborn
9b287368b0 am 6bdbae07: Merge "Fix issue #18665625 CTS:android.app.cts.InstrumentationTest#..." into lmp-mr1-dev
automerge: 7557ec1

* commit '7557ec128f3d2e6dca42b92b2771d1cf486cbb0c':
  Fix issue #18665625 CTS:android.app.cts.InstrumentationTest#...
2014-12-10 19:21:58 +00:00
Dianne Hackborn
80b1c5608e Fix issue #18665625 CTS:android.app.cts.InstrumentationTest#...
...testCallActivityOnNewIntent test fails with LMP-MR1 Release.

Check for null.

Also fix some small issues with converting intents to/from intents.

Change-Id: Ic391cc57552635935af9a271b2d09353257f6d14
2014-12-09 20:22:08 -08:00
Eino-Ville Talvala
431b65d11f am 6e21817b: am d23f8b44: Merge "Revert "Camera: Add new capability flags as system features as well"" into lmp-mr1-dev
* commit '6e21817b8ef160fae5e7046745cb11ceab06b2d7':
  Revert "Camera: Add new capability flags as system features as well"
2014-12-04 20:23:45 +00:00
Dianne Hackborn
3c8a439be3 am e6333e51: am f696efa2: Merge "Fix issue #17948584: Application crash and phone restart when app..." into lmp-mr1-dev
* commit 'e6333e5188fd4becf7dea286c768f55c3b89d63e':
  Fix issue #17948584: Application crash and phone restart when app...
2014-12-04 20:23:25 +00:00
Eino-Ville Talvala
d23f8b44d5 Merge "Revert "Camera: Add new capability flags as system features as well"" into lmp-mr1-dev 2014-12-03 22:01:42 +00:00
Dianne Hackborn
f696efa206 Merge "Fix issue #17948584: Application crash and phone restart when app..." into lmp-mr1-dev 2014-12-03 21:32:17 +00:00
Eino-Ville Talvala
08a125562c Revert "Camera: Add new capability flags as system features as well"
This reverts commit 6aee1d2ba5.
But leaves in some of the improved documentation.

Bug: 18281970
Bug: 18573576
Change-Id: I320f2229456ac039bc8f3cd8bc8b4ea6cf0e80eb
2014-12-03 11:12:39 -08:00
Dianne Hackborn
1bc177c585 Fix issue #17948584: Application crash and phone restart when app...
...is installed with <provider> with empty string.

Don't allow empty authorities, just like we don't allow null authorities.

Change-Id: I5c64592a639efe4dba848bd6f0efe4257f1565a2
2014-12-03 10:20:30 -08:00
Alan Viverette
6c23ba0d8d am a6779bc5: am 9a888816: Merge "Deprecate one-arg getDrawableForDensity, update currents.txt" into lmp-mr1-dev
* commit 'a6779bc51772aae2ba4cc94db2ae47b76a2cc972':
  Deprecate one-arg getDrawableForDensity, update currents.txt
2014-12-02 23:45:25 +00:00
Alan Viverette
a6f8b2ce55 Deprecate one-arg getDrawableForDensity, update currents.txt
BUG: 18579576
Change-Id: I7df6ec2952ab121e2be8ae0a016ccf36f6fba2ff
2014-12-02 15:26:33 -08:00
Alan Viverette
0cd6296c0a am 63c7a655: am 1b33396e: Merge "Deprecate Resources.getDrawable(int) in favor of the two-arg version" into lmp-mr1-dev
* commit '63c7a655beab21da934d21bb4004889bfb6e4417':
  Deprecate Resources.getDrawable(int) in favor of the two-arg version
2014-12-02 23:19:28 +00:00
Adam Lesinski
9438ad1599 am e580d661: am e89a2865: Merge changes If2c7e09f,Ie21f227c
* commit 'e580d6617f67a1db5eff7ffe5450684cfc7e1a2b':
  RRO idmap: pad with 0xffffffff, not 0x00000000
  RRO: reintroduce lost ResTable insert of assets
2014-12-02 23:07:43 +00:00
Alan Viverette
c10e3960d9 Deprecate Resources.getDrawable(int) in favor of the two-arg version
This is a landmine for developers. If they need to obtain an unthemed
drawable, they should be using an explicit null theme.

BUG: 18579576
Change-Id: Ibca6b4c3e8e50dca144571244e035caec6fa91f8
2014-12-02 14:58:08 -08:00
Adam Lesinski
e89a286541 Merge changes If2c7e09f,Ie21f227c
* changes:
  RRO idmap: pad with 0xffffffff, not 0x00000000
  RRO: reintroduce lost ResTable insert of assets
2014-12-02 22:52:37 +00:00
Adam Lesinski
44a711ccac am 9f692b52: am 9be305d1: Merge "Make the Context service constant for UsageStats public" into lmp-mr1-dev
* commit '9f692b520255435903c8c1efb7b50f22a80505a5':
  Make the Context service constant for UsageStats public
2014-11-25 18:44:31 +00:00
Alan Viverette
67c55be39a am 0d05788f: am 760cfb02: Merge "Check for null drawable in theme-less getDrawable()" into lmp-mr1-dev
* commit '0d05788fd06b24068c269bfa80dd96deafb00357':
  Check for null drawable in theme-less getDrawable()
2014-11-25 17:49:53 +00:00
Jeff Sharkey
c02f304c3a am 58b699c3: am 636baa0d: Merge "Introduce revision codes for split APKs." into lmp-mr1-dev
* commit '58b699c366dea7abc26f34c1e5f1cc6031c04e23':
  Introduce revision codes for split APKs.
2014-11-25 17:39:16 +00:00
Adam Lesinski
9be305d146 Merge "Make the Context service constant for UsageStats public" into lmp-mr1-dev 2014-11-25 00:51:10 +00:00
Alan Viverette
760cfb02de Merge "Check for null drawable in theme-less getDrawable()" into lmp-mr1-dev 2014-11-24 21:57:51 +00:00
Adam Lesinski
aa6076701d Make the Context service constant for UsageStats public
This was an oversight in L, where we did not make this
service constant public.

Change-Id: I42e38cb5ef8420cadc1a4a6705821189d911ccfe
2014-11-24 13:53:57 -08:00
Jeff Sharkey
88d2a3c0e1 Introduce revision codes for split APKs.
Apps delivered as multiple split APKs must have identical package
names, version code, and signatures.  However, developers may want
to iterate quickly on a subset of splits without having to increment
the version code, which would require delivery of the entire app.

This change introduces "revision codes" which can vary between
split APKs belonging to the same app.  An install is valid as long
as the normal version code is identical across all splits.  Splits
can be added/removed to an app over time, but if a split is present
across an upgrade the revision code must not decrease.

Since system apps could have been updated with splits, only revert
to the built-in APKs if the version code is strictly greater than the
data version.  Also fix bug to enable inheriting from system apps
when adding splits.

Bug: 18481866
Change-Id: I34d8e14c141a8eb95c33ffe24b4e52d6af5c8260
2014-11-24 12:13:11 -08:00
Alan Viverette
7e0aaae3db Check for null drawable in theme-less getDrawable()
BUG: 18507509
Change-Id: I64e2950dc3a30f3979ec179789a6f6e055c9f86d
2014-11-24 11:27:09 -08:00
Wink Saville
b4c5410987 am 4f1cce63: am 12c2136e: Merge "Additional changes to SubscriptionManager API as per API council." into lmp-mr1-dev
* commit '4f1cce63061976490e2e2cfc4085e1634d3a02de':
  Additional changes to SubscriptionManager API as per API council.
2014-11-24 18:06:09 +00:00