Commit Graph

45591 Commits

Author SHA1 Message Date
Todd Volkert
455e0ea8f2 Revert "Increase visibility of Transition.areValuesChanged() to protected to allow subclasses outside the android.transition package to override it."
This reverts commit d23391eafe.

Change-Id: Id7211a0fd08b9bc8ad092501de3c3efa57bf8264
2015-02-12 23:09:19 +00:00
Todd Volkert
d23391eafe Increase visibility of Transition.areValuesChanged() to protected to allow
subclasses outside the android.transition package to override it.

Change-Id: Ife5de79b339b6d7598411ad851858f4c52a89f5c
2015-02-12 14:47:20 -08:00
Adam Powell
f4071c709d am 97e0ba69: am b73e029f: am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
automerge: bee1def

* commit 'bee1def31bb7a3a22e7c83904a3d8c418eeb5e48':
  Add DENSITY_280
2015-02-12 07:49:31 +00:00
Adam Powell
bee1def31b am 97e0ba69: am b73e029f: am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
* commit '97e0ba691222d037c1820ca8338ad13d07221daf':
  Add DENSITY_280
2015-02-12 02:34:42 +00:00
Adam Powell
97e0ba6912 am b73e029f: am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
* commit 'b73e029fea53fd5aeaf01ad7ba15560329d8de1c':
  Add DENSITY_280
2015-02-12 02:25:29 +00:00
Adam Powell
b73e029fea am 0ec652cf: Merge "Add DENSITY_280" into lmp-mr1-dev
* commit '0ec652cf72bd8b7f619462f172ac0152d4d6c83d':
  Add DENSITY_280
2015-02-12 02:13:03 +00:00
Adam Powell
0ec652cf72 Merge "Add DENSITY_280" into lmp-mr1-dev 2015-02-12 02:08:04 +00:00
Svetoslav
683914bfb1 Rewrite of the settings provider.
This change modifies how global, secure, and system settings are
managed. In particular, we are moving away from the database to
an in-memory model where the settings are persisted asynchronously
to XML.

This simplifies evolution and improves performance, for example,
changing a setting is down from around 400 ms to 10 ms as we do not
hit the disk. The trade off is that we may lose data if the system
dies before persisting the change.

In practice this is not a problem because 1) this is very rare;
2) apps changing a setting use the setting itself to know if it
changed, so next time the app runs (after a reboot that lost data)
the app will be oblivious that data was lost.

When persisting the settings we delay the write a bit to batch
multiple changes. If a change occurs we reschedule the write
but when a maximal delay occurs after the first non-persisted
change we write to disk no matter what. This prevents a malicious
app poking the settings all the time to prevent them being persisted.

The settings are persisted in separate XML files for each type of
setting per user. Specifically, they are in the user's system
directory and the files are named: settings_type_of_settings.xml.

Data migration is performed after the data base is upgraded to its
last version after which the global, system, and secure tables are
dropped.

The global, secure, and system settings now have the same version
and are upgraded as a whole per user to allow migration of settings
between these them. The upgrade steps should be added to the
SettingsProvider.UpgradeController and not in the DatabaseHelper.

Setting states are mapped to an integer key derived from the user
id and the setting type. Therefore, all setting states are in
a lookup table which makes all opertions very fast.

The code is a complete rewrite aiming for improved clarity and
increased maintainability as opposed to using minor optimizations.
Now setting and getting the changed setting takes around 10 ms. We
can optimize later if needed.

Now the code path through the call API and the one through the
content provider APIs end up being the same which fixes bugs where
some enterprise cases were not implemented in the content provider
code path.

Note that we are keeping the call code path as it is a bit faster
than the provider APIs with about 2 ms for setting and getting
a setting. The front-end settings APIs use the call method.

Further, we are restricting apps writing to the system settings.
If the app is targeting API higher than Lollipop MR1 we do not
let them have their settings in the system ones. Otherwise, we
warn that this will become an error. System apps like GMS core
can change anything like the system or shell or root.

Since old apps can add their settings, this can increase the
system memory footprint with no limit. Therefore, we limit the
amount of settings data an app can write to the system settings
before starting to reject new data.

Another problem with the system settings was that an app with a
permission to write there can put invalid values for the settings.
We now have validators for these settings that ensure only valid
values are accepted.

Since apps can put their settings in the system table, when the
app is uninstalled this data is stale in the sytem table without
ever being used. Now we keep the package that last changed the
setting and when the package is removed all settings it touched
that are not in the ones defined in the APIs are dropped.

Keeping in memory settings means that we cannot handle arbitrary
SQL operations, rather the supported operations are on a single
setting by name and all settings (querying). This should not be
a problem in practice but we have to verify it. For that reason,
we log unsupported SQL operations to the event log to do some
crunching and see what if any cases we should additionally support.

There are also tests for the settings provider in this change.

