Commit Graph

4149 Commits

Author SHA1 Message Date
TreeHugger Robot
dfe232c763 Merge "API council feedback: hide and document." into nyc-dev 2016-05-25 20:43:56 +00:00
Adam Lesinski
b61e405397 Improve performance of LocaleList with Resources
We allow each individual Resources object to select the best
Locale for the given APK. This allows one update to the configuration
instead of multiple updates, once the locale is chosen.

The Java locale is selected from the app context's locale.

Bug:28625993
Bug:27325465
Change-Id: I99e1e53f522e560f3b80bbd1e1c605f552dbdff0
2016-05-24 12:54:48 -07:00
TreeHugger Robot
6812bdf387 Merge "Use an attribute for the network security config resource" into nyc-dev 2016-05-23 02:23:26 +00:00
Roozbeh Pournader
6686711ba2 Merge "Clear locales without changing layout direction." into nyc-dev 2016-05-20 19:42:31 +00:00
Seigo Nonaka
bd5cac67b8 Clear locales without changing layout direction.
Calling Configuration.setLocales with emtpy LocaleList may change the
layout direction to LTR. To clear the locales in Configuration without
layout direction change, introduce hidden API to Configuration.

Bug: 28695661
Change-Id: I47c339dffb83099bd329ddb60237dab27b05f593
2016-05-20 17:59:35 +00:00
Jeff Sharkey
d21cad13a6 API council feedback: hide and document.
Hide isMetered() and clarify moveDatabaseFrom() docs.

Bug: 28870582, 28775585
Change-Id: Iabe63045c39ce7f662488f4224b56387c3c59519
2016-05-20 11:34:55 -06:00
Chad Brubaker
c845b2a21c Use an attribute for the network security config resource
Originally we went with the meta-data approach to make unbundling
easier, however with the amount of platform changes that the config
ended up relying on it would be better to focus on exposing it through
the platform.

Bug:28763009
Change-Id: Iaf80001b1980220cd2e1e05faf2dc86af41700e1
2016-05-19 17:25:41 -07:00
Andrii Kulian
005f9a73fb Merge "Workaround for ignored resizeableActivity param" into nyc-dev 2016-05-19 07:57:20 +00:00
Andrii Kulian
42b3acf9d3 Merge "Rename minWidth/Height attributes" into nyc-dev 2016-05-19 01:42:15 +00:00
Andrii Kulian
3f8dc15861 Workaround for ignored resizeableActivity param
If <uses-sdk> tag is below <application> in AndroidManifest.xml then,
when activity is parsed, targetSdkVersion param is not yet set correctly.
Because of that we're defaulting to RESIZE_MODE_FORCE_RESIZEABLE and the
param resizeableActivity will be ignored.
This CL checks if resizeableActivity was set explicitly when targetSdkVersion
is less than N (or not set).

Bug: 28020462
Change-Id: I099f6c00dd50547ddea873e47dbb447869d0be6f
2016-05-18 17:49:26 -07:00
Svetoslav Ganov
68c2919f70 Merge "Hide ephemeral API" into nyc-dev 2016-05-18 20:10:28 +00:00
Robert Sesek
f45bc095c6 Merge "Add clarifying documentation to Context.BIND_EXTERNAL_SERVICE." into nyc-dev 2016-05-18 15:25:41 +00:00
Svet Ganov
2265fddba6 Hide ephemeral API
bug:28825660

Change-Id: I4e9cdd6e29df44a173136aed13c4039443d944cc
2016-05-18 07:38:29 -07:00
Yohei Yukawa
23cbe85610 Move LocaleList to avoid layering violation.
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
2016-05-17 16:42:58 -07:00
Robert Sesek
55b2d11cd3 Add clarifying documentation to Context.BIND_EXTERNAL_SERVICE.
Bug: 28775488
Change-Id: Ic0473d3664671f0ac5df8412f61ca8c1d029887f
2016-05-17 18:53:13 -04:00
Andrii Kulian
f66a83db41 Rename minWidth/Height attributes
Rename WindowLayout#minimalWidth and #minimalHeight to #minWidth
and #minHeight to be consistent with other APIs.

Bug: 28775586
Change-Id: Ib7dc26318c4391693ef23f908b4d6090138dd0d7
2016-05-17 13:00:53 -07:00
Dianne Hackborn
607844efa5 Merge "Fix issue #27532364: Security Vulnerability in IIntentSender.send" into nyc-dev 2016-05-17 18:19:36 +00:00
Alan Viverette
5bcf7650b4 Merge "Update docs for ColorStateList to include alpha" into nyc-dev 2016-05-16 19:30:38 +00:00
Alan Viverette
582dcac856 Update docs for ColorStateList to include alpha
Bug: 28760030
Change-Id: I309364002220b9896f5ddf29dabde79636a722e9
2016-05-16 12:37:55 -04:00
Dianne Hackborn
0c4e6a8da3 Fix issue #27532364: Security Vulnerability in IIntentSender.send
We need to make IIntentSender oneway...  but when the system is
calling that for itself, it needs to be able to return a result code.

