227643 Commits

Author SHA1 Message Date
Rubin Xu
efb844da91 Hide work apps from recents when profile is turned off
When the user turns off profile (profile goes to quiet mode), hide all
work apps from recents. They should reappear when the profile is turned
back on.

Bug: 22541941
Change-Id: I68119bb5a65cc2b0d9b42bd17eaccf5e55c8dd4f
2015-12-08 23:06:42 +00:00
Roozbeh Pournader
17b2b2d458 Implement locale matching in LocalesList.
The algorithm tries to find the first locale in the locale list
(usually from the user preference) that somewhat matches one of the
locales supported (usually from the list of locales supported by the
system or an app).

Locales match if both their language and their likely script is the
same. Otherwise they don't.

Bug: 25800576
Change-Id: I4fbc3f44ab16d41efebbf941e94a0bb30d598f82
2015-12-08 15:03:39 -08:00
Jeff Sharkey
103d61b9f7 Merge "Shift around encryption public APIs." 2015-12-08 22:29:52 +00:00
Dianne Hackborn
15c4bbddfa Merge "New generic background restrictions." 2015-12-08 22:24:38 +00:00
Jeff Sharkey
7a30a30ebe Shift around encryption public APIs.
There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all.  Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
2015-12-08 15:24:29 -07:00
Hall Liu
70ac616b38 Merge "Add extras tag for analytics support" 2015-12-08 21:53:25 +00:00
Xiaohui Chen
13b80b2303 Merge "UserManager: get/set user account name" 2015-12-08 21:42:22 +00:00
Chad Brubaker
6568cf185d Refactor NetworkSecurityPolicy to be pluggable
This allows us to keep the logic for the NetworkSecurityPolicy in the
framework instead of in libcore.

Change-Id: I4bf494f79c27729cb17d93d90a91319492270ce9
2015-12-08 13:38:43 -08:00
Seigo Nonaka
d588e8b64a Merge "Add Emoji "lang" attribute for NotoColorEmoji.ttf" 2015-12-08 21:29:40 +00:00
Jason Monk
deba7a42ed Make the new QS the new QS
Some UI updates to the header, then make the new QS the default
state for everyone.

Change-Id: I82b6bebb0b21a5c9eb926cb1a761cac340a293df
2015-12-08 16:19:13 -05:00
Dianne Hackborn
2639c4bf6b New generic background restrictions.
This modifies the existing rigid background restriction to
a more moderate policy that we can (eventually) apply to all
apps:

- After N minutes no longer in the foreground, any background
  services running in the app are stopped and no more can be
  started.
- No manifest receivers for the application will be executed
  if the broadcast is not being sent explicitly to that app and
  the app is not running.  (Eventually we should tighten this so
  they won't be received if the app is past its N minute
  background window.)
- Other non-background processes may still bind to services in
  the background process, which will raise it to back to an
  executing state...  so things like syncs, jobs, live wallpapers,
  accessibility services, etc still work.

Change-Id: I08ddbfdf640ef324a27b2eb9eecd9499f3ebddd9
2015-12-08 12:45:18 -08:00
Yohei Yukawa
868d19b93b Use BCP-47 LanguageTag in IME/Spell-Checker.
The primary goal of this CL is to make it clear that BCP-47 is the
expected format to annotate locale information for each
{InputMethod, SpellCkecker}Subtype.  In order to avoid possible
compatibility issues, this CL introduce a new "languageTag" attribute
instead of reusing existing "imeSubtypeMode" and "subtypeLocale"
attributes.

For IME developers, this CL changes nothing unless "languageTag"
attribute is specified.  To summarize:

  A: If only legacy locale-string is specified
     (existing IMEs/Spell-Checkers fall into this category):
    -> The system uses locale-string.

  B: If only LanguageTag is specified:
    -> The system uses LanguageTag.

  C: If both locale-string and languageTag are specified:
    -> The system uses LanguageTag.  Legacy locale-string is ignored.