Change-Id: I941dc6e567588d9812905b147dbe1a3191c8dd68
2015-02-11 17:58:22 -08:00
Alan Viverette
6e08723f65 Merge "Stack alert dialog buttons when they are too long" 2015-02-12 01:35:42 +00:00
Alan Viverette
77bb6f179a Stack alert dialog buttons when they are too long
Change-Id: Id1c0b8c0a8fd1c9949b15269fba52e88ef826e6b
2015-02-11 17:24:33 -08:00
Scott Kennedy
c051955392 Mark findViewById(int) @Nullable
Change-Id: I9bf7c08a896bd9c28400ff832179abc579fd502f
2015-02-11 15:33:10 -08:00
RoboErik
bb8ed646f0 Merge "Pass the new progress when updating a ProgressBar" 2015-02-11 22:15:49 +00:00
RoboErik
5b07143e36 Pass the new progress when updating a ProgressBar
There was a race condition where the update for a progress change
from the user could pass the wrong progress value causing apps to
treat a non-user update as a user update.

bug:18515012
Change-Id: Ia62a1d07cd15f99effbf644642307c71049748f2
2015-02-11 13:52:05 -08:00
Adam Powell
f6d4045d6c Add DENSITY_280
Bug 19350604

Change-Id: I94f5162c31f9c8853908d7c4699974c236cc7fe7
2015-02-11 13:34:43 -08:00
Alex Klyubin
05ecfd308d am 33d3c53d: resolved conflicts for merge of 517e0274 to lmp-mr1-dev-plus-aosp
* commit '33d3c53da021f0d044028860ace0f4ad817273f5':
  Move hidden ApplicationInfo flags into a separate field.
2015-02-11 20:47:31 +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
Scott Kennedy
0f5e1975d3 Merge "Add @Nullable to AttributeSet in a couple constructors" 2015-02-11 17:53:50 +00:00
Andrei Kapishnikov
5b4a198abd Merge "Do not throw NullPointerException from PacService" 2015-02-11 17:46:46 +00:00
Pirama Arumuga Nainar
21761bc5de am 0cc09449: Merge "Store compiled code in Context.getCodeCacheDir()" automerge: 3fbbe39 automerge: 1641e19
* commit '0cc09449b6b1e418a7d04590e28d1336694230ba':
  Store compiled code in Context.getCodeCacheDir()
2015-02-11 17:23:12 +00:00
Pirama Arumuga Nainar
0cc09449b6 Merge "Store compiled code in Context.getCodeCacheDir()" automerge: 3fbbe39
automerge: 1641e19

* commit '1641e192a82e266159e0b82078a8f98ebcd3d8ff':
  Store compiled code in Context.getCodeCacheDir()
2015-02-11 17:15:47 +00:00
Scott Kennedy
76c382ed67 Add @Nullable to AttributeSet in a couple constructors
Change-Id: I184113680c5dc867b353df81961e93523b91bbc5
2015-02-10 23:15:39 -08:00
Nick Vaccaro
668ebe9501 am d0d13d82: Merge "Update API to contain new wrist tilt sensor type and string." into lmp-mr1-modular-dev
automerge: 5ff5711

* commit '5ff571155f0a405d6f7d298c7acaddc84bb8fb26':
  Update API to contain new wrist tilt sensor type and string.
2015-02-11 00:39:14 +00:00
Nick Vaccaro
5ff571155f am d0d13d82: Merge "Update API to contain new wrist tilt sensor type and string." into lmp-mr1-modular-dev
* commit 'd0d13d822cdec4fa7214d1495137064c28ecc07e':
  Update API to contain new wrist tilt sensor type and string.
2015-02-11 00:20:52 +00:00
Andres Morales
667d55cf5a Merge "check bootloader and baseband version" 2015-02-10 23:59:46 +00:00
Fyodor Kupolov
4a39e1bb33 Merge "Added unit test for RegisteredServicesCache" 2015-02-10 23:06:29 +00:00
Fyodor Kupolov
9e0d81e843 Added unit test for RegisteredServicesCache
Minor refactoring of RegisteredServicesCache for testability. Added
RegisteredServicesCacheTest which uses a mock version of
RegisteredServicesCache.

Bug:19321135
Change-Id: If18b794b28f03b4bf4bbdfbba9e9a57e808aaebf
2015-02-10 14:05:12 -08:00
Ruben Brunk
4b79268cb7 Merge "camera2: Formatting nitpicks." 2015-02-10 21:20:28 +00:00
Pirama Arumuga Nainar
51772b7601 Store compiled code in Context.getCodeCacheDir()
bug 16345623

Use Context.getCodeCacheDir for EGL shader cache and RenderScript
compiled code.

Change-Id: I54c4e43674bd1f9342ae13059cb8899f4a3f4734
2015-02-10 13:17:30 -08:00
Nick Vaccaro
f5021f6818 Update API to contain new wrist tilt sensor type and string.
Convert the wrist tilt sensor from being a vendor-defined sensor
type to being an official android sensor type.

Change-Id: I39807bdca4f4c853fa0f7e88e6d98c02245f2a8b
2015-02-10 20:43:44 +00:00
Soonil Nagarkar
9e9345c70a Merge "Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related." 2015-02-10 19:20:36 +00:00
Soonil Nagarkar
0e8fd09708 Add @SystemApi annotations to ACTION_QUERY_PACKAGE_RESTART and related.
Make Intent.ACTION_QUERY_PACKAGE_RESTART and Intent.EXTRA_PACKAGES
accessible from GmsCore so that location and context components can
properly respond to the broadcast.

