24850 Commits

Author SHA1 Message Date
Mike Lockwood
5b14d9893a Merge "MidiManager API tweaks:" 2015-02-13 00:01:48 +00:00
Casey Burkhardt
032559650e am 6f2dd8a9: Merge "Support circular magnification frame on circular devices" into lmp-mr1-modular-dev
automerge: d1a5b5d

* commit 'd1a5b5dc07dc3798ae13a5a9538b5e5bbbeb8058':
  Support circular magnification frame on circular devices
2015-02-12 23:31:15 +00:00
Casey Burkhardt
d1a5b5dc07 am 6f2dd8a9: Merge "Support circular magnification frame on circular devices" into lmp-mr1-modular-dev
* commit '6f2dd8a9b195a2bc8538820d8685a4a0576964f9':
  Support circular magnification frame on circular devices
2015-02-12 23:28:30 +00:00
Casey Burkhardt
6f2dd8a9b1 Merge "Support circular magnification frame on circular devices" into lmp-mr1-modular-dev 2015-02-12 23:23:45 +00:00
John Spurlock
07137c3440 am 1be4b702: am 7e7c91ec: am e4049b6d: am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit '1be4b702f531363903b46a88fc3d1603fb19c3ef':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 23:19:03 +00:00
John Spurlock
1be4b702f5 am 7e7c91ec: am e4049b6d: am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit '7e7c91ec95eca5e1089ede9953f27d8c3d3b8bea':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 23:11:36 +00:00
John Spurlock
7e7c91ec95 am e4049b6d: am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit 'e4049b6d36ded6ec808be5f884248772a4059a72':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 23:05:25 +00:00
John Spurlock
e4049b6d36 am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit 'f45e5dbf599a0043d7f6576f20eafb2c1c157204':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 22:58:44 +00:00
John Spurlock
f45e5dbf59 Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev 2015-02-12 22:52:13 +00:00
Casey Burkhardt
d29a1e47d4 Support circular magnification frame on circular devices
The magnification viewport expects its boundary to be a rectangular region,
and always draws it as such.  This change causes the indicator to draw as a
circle on devices with circular displays.  This also refactors the width of
the indicator's frame to use a proper dimension resource and updates the
width to 4dip.

Bug:18242438
Change-Id: I1d86647b6d1ef84f5dd506f4141223ec050a79b5
2015-02-12 14:13:10 -08:00
Narayan Kamath
6f609928cf am c7e48719: Merge "Remove references to persist.sys.language/country." automerge: 8be3724
automerge: 00e821a

* commit '00e821a8608efdc19041bdda1e832d3d4b3c29e2':
  Remove references to persist.sys.language/country.
2015-02-12 19:36:35 +00:00
Neil Fuller
a2c7884518 Merge "Remove usages of FloatMath" automerge: a8e8cdb automerge: 27316a9
automerge: c1a5e82

* commit 'c1a5e82c25dba954cf1c06729e53bfb67667bcbb':
  Remove usages of FloatMath
2015-02-12 19:29:45 +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
Mike Lockwood
90b9a6a4ab MidiManager API tweaks:
Rename MidiReceiver.onPost() to post()

Change MidiManager.DeviceCallback from an interface to a class

Change-Id: I939ba7a7d82e721b90a3d80252a88e7a650c9396
2015-02-12 10:58:52 -08:00
John Spurlock
f370177e94 NoMan: Initialize filter value reported to listeners.
In addition to relying on change callbacks.

Bug: 19288429
Change-Id: Id54473e5fbb4eac3778781a2052ba0103076f8d1
2015-02-12 13:29:37 -05: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
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
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
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
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
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
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
Craig Mautner
857bb559c5 Merge "Refactor of wallpaper methods." 2015-02-12 01:20:16 +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
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
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
Wale Ogunwale
2c5763ae5d Am command to split a stack.
Change-Id: Idf3a364fc3826f6fe92f55b5c83b16b380d62ff4
2015-02-11 14:02:19 -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
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
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
Nicolas Prevot
5cfd3d8b51 Merge "Avoid NullPointerException in enableSystemApp if the app is absent." 2015-02-11 17:05:19 +00:00
Nicolas Prevot
8b0c8ffb2d Merge "Dont throw an exception for non-system apps when enabling system apps." 2015-02-11 14:27:49 +00:00
Nicolas Prevot
0413046f12 Dont throw an exception for non-system apps when enabling system apps.
In EnableSystemAppWithIntent: if a non-system app matches the intent:
ignore it instead of throwing an exception.

Change-Id: I64dc9a0bbc1a6bc5e2159a33b7273464ed2518c5
2015-02-11 14:17:21 +00:00
Jeff Davidson
2d6063b63c am e4be48e0: am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev automerge: 46dbb5b
* commit 'e4be48e0853bcde90d738031433271c5e41bd5e2':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:44:34 +00:00
Jeff Davidson
e4be48e085 am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev
automerge: 46dbb5b

* commit '46dbb5be4c56e8af603514a3cf2bd7daf0191724':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:38:35 +00:00
Jeff Davidson
46dbb5be4c am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev
* commit '50996a12a8e859346d5eb3c4569c4e81c9b52a05':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:30:44 +00:00
Jeff Davidson
50996a12a8 Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev 2015-02-11 08:25:27 +00:00