Commit Graph

5810 Commits

Author SHA1 Message Date
Selim Cinek
f7f4537f4f Merge changes I6e5dc836,Ia0c663f0,I97eb6e79,I8a4a0213,I87798da9, ... into nyc-dev
* changes:
  Removed the group expand button
  Removed the bundle number from the header
  Fixed a crash with notification children
  Fixed a bug where the media header wasn't indented
  Fixed fading and dozemode for custom notifications
  Fixed a group bug with a single expanded child
  Fixed a bug where the top child notification wasn't expandable
  Fixed a bug where heads up where not expandable by touch
  Fixed a bug where the wallpaper was shining through the background
2016-03-07 23:43:58 +00:00
Mihai Niță
e47b0d4fc2 Merge "Back region to lang selection: preserve search & position" into nyc-dev 2016-03-07 23:18:31 +00:00
Selim Cinek
50c6e498b1 Fixed a bug where the media header wasn't indented
We need to remeasure in case we change the params.

Bug: 27494315
Change-Id: I8a4a0213db75f866a87a5c117f98d80fe80641c9
2016-03-07 15:11:52 -08:00
Seigo Nonaka
072a95a309 Introduce script matching for enabling default IME subtypes.
This is 2nd attempt of I5bb1bd8cdb9096d516d60beb9936e55bf2b757ae

The motivation of this CL is enhance the default IME subtype enabling
algorithm.  The new approach is done by score based algorithm.  The
design of the matching score is determined as follows:
- The matching score for the each two locale is up to 3 and determined
  as follows:
  - Score of 3 : matches all language, script and country.
  - Score of 2 : matches the language and script.
  - Score of 1 : matches the language regardless of country.
  - Score of 0 : doesn't match the language regardless of script and
                 country.
- All locales are fully expanded before matching by addLikelySubtags in
  ICU.

Bug: 27129703
Bug: 27348943
Change-Id: I8fc774154f5175abff2f16e8f12a4847bf5f5b7c
2016-03-07 11:50:30 -08:00
Yohei Yukawa
77dd59fc2a Revert "Introduce script matching for enabling default IME subtypes."
This reverts commit 9e7a1c9824.

Seems that that CL causes ArrayIndexOutOfBoundsException when
initializing InputMethodManagerService, which results in an infinite
boot animation.

Bug: 27129703
Bug: 27348943
Change-Id: I474a87876670ac018c675ac7b4608e90fbb2434b
2016-03-05 21:46:20 -08:00
Seigo Nonaka
d22b31bef7 Merge "Introduce script matching for enabling default IME subtypes." into nyc-dev 2016-03-06 03:02:26 +00:00
Seigo Nonaka
9e7a1c9824 Introduce script matching for enabling default IME subtypes.
The motivation of this CL is enhance the default IME subtype enabling
algorithm.  The new approach is done by score based algorithm.  The
design of the matching score is determined as follows:
- The matching score for the each two locale is up to 3 and determined
  as follows:
  - Score of 3 : matches all language, script and country.
  - Score of 2 : matches the language and script.
  - Score of 1 : matches the language regardless of country.
  - Score of 0 : doesn't match the language regardless of script and
                 country.
- All locales are fully expanded before matching by addLikelySubtags in
  ICU.

Bug: 27129703
Change-Id: I5bb1bd8cdb9096d516d60beb9936e55bf2b757ae
2016-03-05 18:52:59 -08:00
Jeff Sharkey
3e1958936e Skip publishContentProviders() when we have zero.
If the list of providers for the application being bound is empty,
don't bother trying to register them.

Bug: 27510621
Change-Id: I921fb70a4c97433fa123fa88e170745ee013ee35
2016-03-05 19:49:02 -07:00
Mihai Nita
c743e0fd97 Back region to lang selection: preserve search & position
Saving the scroll position and the search string when the region
selection list is displayed, and restoring them when we get back.

Bug: 26939696
Bug: 26943248