BUG: 19298558
Change-Id: I4b5cf4991c69d3aa745d03271187c65794df10b2
2015-02-10 10:37:36 -08:00
Wale Ogunwale
00c5e4e190 Merge "Set TaskStack config orientation based on dimensions" 2015-02-10 18:35:12 +00:00
Wale Ogunwale
a928127a74 Set TaskStack config orientation based on dimensions
The TaskStack override configuration is set based on the
stack dimensions so we can load the most acturate resources
for activities in the stack in a multi-window environment.

Also, disabled fixed screen orientation for resizeable
activities.

Bug: 19305402
Change-Id: I7b182554523b12f2ef77f8bbc7b16891231125bf
2015-02-10 10:16:39 -08:00
Wale Ogunwale
5fa84cde30 Merge "Include stack override configurations in onConfigurationChanged() call." 2015-02-10 16:54:03 +00:00
Wale Ogunwale
dea0bbbeea Merge "Remove ContextImpl.mOverrideConfiguration to reduce code confusion." 2015-02-10 16:49:44 +00:00
Calin Juravle
399f8a6d17 am fd523efc: Merge "Get the instruction set that the libraries of secondary Abi is supported." automerge: d1e074a
automerge: 16df82d

* commit '16df82d7ace0dbe625211561ccec9b6faf81debb':
  Get the instruction set that the libraries of secondary Abi is supported.
2015-02-10 16:30:46 +00:00
Calin Juravle
16df82d7ac am fd523efc: Merge "Get the instruction set that the libraries of secondary Abi is supported."
automerge: d1e074a

* commit 'd1e074a72452c909c7ed2a4baf220d9d2f306b20':
  Get the instruction set that the libraries of secondary Abi is supported.
2015-02-10 16:23:51 +00:00
Calin Juravle
fd523efcde Merge "Get the instruction set that the libraries of secondary Abi is supported." 2015-02-10 16:13:30 +00:00
Jorim Jaggi
b10e33ff80 Split up android.policy into framework.jar and services.jar 1/3
Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
2015-02-10 14:56:02 +01:00
Robin Lee
85bd63f461 DevicePolicy: clarify wipeData docstring
Wiping secondary users or profiles does not cause a reboot.

Bug: 19294240
Change-Id: I59179b6d19061067326ea8ef1a730cc21f52ea53
2015-02-10 11:51:00 +00:00
Svetoslav
d9852a9ced am cf2c8545: am 5521f39f: am c73cfa0f: Accessibiltiy: missed update to the previous patch.
automerge: c052b0e

* commit 'c052b0efcef4c8656a972155c6a88135f79ed808':
  Accessibiltiy: missed update to the previous patch.
2015-02-10 03:33:01 +00:00
Svetoslav
c052b0efce am cf2c8545: am 5521f39f: am c73cfa0f: Accessibiltiy: missed update to the previous patch.
* commit 'cf2c8545bd6a8888801fa8c04d263879602eeb36':
  Accessibiltiy: missed update to the previous patch.
2015-02-10 03:09:20 +00:00
Svetoslav
cf2c8545bd am 5521f39f: am c73cfa0f: Accessibiltiy: missed update to the previous patch.
* commit '5521f39ff75d2af909061581e27810afaa9ed242':
  Accessibiltiy: missed update to the previous patch.
2015-02-10 03:01:50 +00:00
Svetoslav
5521f39ff7 am c73cfa0f: Accessibiltiy: missed update to the previous patch.
* commit 'c73cfa0ffba344a83d61e2f4eb9715152a2807b8':
  Accessibiltiy: missed update to the previous patch.
2015-02-10 02:51:30 +00:00
Svetoslav
c73cfa0ffb Accessibiltiy: missed update to the previous patch.
Change-Id: I4c47d38f5e137dcc1c6db0561b3824a26572027d
2015-02-09 18:33:07 -08:00
Baligh Uddin
c66ee745dc am 2083173a: am fbf9666f: am b2ba6dfc: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
automerge: a314754

* commit 'a3147545751266f3e58fdadffc4f71e87228c420':
  Accessibility: Handle a missed case when clicking focused views.
2015-02-10 01:49:40 +00:00
Baligh Uddin
a314754575 am 2083173a: am fbf9666f: am b2ba6dfc: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
* commit '2083173af997419fbc2e92627fe5500f91ac7e5b':
  Accessibility: Handle a missed case when clicking focused views.
2015-02-10 01:25:54 +00:00
Baligh Uddin
2083173af9 am fbf9666f: am b2ba6dfc: Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
* commit 'fbf9666f846284ee1d4d09e2d36f0d2b92120656':
  Accessibility: Handle a missed case when clicking focused views.
2015-02-10 01:17:42 +00:00
Yin-Chia Yeh
7021b7e370 Merge "Camera2: lens shading related HAL3.3 update" 2015-02-10 01:15:56 +00:00