For application developers, there should be some follow-ups CLs because
even with this CL most likely they would still have to take care of
previous versions of Android where:
  - Locale#forLanguageTag()              (N/A in API Level 20 and prior)
  - Locale#toLanguageTag()               (N/A in API Level 20 and prior)
  - InputMethodSubtype#getLocale()       (Deprecated in N)
  - SpellCheckerSubtype#getLocale()      (Deprecated in N)
  - InputMethodSubtype#getLanguageTag()  (N/A in M and prior)
  - SpellCheckerSubtype#getLanguageTag() (N/A in M and prior)
One idea would be is in the official support library to provide a utility
method that takes care of above tasks and just returns a Locale object.
If we had a utility method in the support library, probably not
returning a Locale object from #getLanguageTag() would make sense.

From performance point of view both existing legacy locale-string
attribute and new LanguageTag attribute are just String objects that
travel from XML manifest to system services to applications via IPCs.
Hence there are no performance implications except for having one more
String objects.

Bug: 22858221
Change-Id: I6db107ad2afc7709167f7c4e5d24bd589ac8bd70
2015-12-08 12:27:55 -08:00
Alan Viverette
d35c13df6e Merge "Attach drawable resource ID and name to getDrawable() exceptions" 2015-12-08 19:49:56 +00:00
Alan Viverette
c078c605ab Attach drawable resource ID and name to getDrawable() exceptions
Wraps the entire getDrawable() method in a try/catch block. Clears the
stack trace from the re-thrown exception, since we only need the trace
from the original exception.

Also clears stack traces from re-thrown RuntimeExceptions in applyTheme
implementations.

Change-Id: I92396abf9e748eef78777174b297a09e118f5e70
2015-12-08 14:49:13 -05:00
Bryce Lee
3c67873f0a Improve logging in BluetoothHeadsetClientCall.
Bug: 26032099
Change-Id: I497edc9aa4c19cc7159993a899071e7b0c26db63
2015-12-08 11:22:31 -08:00
Svet Ganov
2acf063da0 Ephemeral cookie API
Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
2015-12-08 19:17:15 +00:00
Chris Tate
4f5ab5ffbe Merge "Don't leak alarm wakelock when delivery fails" 2015-12-08 18:30:48 +00:00
Christopher Tate
7f2a035242 Don't leak alarm wakelock when delivery fails
If an app sets an alarm and then cancels the underlying PendingIntent,
delivery will fail in such a way that the OnFinished callback is not
invoked.  The Alarm Manager relies on that callback for managing
wakelock lifetime, however; this meant that the wakelock acquisition
would leak, burning down the battery.

We now detect these sorts of delivery failures and manage the
wakelock appropriately.

Bug 25864361

Change-Id: I74af48e81002b29b129c41a76c0a8329c647390d
2015-12-08 10:24:33 -08:00
Alan Viverette
9c17c85d1e Snap AbsSeekBar touches to nearest progress tick
Previously it would snap to the floor(progress) tick, which makes the
touch target size for the last tick 0px wide and difficult to touch.

Change-Id: Iac488d73e5a67c29b45f9bb4368db46c0028483e
2015-12-08 13:23:58 -05:00
Steve McKay
402fa3bca8 Merge "Don't try to copy empty selection to clipboard." 2015-12-08 17:27:01 +00:00
Steve McKay
d28c5c3b7b Don't try to copy empty selection to clipboard.
Bug: 25374244
Change-Id: Ia33d3fda909dc59f65adcc20839563a9f5885047
2015-12-08 17:26:25 +00:00
Robin Lee
0325a7e0c5 Merge "Fix test-api.txt" 2015-12-08 17:14:09 +00:00
Robin Lee
254a8371e2 Fix test-api.txt
37317e7c22e89816156e6e9a7abf4c5a59e8440a Commit was generated before
test-api.txt existed.