Solution: instead of directly calling the interface, we have a new
IPC through the activity manager.  If the thing being used is the
activity manager impl, it can do the synchronous send and return
the result directly in place.  If not, you only get asynchronous
sending and thus never a failure result back (too bad for you!).

Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
2016-05-13 17:37:08 -07:00
Steve Pomeroy
b31b1cc5ff ContentValues: improve documentation
Correct and clarify the documentation for ContentValues.

Signed-off-by: Steve Pomeroy <steve@staticfree.info>

(cherry picked from commit 1276b5f29e)

Change-Id: Id6f4e93dcca64dd41daeb4066d804ff173f4747b
2016-05-12 16:51:52 -07:00
Makoto Onuki
26edcba2c9 Merge "Remove ShortcutManager" into nyc-dev 2016-05-12 16:32:56 +00:00
Adam Lesinski
3723194dc8 Merge "BluetoothManager: Make requestControllerActivityInfo one call" into nyc-dev 2016-05-12 00:59:29 +00:00
Makoto Onuki
538c440c33 Remove ShortcutManager
Bug 28704708

Change-Id: If7b739adeec38d81d554fc1cf34c81194f5d67b9
2016-05-11 14:25:55 -07:00
Todd Kennedy
f09f069936 Merge "Fix secondary ABI instrumetion" into nyc-dev 2016-05-11 14:35:19 +00:00
Greg Kaiser
2d609eda74 GradientColor: Fix typo in documentation.
Bug: 28678266
Change-Id: I8f551108643698a1b6c573911509a4e48ad88783
2016-05-10 17:05:31 -07:00
Todd Kennedy
e713efcac1 Fix secondary ABI instrumetion
When installing an APK that supports multiple ABIs, the ABI installed
can be forced to the secondary ABI [i.e. On devices that support both
32 and 64 bit variants, the 32-bit version can be forced when it's
the secondary ABI.] In this case, instrumenting the class always tried
to use the primary ABI. Instead of blindly using the primary ABI and
dropping the secondary ABI, we propagate both ABIs and make a
decision on which one should be chosen.

Bug: 28406240
Change-Id: I7ebb2fd264d2281912afd30f6d73ccb460f9cf85
2016-05-10 15:16:13 -07:00
Adam Lesinski
991357fe25 BluetoothManager: Make requestControllerActivityInfo one call
Instead of making multiple calls into the Bluetooth service,
make one call that can timeout. This helps prevent cases
when the Bluetooth process hangs and the system_server is calling into
it and causes a WATCHDOG restart.

Bug:28658141
Change-Id: I37778b7b6e508be420a21bdf23593ae89b38f5b8
2016-05-10 14:00:03 -07:00
Ruben Brunk
01d232988a Merge "Update VR API docs." into nyc-dev 2016-05-04 23:35:44 +00:00
TreeHugger Robot
221c6e6db7 Merge "Fix ClipData JavaDoc and behavior that contradicts JavaDoc" into nyc-dev 2016-05-04 17:07:13 +00:00
Vladislav Kaznacheev
f67661cc7a Fix ClipData JavaDoc and behavior that contradicts JavaDoc
1. Expand JavaDoc for ClipData.addItem to clarify how MIME types are affected.
2. Add "text/uri-list" to MIME type list only for non-content URIs (as JavaDoc explicitly says).

Bug: 28564003
Change-Id: I074daf34310323725690a9ba2c7dff0542ed6349
2016-05-03 16:48:24 -07:00
TreeHugger Robot
77843a4213 Merge "Fix typos in ClipData JavaDoc" into nyc-dev 2016-05-03 19:28:32 +00:00
Vladislav Kaznacheev
7e4669c5a6 Fix typos in ClipData JavaDoc
Also removed the obsolete text regarding iconic representation
and fixed some whitespace.

Bug: 28536304
Change-Id: I55ca681b86a121018903a41fff228e7c6126c7e7
2016-05-03 10:09:06 -07:00
Makoto Onuki
7d164d35a4 Merge "ShortcutManager: finishing touches" into nyc-dev 2016-05-03 16:27:46 +00:00
Ruben Brunk
927d3453d3 Update VR API docs.
Bug: 28526281
Change-Id: Iff48d02a2fee542c5ded7fc8cd6cf74957eb738c
2016-05-02 19:30:51 -07:00
Svetoslav Ganov
d4d1512b64 Merge "Disable unused features" into nyc-dev 2016-05-03 01:37:01 +00:00
Svet Ganov
a7532cfa46 Disable unused features
The multi-package APKs feature was not validated and is now disabled.
Also the ephemeral work was postponed which requires disabling of the
ephemeral cookie APIs.

bug:28514747

Change-Id: Iab7f11c503a76bcc414408dfebdf200843db814e
2016-05-02 18:36:13 -07:00
Raph Levien
4d826831b5 Merge "Make LocaleList constructor non-nullable" into nyc-dev 2016-05-03 00:15:24 +00:00
Todd Kennedy
6e2e7f585b use 'int' for min sdk version
per api council