Change-Id: Ia01348923be7d8b9f9d0a3d3377c3bf8ce3132f7
2016-03-04 17:11:59 -08:00
Selim Cinek
cd84059ff4 Merge "Fixed that the bigtext nofitication had slightly different padding" into nyc-dev 2016-03-03 22:32:56 +00:00
Mihai Niță
ee172e7bcb Merge "Show locale in region list even if suggested in language list" into nyc-dev 2016-03-03 21:39:57 +00:00
Selim Cinek
98199ae4c9 Fixed that the bigtext nofitication had slightly different padding
The reason was that we're using a different textview there which uses
a SimpleLayout. This is now changed to also use the same one.

Bug: 27436418
Change-Id: I7e6dd503e09cf69ba8ed5bb6dd07fc79ee519cd3
2016-03-03 13:27:09 -08:00
Mihai Nita
f1f39cf193 Show locale in region list even if suggested in language list
Even if English US is suggested, when choosing English I should
still see US in the country list.
Because now the same LocaleInfo object (from cache) can be present
in both lists (language & region), it means that the label should
depend on the context.
We also need to explicitely disable suggestions in the region list.

Bug: 26590073
Bug: 26939203
Change-Id: Ib1cbad9d26a8b183bf462505335bef04193e82f4
2016-03-03 11:41:09 -08:00
Calin Juravle
0c9ef61944 Merge "Better handling of various types of compilation in DexOptimizer" into nyc-dev 2016-03-03 10:54:02 +00:00
Yohei Yukawa
42275bc8b3 Fix a regression in InputMethodUtils.
It turns out that my previous CL [1] unexpectedly changed the behavior
of InputMethodUtils#getImplicitlyApplicableSubtypesLocked() in terms of
when "EnabledWhenDefaultIsNotAsciiCapable" extra value is taken into
account.

Suppose if an IME X has the following three subtypes:
 A. locale: en_US
    mode: handwriting
    extraValue:
 B. locale: hi
    mode: keyboard
    extraValue:
 C. locale: en_US
    mode: keyboard
    extraValue: AsciiCapable
 D. locale: zz
    mode: keyboard
    extraValue: AsciiCapable, EnabledWhenDefaultIsNotAsciiCapable

Given the above subtypes, here are results of what subtypes are enabled
by InputMethodUtils#getImplicitlyApplicableSubtypesLocked() I) before
the CL [1] and II) after the CL [1].

  - system language: hi:
      I:  B, D
     II:  B, D
  - system language: hi-IN:
      I:  B, D
     II:  B, D
  - system language: en-US
      I:  A, C
     II:  A, C
  - system language: en-GB
      I:  A, C
     II:  A, C
  - system language: ja-JP
      I:  B
     II:  D

What my previous CL actually broke is the the last one, and it's broken
because we accidentally started using
"EnabledWhenDefaultIsNotAsciiCapable" even when there is no subtype that
matches to the requested language.  Previously that attribute was used
if and only if 1) there is a subtype that matches the requested language
and 2) that subtype is not marked to be AsciiCapable.

If there there is no subtype that matches to the requested language,
what we had relied on is actually the result of
InputMethodUtils#findLastResortApplicableSubtypeLocked() called with
  canIgnoreLocaleAsLastResort = true,
which means that we had just picked up the first keyboard subtype as the
last fallback candidate regardless of it's locale.  This is why the
subtype B should be picked up in the last case where system language is
ja-JP.

This CL fixes the above unexpected behavior change regarding
"EnabledWhenDefaultIsNotAsciiCapable" so that the previous behavior can
be preserved.

  [1] Iaf179d60c12b9a98b4f097e2449471c4184e049b
      e985c240e3

Bug: 27129703
Bug: 27425459
Change-Id: Icd86cad955bf827a1eb41255f57fdf4ec315b93b
2016-03-03 09:05:11 +00:00
Calin Juravle
693f997cc8 Better handling of various types of compilation in DexOptimizer
From the runtime perspective extract-only/profile-guide-compiled/fully-
compiled oat files are up-to-date and don't need dex2oat. However,
wihout knowing the exact "class" of the aot file we are not able to do a
full compilation of something previously only-extracted, or limit
profile-guide compilation to only previously profile-guide or extract-
only oat files.

GetDexOptNeeded now accepts a mask of desired types of compilation
that the runtime takes into account when advising what's needed.

