182155 Commits

Author SHA1 Message Date
Eino-Ville Talvala
346066ef90 am f5d30463: am 4fa3a80b: am a5f301c7: Merge "Legacy: Only set user surface dimensions on output surfaces" into lmp-mr1-dev
automerge: ad5591f

* commit 'ad5591f819466fc1c87d9ca76be8c06673ccce34':
  Legacy: Only set user surface dimensions on output surfaces
2015-02-12 07:52:49 +00:00
Lorenzo Colitti
ffba84a155 am b0dfaad8: am f99551d8: am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
automerge: fd90d71

* commit 'fd90d718f43e676e6487ca089e058cdc5d7f7981':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 07:51:11 +00: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
Eino-Ville Talvala
ad5591f819 am f5d30463: am 4fa3a80b: am a5f301c7: Merge "Legacy: Only set user surface dimensions on output surfaces" into lmp-mr1-dev
* commit 'f5d304636d27ea300c092fac0f0214170a89ba39':
  Legacy: Only set user surface dimensions on output surfaces
2015-02-12 05:54:34 +00:00
Eino-Ville Talvala
f5d304636d am 4fa3a80b: am a5f301c7: Merge "Legacy: Only set user surface dimensions on output surfaces" into lmp-mr1-dev
* commit '4fa3a80b6cefdc500de6c7daacc7ef3e160a0543':
  Legacy: Only set user surface dimensions on output surfaces
2015-02-12 05:48:50 +00:00
Eino-Ville Talvala
4fa3a80b6c am a5f301c7: Merge "Legacy: Only set user surface dimensions on output surfaces" into lmp-mr1-dev
* commit 'a5f301c7fb048461197a6032f66b35772a3157f9':
  Legacy: Only set user surface dimensions on output surfaces
2015-02-12 05:39:05 +00:00
Eino-Ville Talvala
a5f301c7fb Merge "Legacy: Only set user surface dimensions on output surfaces" into lmp-mr1-dev 2015-02-12 05:33:28 +00:00
Lorenzo Colitti
fd90d718f4 am b0dfaad8: am f99551d8: am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'b0dfaad8c2a02c33885e6a278c7901da69d8ab49':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 03:09:57 +00:00
Lorenzo Colitti
b0dfaad8c2 am f99551d8: am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'f99551d8a149c1a80dddd6350efcfbd53d58e151':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 02:56:56 +00:00
Lorenzo Colitti
f99551d8a1 am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'c7ccc393b470220710f566d447412d93f7f8d21b':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 02:43:03 +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
Lorenzo Colitti
c7ccc393b4 Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev 2015-02-12 02:30:56 +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
Craig Mautner
857bb559c5 Merge "Refactor of wallpaper methods." 2015-02-12 01:20:16 +00:00
Eino-Ville Talvala
b0acf7fcfa Legacy: Only set user surface dimensions on output surfaces
The GL layer gets exclusive use of the direct producer dimensions;
we should only set the user dimensions.

Bug: 16404608
Change-Id: Ie5b720104bdbee6b096b62520baa1c6b518c6c1c
2015-02-11 16:58:10 -08:00
Scott Kennedy
579e5bb56a Merge "Mark findViewById(int) @Nullable" 2015-02-12 00:48:41 +00:00
Craig Mautner
c431e89a8b Refactor of wallpaper methods.
Also remove token from mWallpaperTokens in cases where it might
have been missed.

Change-Id: I90befbf368b65e8c3403d5958e14355b884801a5
2015-02-11 16:45:38 -08:00
Roozbeh Pournader
70f0a4365b Move Noto Sans Tai Le to the end of the font fallback list.
This is to make sure the East Asian punctuation shared between CJK languages
and Tai Le are rendered from the CJK fonts when no language is specified
for the text, or CJK text is rendered in a non-CJK locale.

Also remove the old comment about 64k glyphs limit.

Bug: 19355391
Change-Id: Ic2cbc79cecf9539ace8a432f373685eeff81e106
2015-02-11 15:45:49 -08:00
Scott Kennedy
c051955392 Mark findViewById(int) @Nullable
Change-Id: I9bf7c08a896bd9c28400ff832179abc579fd502f
2015-02-11 15:33:10 -08:00
Craig Mautner
ae0fdaf5e8 am 3d576cc6: am 18d836b6: Merge "Don\'t relayout based on a window that isn\'t visible" into lmp-mr1-modular-dev
* commit '3d576cc643497e5a4f0285dea75b7ba5e964009c':
  Don't relayout based on a window that isn't visible
