182235 Commits

Author SHA1 Message Date
Alan Viverette
cbcf1d4854 Merge "Add support for user-selectable night mode" 2015-02-12 19:15:53 +00:00
Geoff Mendal
a673af77d9 Merge "Import translations. DO NOT MERGE" into lmp-mr1-modular-dev 2015-02-12 19:13:54 +00:00
Alan Viverette
4cc1e9e707 Add support for user-selectable night mode
Adds a Material theme that automatically selects light or dark UI based
on the night mode resource qualifier.

Removes restriction that night mode only works when car mode is enabled
or the device is docked, which was applied inconsistently anyway and
only actually worked when in car mode (regardless of docked state).
Night mode is now always applied according to the system preference.

Change-Id: I526807c907eb29a2ab588d15932afe3e6ab180c2
2015-02-12 11:01:06 -08:00
Jeremy Joslin
f69f3737ba am 1267462c: am f456d4dc: am 20be0e25: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '1267462c0bf8ef5a0cfaca535847fc962b2cf32e':
  Update Javadoc for EXTRA_NETWORK.
2015-02-12 18:56:35 +00:00
Alan Viverette
3358d5c0a7 Merge "API for adding layers to LayerDrawable" 2015-02-12 18:51:41 +00:00
Geoff Mendal
ceb7ae3170 Import translations. DO NOT MERGE
Change-Id: Idd108e5eb791007b3604c67ce4a0853a368a445e
Auto-generated-cl: translation import
2015-02-12 10:51:28 -08:00
Alan Viverette
d8c18e81c0 API for adding layers to LayerDrawable
Change-Id: I859c956a47d95fa1ce65b9eea9bc7be4659486bf
2015-02-12 18:49:42 +00:00
Jeremy Joslin
1267462c0b am f456d4dc: am 20be0e25: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit 'f456d4dcc042581cb2a3ba540538898f2cc925b7':
  Update Javadoc for EXTRA_NETWORK.
2015-02-12 18:47:14 +00:00
Jeremy Joslin
f456d4dcc0 am 20be0e25: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '20be0e25ba660a7555577988cefcfa36d84e7e2f':
  Update Javadoc for EXTRA_NETWORK.
2015-02-12 18:41:17 +00:00
Jeremy Joslin
20be0e25ba Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev 2015-02-12 18:34:03 +00:00
Wale Ogunwale
5e789f03b2 Fixed bug in 'am stack split' command.
Change-Id: Id3efb65a3f9cbf3c223ea08d51e2028180bd5479
2015-02-12 09:25:52 -08:00
Benjamin Franz
6076ef9355 am dd0027cf: am 40ab8bb2: am c70d0e71: Fix the javadocs for lock task mode intents.
* commit 'dd0027cfda5d399293cb19aeefeeb34d5a5fbc1f':
  Fix the javadocs for lock task mode intents.
2015-02-12 17:02:09 +00:00
Benjamin Franz
dd0027cfda am 40ab8bb2: am c70d0e71: Fix the javadocs for lock task mode intents.
* commit '40ab8bb22979b9e7c76e016b861319f6103eb800':
  Fix the javadocs for lock task mode intents.
2015-02-12 16:52:34 +00:00
Benjamin Franz
40ab8bb229 am c70d0e71: Fix the javadocs for lock task mode intents.
* commit 'c70d0e71c09da0292958d748cedaa5fbacbec74a':
  Fix the javadocs for lock task mode intents.
2015-02-12 16:45:06 +00:00
Narayan Kamath
00e821a860 am c7e48719: Merge "Remove references to persist.sys.language/country."
automerge: 8be3724

* commit '8be3724a06f7b2d28c6664ca11a03f91f97f0972':
  Remove references to persist.sys.language/country.
2015-02-12 16:41:41 +00:00
Narayan Kamath
8be3724a06 am c7e48719: Merge "Remove references to persist.sys.language/country."
* commit 'c7e487193aed3b102d6e55e0817de6e0460e0236':
  Remove references to persist.sys.language/country.
2015-02-12 16:37:58 +00:00
Narayan Kamath
c7e487193a Merge "Remove references to persist.sys.language/country." 2015-02-12 16:31:08 +00:00
Benjamin Franz
c70d0e71c0 Fix the javadocs for lock task mode intents.
Bug: 19363651
Change-Id: Ia0da3ddad587ea842aad19818a62540889d6a9dd
2015-02-12 16:12:58 +00:00
Narayan Kamath
b61db8229a Remove references to persist.sys.language/country.
Addresses a couple of TODOs now that all usages have been
removed and fixes a doc that specifies how the emulator locale
can be set.

bug: 17691569

Change-Id: I802ea1e12448a5442840cad1fdc0956d3e2c7a8c
2015-02-12 13:16:55 +00:00
Neil Fuller
c1a5e82c25 Merge "Remove usages of FloatMath" automerge: a8e8cdb
automerge: 27316a9

* commit '27316a93e5979859ae98f506eca365784353007a':
  Remove usages of FloatMath
2015-02-12 10:00:41 +00:00
Neil Fuller
27316a93e5 Merge "Remove usages of FloatMath"
automerge: a8e8cdb

* commit 'a8e8cdbb17164c0124e04c376110637af96d5e89':
  Remove usages of FloatMath
2015-02-12 09:57:57 +00:00
Neil Fuller
a8e8cdbb17 Merge "Remove usages of FloatMath" 2015-02-12 09:26:47 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
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
Tao Bao
6d8886ac46 resolved conflicts for merge of e1e1cd9d to lmp-mr1-dev-plus-aosp
Change-Id: If01cb9c91c4f980d422896aa5ebe713f540d4fd1
2015-02-11 22:32:05 -08: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
Jim Miller
959ea56f34 Fix accessibility focus bug in statusbar
The root view of the new uber statusbar should not be focusable.

Based on history, it looks like this was an oversight when this view
was refactored.

Fixes bug 19296202

Change-Id: Ib7f6908c30ab37384aa50f4fa4198c15593a96a4
2015-02-11 20:43:04 -08:00
Tao Bao
e1e1cd9dfa am d884c63c: Merge "Use ICU for relative time formatting"
* commit 'd884c63c100ecc9e96fa55de5110f7034ba9cc03':
  Use ICU for relative time formatting
2015-02-12 04:39:01 +00:00
Tao Bao
d884c63c10 Merge "Use ICU for relative time formatting" 2015-02-12 04:30:43 +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
Jeremy Joslin
fcde58f155 Update Javadoc for EXTRA_NETWORK.
Bug: 19352840
Change-Id: Ib668bee0fb2c6f5bcd01a7908ebd20b9ec8a40ef
2015-02-11 18:28:57 -08: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
Tao Bao
67bfa0b083 Use ICU for relative time formatting
Rewrite the DateUtils' relative time formatting APIs
(getRelativeTimeSpanString, getRelativeDateTimeString) to use ICU ones.
Two APIs that take withPreposition parameter are not changed. Because
(a) ICU doesn't provide functionality to format preposition; (b) They
are not really computing relative time but instead calling
formatDateRange() to get the absolute time/date string.

Bug: 19146457
Bug: 5252772
Change-Id: Iea8d699d63cc4438513910da66d038912e44fb8d
2015-02-11 17:50:21 -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