This CL adds the necessary handling in DexOptimizer.

Also:
- removes the contraint to use extract-only oat files only when
profiles are enabled.
- removes mDexOptPerformed which interfere with the different types of
compilation and only saved a call to GetDexOptNeeded.

Bug: 27189430
Change-Id: Iced2bdcc3aa7866ff888a3bace43f4b71fffb353
2016-03-02 18:27:10 +00:00
Nimrod Gileadi
c14893bf5a Merge "Close InputStream in BatteryStatsHelper" into nyc-dev 2016-03-02 09:17:21 +00:00
Lorenzo Colitti
e7636e4750 Make it easier to test code that uses WakeupMessage.
Code that uses WakeupMessage uses the AlarmManager. Testing such
code is slow because AlarmManager.MIN_FUTURITY ensures that
alarms must wait at least 5 seconds before firing.

This change makes WakeupMessage's fields protected so that test
code can subclass from it and override schedule() and cancel()
with implementations that do not use AlarmManager, for example
by making schedule() call sendEmptyMessageDelayed and making
cancel() call removeMessages.

Change-Id: I51096b182d9eb87cc7bd46c3c91906f18356b354
2016-03-02 14:15:04 +09:00
Lorenzo Colitti
b7ffb76437 Merge changes Ic366b532,I0179b45b into nyc-dev
* changes:
  Move PinningNetworkCallback out to a new NetworkPinner class.
  Use MessageUtils in ConnectivityManager.
2016-03-02 04:18:03 +00:00
Lorenzo Colitti
531a344300 Move PinningNetworkCallback out to a new NetworkPinner class.
Also add tests.

Bug: 19159232
Change-Id: Ic366b53259ee5944a8e864876425a6558c0a7216
2016-03-02 12:50:35 +09:00
Nimrod Gileadi
e9be5da686 Close InputStream in BatteryStatsHelper
Bug: 17760659
Bug: 27376093
Change-Id: I5e6471f73b3258067fb670a4b66ddc51be62b6ec
(cherry picked from commit e618b53081d9a173305b7c72cab4c2ed6ca2dcec)
2016-03-01 19:43:52 +00:00
Andreas Gampe
4f655de3de Merge "Frameworks/base: Refactor TextView initialization" into nyc-dev 2016-03-01 18:38:09 +00:00
Jeff Sharkey
de2dabbad6 Skip boot prompt for both native and emulated FBE.
Bug: 27412530
Change-Id: I53d39392ccab54cb79cf6cc1e51923ad7b5a3b0c
2016-02-29 17:12:34 -07:00
Andreas Gampe
ddc1397eba Frameworks/base: Refactor TextView initialization
To allow static initialization of a number of View classes based
on TextView, refactor the initialization of the font cache to be
explicit from the zygote.

Bug: 27265238
Change-Id: I1b71086d3f49d8b3e72eea2bf8359351d25fc0fd
2016-02-29 11:13:01 -08:00
Jeff Sharkey
f8880561e6 When system server goes down, crash apps more.
Similar to first patch, but now using new "rethrowFromSystemServer()"
method which internally translates DeadObjectException into
DeadSystemException.  New logic over in Log.printlns() now
suppresses the DeadSystemException stack traces, since they're
misleading and just added pressure to the precious log buffer space.

Add some extra RuntimeInit checks to suppress logging-about-logging
when the system server is dead.

Bug: 27364859
Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
2016-02-27 17:17:01 -07:00
Adam Lesinski
09c09fd345 Merge "BatteryStats: Fix issue where network traffic accounting might be lost" into nyc-dev 2016-02-27 00:15:11 +00:00
Muyuan Li
94ce94e960 Allows components to register shortcut key.
The registered shortcut will be called from PhoneWindowManager,
before dispatching

Change-Id: If26128939b45a639c8895719a7a23ca433f39fd9
(cherry picked from commit 4da863c5a8872dcabb179a978a2b2157d9081679)
2016-02-26 22:30:34 +00:00
Adam Lesinski
6cca414de2 BatteryStats: Fix issue where network traffic accounting might be lost
Both bytes transmitted and received must be 0 if we are to short circuit and
ignore the UID's network delta.