2015-02-11 23:24:07 +00:00
Craig Mautner
3d576cc643 am 18d836b6: Merge "Don\'t relayout based on a window that isn\'t visible" into lmp-mr1-modular-dev
* commit '18d836b61811270bfae8cec6e0e782234dfcf5a4':
  Don't relayout based on a window that isn't visible
2015-02-11 23:04:12 +00:00
destradaa
e29c45adda Merge "Update handling of enum/flag fields in GPS data structures." 2015-02-11 22:52:37 +00:00
Wale Ogunwale
83a0068d65 Merge "Am command to split a stack." 2015-02-11 22:27:13 +00:00
Craig Mautner
18d836b618 Merge "Don't relayout based on a window that isn't visible" into lmp-mr1-modular-dev 2015-02-11 22:27:06 +00:00
RoboErik
bb8ed646f0 Merge "Pass the new progress when updating a ProgressBar" 2015-02-11 22:15:49 +00:00
Wale Ogunwale
2c5763ae5d Am command to split a stack.
Change-Id: Idf3a364fc3826f6fe92f55b5c83b16b380d62ff4
2015-02-11 14:02:19 -08: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
Craig Mautner
082500c76e Don't relayout based on a window that isn't visible
The method commitFinishDrawingLocked returned true even if the window
it was called for was hidden. By returning the value that
performShowLocked() returns it only returns true if the window is
shown.

Fixes bug 19100757.

Change-Id: I45df70aedcb3909561fd3a19e861579a11521db9
2015-02-11 13:24:19 -08:00
destradaa
c91ac68829 Update handling of enum/flag fields in GPS data structures.
It fixes cases when flags where filtered in the platform, because they were
checked as enums.
It also simplies handling of future values in enums/flags.

Change-Id: I83a0f82cc4562749081bf7e279ea52e2d5ba1f7c
2015-02-11 13:16:28 -08:00
RoboErik
5b179afb19 Merge "Add extra logging for media button events" 2015-02-11 21:14:41 +00:00
RoboErik
e7b3c5e3ca Add extra logging for media button events
Adds some conditional extra logging to help track down where key events
are coming from.

bug:19334464
Change-Id: I54e955a7e234bd1c45598e18a68cca4c83069487
2015-02-11 13:10:18 -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
Michael Wright
62958c7f30 am 33bb70d6: am 40bd8f41: Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e
automerge: c093955

* commit 'c093955af1434a7023093acb148ab152d915e59c':
2015-02-11 20:03:06 +00:00
Michael Wright
c093955af1 am 33bb70d6: am 40bd8f41: Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e
* commit '33bb70d613cf8ed4664c4cc4047ae67f98599b32':
2015-02-11 19:59:16 +00:00
Michael Wright
33bb70d613 am 40bd8f41: Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e
* commit '40bd8f416b30b7b0eae244aa0c5aabd0be0d1c55':
  Stop active media projections on user switch.
2015-02-11 19:50:56 +00:00
Alex Klyubin
517e0274cb Merge "Move hidden ApplicationInfo flags into a separate field."
automerge: 1a24bb5

* commit '1a24bb597aeb1b019d55988b574e5db1b0e4232c':
  Move hidden ApplicationInfo flags into a separate field.
2015-02-11 19:34:30 +00:00
Alex Klyubin
1a24bb597a Merge "Move hidden ApplicationInfo flags into a separate field." 2015-02-11 19:27:14 +00: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
Michael Wright
d08860690c Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e automerge: 40bd8f4
automerge: fa5f1fb

* commit 'fa5f1fbc50050d26535e969ac68b04d318bbaf03':
  Stop active media projections on user switch.
2015-02-11 18:53:36 +00:00
Michael Wright
fa5f1fbc50 Merge "Stop active media projections on user switch." into lmp-mr1-dev automerge: 3292c0e
automerge: 40bd8f4

* commit '40bd8f416b30b7b0eae244aa0c5aabd0be0d1c55':
  Stop active media projections on user switch.
2015-02-11 18:43:29 +00:00
Michael Wright
40bd8f416b Merge "Stop active media projections on user switch." into lmp-mr1-dev
automerge: 3292c0e

* commit '3292c0e2640667e5ef78896653a41c85e7de06c5':
  Stop active media projections on user switch.
2015-02-11 18:33:00 +00:00
Michael Wright
3292c0e264 Merge "Stop active media projections on user switch." into lmp-mr1-dev 2015-02-11 18:23:55 +00:00
Scott Kennedy
0f5e1975d3 Merge "Add @Nullable to AttributeSet in a couple constructors" 2015-02-11 17:53:50 +00:00