Change-Id: Id3c1191534f61a0d511a6e9932f50ee613830999
2016-05-02 15:07:32 -07:00
Raph Levien
10ea92aefa Make LocaleList constructor non-nullable
This commit makes the LocaleList constructor require non-null
arguments in all cases, and fixes all uses of LocaleList that could
previously pass a null to use getEmptyLocaleList() instead (which is
preferred anyway becaues it avoids an allocation.

Bug: 28460668
Change-Id: I4b8b3cfa82914412731c2b79003951c46cb2afa1
2016-05-02 12:57:56 -07:00
Makoto Onuki
4d36b3a8c5 ShortcutManager: finishing touches
- Change back the throttling quota to 10 calls / day
- Foreground apps are no longer throttled, and when an app comes to
foreground the call counter will be reset.
- When the system locale changes, reset throttling for all packages
for all users.
  See LocalService.onSystemLocaleChangedNoLock() for how it's performed.
  Because the reset must happen before any other apps have a chance to
  publish shortcuts, the logic is not straightforward.

- Added an internal API to reset the throttling upon inline-reply
from a notification.

- Stop supporting icons from "content:" URIs
- Improved javadoc on several APIs.

Also internal refactor needed to this:
- ShortcutUser.getAllPackages()/getAllLaunchers() are no longer
accessible to outer code to prevent accidentally adding/removing the
content.  Outer code should use forAllPackages() / forAllLaunchers().

Bug 27923857

Change-Id: I002511193d1d33718163bb1dabe77610bde58198
2016-05-02 12:02:19 -07:00
Todd Kennedy
4e4fca43b0 Merge "Restrict updates of system packages" into nyc-dev 2016-05-02 14:44:20 +00:00
Wale Ogunwale
8f6c925ae7 Set ActivityInfo.resizeMode to RESIZE_MODE_RESIZEABLE by default
Previous assumption was ActivityInfo was completely initialized in
PackageParser, but that isn't the case with the ResolverActivity
whose ActivityInfo in populated in PackageManagerService.
This was causing the device to exist multi-window mode since
the default ActivityInfo.resizeMode was 0 (RESIZE_MODE_UNRESIZEABLE).

Bug: 28378995
Change-Id: I46e58d434f2a0274c461a8ff00b59ed3d2a1dd52
2016-04-29 16:46:47 -07:00
Todd Kennedy
fdd241a1e0 Restrict updates of system packages
By declaring a <restrict-update> tag in its manifest, a system package
can restrict its update to be the singular package that has the same
given hash. An update's hash is the SHA-512 across all its APKs [i.e.
for splits, the SHA-512 is calculated over the concatenation of the
base plus all splits].

The restriction only applies to system packages.

Bug: 28398205
Change-Id: Iec493fc8ef27edee53f1d437cb0caaa78782f329
2016-04-29 14:23:43 -07:00
Dianne Hackborn
1a2f993ba5 Merge "Fix issue #28431297: Crash in system process" into nyc-dev 2016-04-28 01:07:26 +00:00
Chris Tate
07318065b2 Merge "Make sure FIRST_LAUNCH is after PACKAGE_ADDED" into nyc-dev 2016-04-28 00:41:02 +00:00
Dianne Hackborn
e761777323 Fix issue #28431297: Crash in system process
Don't allow null URIs to get put into the notification path.

Change-Id: I4f68f438960c8a90c7b417feaa2e19968a3a200a
2016-04-27 17:03:52 -07:00
Christopher Tate
5cf5578a45 Make sure FIRST_LAUNCH is after PACKAGE_ADDED
If an app undergoes restore during install, it is considered 'started'
and the FIRST_LAUNCH broadcast needs to go out.  However, this must not
take place until after the restore operation has fully completed, in
order to avoid publishing the app's existence while it may still be in
an incoherent state.  We now make this broadcast part of POST_INSTALL
in the restore case.

Bundled apps are in the 'started' state regardless, so no FIRST_LAUNCH
broadcast is ever sent for them -- this CL does not change that
existing behavior even in the case of setup-time data restore of
factory-installed packages.

Bug 28173625

Change-Id: Ibcc3758576662dc447b75476173a0d008a9fe4da
2016-04-27 15:07:26 -07:00
Adam Powell
4be84bb10c Don't lose content change during rollback for loader already started
Framework edition

If a loader is already started when we try to rollback a content
change, force a new load instead of simply setting the flag to refresh
next time.

Bug 28406183

https://code.google.com/p/android/issues/detail?id=208278

Change-Id: If11d79088d30dd2dc48cf1b3d2882f3712b6cddb
2016-04-27 13:45:38 -07:00
Raph Levien
78dd08d5dd Merge "Give guidance on alternatives to deprecated locale field" into nyc-dev 2016-04-27 19:42:23 +00:00