Change-Id: Ia69f605c7d5954b8f2c3671bab596dc9925f1d02
2016-02-25 18:24:28 -08:00
Mitchell Wills
ebc106cb71 Merge "Modify WakeupMessage to only send the message if not canceled" into mm-wireless-dev
am: 9505e0ac3f

* commit '9505e0ac3f6bef7ad850f3b6fc9ec576b65b1e55':
  Modify WakeupMessage to only send the message if not canceled
2016-02-26 00:20:00 +00:00
Roozbeh Pournader
e1df1ba087 Merge "Make system locale persistent." into nyc-dev 2016-02-25 23:42:36 +00:00
Phil Weaver
8ca583b29f Merge "Accessibility to toggle multiwindow mode" into nyc-dev 2016-02-25 23:16:52 +00:00
Phil Weaver
315c34e7d6 Accessibility to toggle multiwindow mode
Encapsulating the logic to toggle multiwindow mode from recents,
and plumbing it through to accessibility global actions. Sending
accessibility events when windows bounds change. Exposing the
dock divider window type to accessibility services.

Bug: 27250995
Change-Id: Ib7491f1f853dc7f01bf5c5a4ac1f914f55d0608a
2016-02-25 15:13:11 -08:00
Seigo Nonaka
bd5cbdd638 Make system locale persistent.
Configuration values are not persistent.
To make system locale persistent, use Settings.System entry.

During start up, the configuration is filled from Settings.
When the system locale is changed by Settings, the locale list in
configuration is copied to Settings value.

Bug: 26732134
Change-Id: If57e13cc4179ff6299c71b4ab030f9d856748dea
2016-02-25 15:34:23 +09:00
Mitchell Wills
634c1f9d0d Modify WakeupMessage to only send the message if not canceled
Change-Id: I9ca6d3726fe25c706b644bf61119837a7cbe6db1
2016-02-24 20:17:39 -08:00
Yohei Yukawa
b3fdffbb48 Merge changes Iaf179d60,I315cf372,I21d3c5cc into nyc-dev
* changes:
  Use LocaleList for implicitly enabled subtypes.
  Add a utility method to filter locales.
  Mechanical refactoring in InputMethodUtilsTest.
2016-02-25 02:57:51 +00:00
Yohei Yukawa
e985c240e3 Use LocaleList for implicitly enabled subtypes.
There are two major changes in this CL:

  1. Now IMMS resets its internal state whenever the system locale list
     is changed, rather than just checking the primary system locale.
  2. For software keyboard subtypes,
     InputMethodUtils#getImplicitlyApplicableSubtypesLocked() now takes
     the entire system locale list into account when determining what
     subtypes should be enabled by default when the user does not
     explicitly enable one or more subtypes.

Bug: 27129703
Change-Id: Iaf179d60c12b9a98b4f097e2449471c4184e049b
2016-02-24 18:27:04 -08:00
Yohei Yukawa
102ff0726d Add a utility method to filter locales.
This is a preparation CL to take secondary system locales into
account in InputMethodUtils#getImplicitlyApplicableSubtypesLocked().

Suppose the following situation:

  available subtypes:
    en-US, en-IN, and en-GB, fr, fr-CA, fr-CH, fr (QWERTZ)
  system locales:
    en-GB, en-US, fr-MC

Basically we want to have at most one subtype for each language appears
in system locales.  Hence the goal of this utility method is to filter
the above available subtypes into en-GB and fr.  In other word, we do
not want to enable both en-GB and en-US subtypes in this scenario.

This CL introduces LocaleUtils#filterByLanguage() for this purpose, with
some unit tests.  Note that that method is not used in production yet.

Bug: 27129703
Change-Id: I315cf3722a06e00bdbfac284c4949578da8fe78d
2016-02-24 18:25:16 -08:00
Daniel Sandler
ab0037c8a0 Merge "N-release temporary platlogo." into nyc-dev 2016-02-25 02:05:55 +00:00
Dan Sandler
bbcf8b6567 N-release temporary platlogo.
What are we going to do 13 releases from now, I wonder?