Change-Id: Ied6ead08826c7635c7da15b91f6e30f29c575fbd
2015-12-08 17:11:04 +00:00
Todd Kennedy
1fd413f637 Merge "Temporarily stop proxying to cmd" 2015-12-08 17:07:15 +00:00
Elliott Hughes
62b8dfd270 Merge "Track rename of base/ to android-base/." 2015-12-08 16:57:57 +00:00
Elliott Hughes
e7d2cc308e Track rename of base/ to android-base/.
Change-Id: If08a94025fc12433f7e248b7787cee3c14843097
2015-12-08 08:57:14 -08:00
Robin Lee
fbc65644b9 DevicePolicy API to remove an installed KeyPair
The keypair is specified by alias and removed via a call to the
KeyChainService, which will have installed the pair in the first place.

Bug: 22541933
Change-Id: I37317e7c22e89816156e6e9a7abf4c5a59e8440a
2015-12-08 16:40:56 +00:00
Jason Monk
f12288bda1 Merge "Remove visibility from tiles, make them always visible" 2015-12-08 16:36:58 +00:00
Jason Monk
ba2318eff3 Remove visibility from tiles, make them always visible
Some tiles are statically not available on boot, etc.
based on hardware availability or settings, but most
are just always visible.

Change-Id: Ib1a45ef5b029fe710f9957cb997496dcb14f5875
2015-12-08 10:52:10 -05:00
Lenka Trochtova
b8140085dd Merge "Introduce ephemeral users." 2015-12-08 15:06:24 +00:00
Niels Egberts
9b2b2f5090 Fix checks for audio format.
Change-Id: I43e9a94f8ddd46f72d24e06d72702f354bbeae46
2015-12-08 14:57:48 +00:00
Jason Monk
8ff2f0958d Merge "Working towards a better QS" 2015-12-08 14:55:06 +00:00
Jason Monk
dc35dcb14a Working towards a better QS
Some work (mostly on the new QS only) to make things more like they
will be.

 - Remove Quick Tiles
 - Remove Dual Tiles
 - All tiles are the same, with slightly different UI in the header
 - QS tiles in the header match the beginning of QS
 - handleClick is a click from QS, handleSecondaryClick is a click
   from the header, but defaults to normal behavior.
 - Opening a detail panel from the header opens QS and the detail
   selected
 - Fix onStartListening bug in CustomTile
 - UI updates towards how QS will look

Change-Id: Id820586ccdaa258a5bcb72cadbeb14941fc5f935
2015-12-08 09:53:36 -05:00
Lorenzo Colitti
9d3aadb247 Add a new WakeupMessage class and use it in two places.
This is useful when using the new AlarmManager direct callback
interface to wake up the system and request that an object whose
API consists of messages (such as a StateMachine) perform some
action.

In this situation, using AlarmManager.onAlarmListener by itself
will wake up the system to send the message, but does not
guarantee that the system will be awake until the target object
has processed it. This is because as soon as the onAlarmListener
sends the message and returns, the system is free to go to sleep
again.

Bug: 20157436
Bug: 25823676
Change-Id: Idff20029d287f26347441a2523b7fb20eda6a8b0
2015-12-08 23:50:23 +09:00
Lenka Trochtova
c4dd021322 Introduce ephemeral users.
BUG: 24883058

Change-Id: I2e1d6aa184142c2a3dc0415c0cd407573453cf41
2015-12-08 15:47:10 +01:00
Paul Duffin
cde2287208 Merge "Remove framework from LOCAL_JAVA_LIBRARIES" am: e252149ab9 am: ec9081a004
am: e94e7dd181

* commit 'e94e7dd181fb1857bf7aa3b807b64d9bb231edc6':
  Remove framework from LOCAL_JAVA_LIBRARIES
2015-12-08 14:22:55 +00:00
Paul Duffin
5160b7a9ad Merge "Follow-up to Switch to the latest version of Caliper" am: 80d5bef6f9 am: 0ec9daecc6
am: d441dca72b

* commit 'd441dca72bfdf5cf4eb79fdd77b2fab0e4e598ff':
  Follow-up to Switch to the latest version of Caliper
2015-12-08 14:21:27 +00:00
Paul Duffin
e94e7dd181 Merge "Remove framework from LOCAL_JAVA_LIBRARIES" am: e252149ab9
am: ec9081a004

* commit 'ec9081a004db058bb5ada5173d65a565e2005c6d':
  Remove framework from LOCAL_JAVA_LIBRARIES
2015-12-08 06:18:30 -08:00
Paul Duffin
d441dca72b Merge "Follow-up to Switch to the latest version of Caliper" am: 80d5bef6f9
am: 0ec9daecc6

* commit '0ec9daecc6129529fc6f2d66c29876eca88c492f':
  Follow-up to Switch to the latest version of Caliper
2015-12-08 06:17:03 -08:00
Paul Duffin
ec9081a004 Merge "Remove framework from LOCAL_JAVA_LIBRARIES"
am: e252149ab9

* commit 'e252149ab99a008a0a75734326755cadd5c5ee7a':
  Remove framework from LOCAL_JAVA_LIBRARIES
2015-12-08 14:11:45 +00:00
Paul Duffin
0ec9daecc6 Merge "Follow-up to Switch to the latest version of Caliper"
am: 80d5bef6f9

* commit '80d5bef6f9da4a0eeb23c3356843351170553df6':
  Follow-up to Switch to the latest version of Caliper
2015-12-08 14:10:09 +00:00
Paul Duffin
e252149ab9 Merge "Remove framework from LOCAL_JAVA_LIBRARIES" 2015-12-08 14:04:29 +00:00
Paul Duffin
80d5bef6f9 Merge "Follow-up to Switch to the latest version of Caliper" 2015-12-08 14:03:10 +00:00
Paul Duffin
b12a3fca7e Remove framework from LOCAL_JAVA_LIBRARIES
After previous change removed LOCAL_NO_STANDARD_LIBRARIES:=true
it is no longer necessary to explicitly add framework to
LOCAL_JAVA_LIBRARIES as it is added automatically by the build.

Change-Id: I68bf700375e34a10302f76d7463110755b815f85
2015-12-08 13:59:36 +00:00
Andreas Gampe
32f4043ac3 Follow-up to Switch to the latest version of Caliper
Remove LOCAL_NO_STANDARD_LIBRARIES.

(cherry pick from commit c9d6a91cd51a9b7ff00187914fe922b0d22b3d66)

Bug: 24848946
Change-Id: I19feea042c9b4823d4979f4d951476792600edbc
2015-12-08 13:58:08 +00:00
振淦王
60a7431816 ConcurrentModificationException in SyncManager
updateRunningAccounts and dispatchSyncOperation is running in different thread,
and mActiveSyncContexts not synchronization.
If methods occur together,
mActiveSyncContexts change may occur when cycle is running.

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

Solution:
Offboard the traversal from the main thread to the handler thread.

Change-Id: Ifb9fbb466a5087186be31f7877c50b8c8b6737e4
Signed-off-by: wangzhengan <wangzglx@gmail.com>
2015-12-08 21:40:27 +08:00
Jason Monk
08e7fa9b69 Allow color matrix to be controlled by secure setting
Change-Id: Ia5518ad79fae502e814034edd7ae8d7a57b3eaeb
2015-12-08 07:27:15 -05:00
Neil Fuller
8dac23eafc Merge "Add ICU4J APIs for Android" am: cb02371ca7 am: ec1349df9c
am: 4135a54df9

* commit '4135a54df9fc196feb76ce7364425b19647866e4':
  Add ICU4J APIs for Android
2015-12-08 03:05:17 -08:00
Michael Wright
4407cbde63 Merge "Add support for locking the screen when the lid is closed" am: 9dc3c36c9c am: 4d9e6190b1
am: 37c8bcbcc9

* commit '37c8bcbcc9f5098a2a7fde91a3b112abd35a85ad':
  Add support for locking the screen when the lid is closed
2015-12-08 03:03:45 -08:00
Prashant Malani
3e5f615800 Merge "Add rotary encoder input source" into cw-e-dev am: 487f0d3d15 am: 6344cb8144 am: 3ebd5ceb90
am: 54909b8e6b

* commit '54909b8e6b45c913081df54496423bb35bd8955c':
  Add rotary encoder input source
2015-12-08 03:02:16 -08:00