Bug: 27315386
Change-Id: I65814f9cd686b3bac537565166b2a5d09a9b8f2b
2016-02-25 02:04:51 +00:00
Chong Zhang
f8fb6d1261 Merge "Make sure background drawable callback is cleared during resizing" into nyc-dev 2016-02-25 00:38:19 +00:00
Chong Zhang
0df63d5d57 Make sure background drawable callback is cleared during resizing
bug: 27297724
Change-Id: I8ee3d0e093f94a7fc293f64949abbb612e0b2aa4
2016-02-24 15:39:53 -08:00
Jorim Jaggi
0ffd49cbe0 Always consume bottom insets when navigation bar is force shown
When an app requests SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION but we
force show the navigation bar, we need to treat for the app like
there is no virtual navigation bar on the device. Because if you
combine it with FLAG_HIDE_NAVIGATION, you'd expect the navigation
bar gets hidden but it doesn't, so there could be content that
overlaps with the navigation bar.

Bug: 27157904
Change-Id: I088e02eae2e723c35e9cb4873de6b1325458533b
2016-02-24 18:15:17 +00:00
Jorim Jaggi
ffd049027f Fix wrong measurement in DecorView
Bug: 27215338
Change-Id: I512df9b23788daf485b020a2199a55a7c6ab6311
2016-02-24 00:31:23 +00:00
Mihai Niță
86ee2c0235 Merge "Removed warning icons and use friendlier locale names" into nyc-dev 2016-02-23 21:37:05 +00:00
Joe Onorato
e1acd636d4 Make getBatteryUptimeLocked protected so it can be mocked.
Also fix test names.

Change-Id: I43477e61c22cd36735214951c45c52b39095e1b5
2016-02-23 13:28:03 -08:00
Mihai Nita
502141d50b Removed warning icons and use friendlier locale names
* Removed warning icons in locale list (b/26710677)
* Use getDisplayNameWithDialect() instead of getDisplayName()
  for the locale names (b/27066642)
* Set proper locale for the language labels (b/27130516)
* Fixed build warning in LocaleHelper (b/27148053)

Bug: 26710677
Bug: 27066642
Bug: 27130516
Bug: 27148053
Change-Id: I149a3675262b286c8b740d2ad5b02f4df31316ec
2016-02-23 13:24:27 -08:00
Joe Onorato
abded113bd Add unit tests for BatteryStatsImpl.
- Add a Clocks interface to wrap SystemClock.uptimeMillis and
  SystemClock.elapsedRealtime.
- Make the inner classes static so they can be created independently,
  which meant passing explicit pointers to the BatteryStatsImpl and
  the Uid objects in a lot of places.
- Make several fields protected so they can be accessed by the tests (they are
  still @hidden)
- Add a test suite for the battery stats.
- Add the tests

Change-Id: I4e45afedc64f7050985c28a7eb4f5c1ddbaa63fa
2016-02-23 12:44:22 -08:00
Lorenzo Colitti
2a452d48d5 Merge "Add a unit test for MessageUtils." into mm-wireless-dev
am: 6f027b4f06

* commit '6f027b4f0651837877e0f291bbf121436dfe3958':
  Add a unit test for MessageUtils.
2016-02-23 07:49:06 +00:00
Yohei Yukawa
05c25f8a3a Unify windowGainedFocus() and startInput().
This is a safe refactoring that changes nothing.

In order to improve the keyboard dismissal lags [1][2], we have used
IMMS#windowGainedFocus() as a combined event to do startInput() in
certain situations.

To make the intent of those CLs clear, this CL renames
IMMS#windowGainedFocus() to IMMS#startInputOrWindowGainedFocus().  Note
that these are @hide internal IPC protocols.  Hence this change is never
observable to application developers.

 [1] I8494cbd6e19e2ab6db03f2463d9906680dda058b
     a82ba54b0b
 [2] Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb
     7663d80f6b

Bug: 25373872
Change-Id: I56934f18e30d90fcdf77bcbb0c35a92a5feb1b82
2016-02-22 12:41:17 -08:00
Svet Ganov
9cea80cddd No overlay when permissions shown - framework
bug:26973205

Change-Id: I88395e47649191bb7db6dd8723c49e741ef4f1e4
2016-02-20 17:41:47 +00:00