223221 Commits

Author SHA1 Message Date
Yohei Yukawa
e3c761c87e Add @hide SpellCheckerSubtype#getLocaleObject().
This is a mechanical refactoring with no behavior change.

With this CL, InputMethodSubtype and SpellCheckerSubtype have the same
getLocaleObject() hidden API, which makes it easy to share the logic in
subsequent CLs.

Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: I39dc0c310158ad23ba6c987efce07deaf30ce693
2015-12-04 22:07:39 +00:00
Yohei Yukawa
9534ae1858 Add SpellCheckerSubtypeTest.
Before introducing behavior changes, this CL adds
SpellCheckerSubtypeTest to make the current behavior clear.

Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: Ied18580f31497156510e1b785adfc248683ba94d
2015-12-04 13:05:20 -08:00
Daichi Hirono
0e234bcde4 Merge "Polish MtpManagerTest." 2015-12-04 03:34:19 +00:00
Daichi Hirono
99b58052f8 Polish MtpManagerTest.
Change-Id: Ibadd209ee1cb752f0e55694d0f1f631c558f1370
2015-12-04 12:32:41 +09:00
Jeff Sharkey
a1fbe28218 Bring along the rest of the change too.
Change-Id: Ic1ca033e7f4003f7c7d10d3a47de00006f18fe02
2015-12-03 20:12:45 -07:00
Jeff Sharkey
28b41a3bd6 Grr, fix build from a skipped merge.
Change-Id: Id5961399c6057b8d721ad2a858aa91d107b0ab94
2015-12-03 20:06:46 -07:00
Phil Burk
2f44e87842 Merge "USB MIDI: Fix race condition that causes intermittent connections." am: 1c9bdfd029 am: ec719f1509
am: 740b6f6fc7

* commit '740b6f6fc7edc74b1ff73a3797cfecbd6d6941a0':
  USB MIDI: Fix race condition that causes intermittent connections.
2015-12-04 02:50:39 +00:00
Jeff Sharkey
cf085e1a41 Merge "Allow customisation of advanced settings in DocumentsUI" am: f1b325c1ec am: f2a3c341ab
am: b0b78ab587  -s ours

* commit 'b0b78ab5874b48c18fd10e939c4f134bcae52cd9':
  Allow customisation of advanced settings in DocumentsUI
2015-12-04 02:49:19 +00:00
Jun Mukai
e56a3449d8 Merge "Introduce accessibility large pointer icons." 2015-12-04 01:53:16 +00:00
Winson Chung
644c6f70a8 Merge "Minor tweak to initial paging state." 2015-12-04 01:45:35 +00:00
Winson Chung
6e79b08407 Merge "Fixing landscape transition into Recents." 2015-12-04 01:45:31 +00:00
Jorim Jaggi
8589600035 Merge "Make it harder to dismiss recents when dragging up" 2015-12-04 01:35:46 +00:00
Phil Burk
740b6f6fc7 Merge "USB MIDI: Fix race condition that causes intermittent connections." am: 1c9bdfd029
am: ec719f1509

* commit 'ec719f1509807765dac661286000c7e411ec9662':
  USB MIDI: Fix race condition that causes intermittent connections.
2015-12-04 01:27:36 +00:00
Winson
116b2c2c54 Minor tweak to initial paging state.
- Making the scroll and focus animations identical so that it doesn't
  cause a weird flicker.

Change-Id: If1e3d23cd5ef45e429341c6bf7ac62b3a17eb662
2015-12-04 01:23:17 +00:00
Yohei Yukawa
b4ea6ddc03 Merge "Introduce EditorInfo#locales." 2015-12-04 01:21:02 +00:00
Phil Burk
ec719f1509 Merge "USB MIDI: Fix race condition that causes intermittent connections."
am: 1c9bdfd029

* commit '1c9bdfd0294cd1b13470ae6443bfa2ad425bd7dd':
  USB MIDI: Fix race condition that causes intermittent connections.
2015-12-04 01:18:51 +00:00
Yohei Yukawa
d550050171 Merge "Make LocaleList Parcelable." 2015-12-04 01:18:41 +00:00
Phil Burk
1c9bdfd029 Merge "USB MIDI: Fix race condition that causes intermittent connections." 2015-12-04 01:12:01 +00:00
Phil Burk
1852019c39 USB MIDI: Fix race condition that causes intermittent connections.
Plugging in a USB MIDI device normally works.
But occasionally the device is not seen due to a race condition.
This code retries until the device is ready.

Change-Id: Ifba9c9678e6be0c3d139f3467f895307096a2ad8
Signed-off-by: Phil Burk <philburk@google.com>
2015-12-03 17:00:42 -08:00
Jorim Jaggi
8fccfe2814 Make it harder to dismiss recents when dragging up
Change-Id: I5883f754125e978ebac470a2c72a1dc13b05b052
2015-12-03 16:58:08 -08:00
Winson
e759cd58bd Add tuner params to change the initial stack state and navbar gesture.
Change-Id: I114b8342f5293589eb96a1fd3a14da1757e75a95
2015-12-03 16:55:06 -08:00
Winson
23746d51d9 Fixing landscape transition into Recents.
- Fixing jump in transition when going into Recents in landscape
- Also adding check to prevent NPE when searching for a null task.

Change-Id: I3944ea54caaab41a069a9e8255601ec2871afe56
2015-12-04 00:15:24 +00:00
Jorim Jaggi
389a3069ff Merge changes I284c851e,I3b1229e0,Ifbb10bac,I518521e6,I1f6a0efd
* changes:
  Drag up gesture improvements
  When dragging from the left side, dock on the right
  Draw status bar background in BackgroundFrameRenderer while resizing
  Don't remove colored bar views when relaunching
  Add flag so apps always draw status bar background
2015-12-04 00:13:05 +00:00
Fyodor Kupolov
680215f502 Merge "Fix instrumentation context initialization" 2015-12-04 00:12:00 +00:00
Jorim Jaggi
870ab5a15c Drag up gesture improvements
- Use current velocity of finger for the animation, makes it feel
smoother.
- When flinging downwards, maximize the docked stack again to cancel
the gesture.

Change-Id: I284c851e2e418d21e890b9dfe983cfe63300fe10
2015-12-03 16:11:27 -08:00
Jorim Jaggi
213cbe665b When dragging from the left side, dock on the right
In landscape, when dragging up from the left side, dock the current
app on the right side.

Change-Id: I3b1229e0d347db6cc1f55272c7d76694417977d0
2015-12-03 16:11:16 -08:00
Yohei Yukawa
8d6eeb01df Introduce EditorInfo#locales.
The primary goal of this CL is to enable application developers to
provide more context-based language (locale) information for IME
developers so that users can be benefited by more natural text input
experience.

As of API Level 23, there are several APIs that allow IMEs to retrieve
locale/country related information.

  - Locale#getDefault()
  - Configuration#locale
  - LocaleSpan#getLocale()
  - SubscriptionInfo#getCountryIso()

However, only LocaleSpan#getLocale() can be used to pass application
specific languge (locale) context from applications to IMEs.  Also
LocaleSpan is not designed to be used per input-context.  We want to
have something in EditorInfo and LocaleList would be the right thing.

Although default implementation of TextView#onCreateInputConnection()
starts filling EditorInfo#localeList with TextView#getTextLocales() by
this CL, application developers are encouraged to provide its own
LocaleList when they are confident that the user want to use a
certain (set) of language(s).

For instance, a chat application may be able to guess what language will
be used in the conversation before the user start typing.  At least it
should be able to remember the last used language for each conversation.

Another instance would be "From" and "To" EditText fields in a
translation app.  Those fields should have different LocaleList based on
the languages that the user want to translate from and to.

Bug: 22859862
Change-Id: I77db5b99a7cf745d800db75baf135bb60ad04820
2015-12-03 16:10:37 -08:00
Chong Zhang
e920098f31 Merge "Fix window disappearing when docking a second app" 2015-12-04 00:06:38 +00:00
Jorim Jaggi
04c2fbd6fe Draw status bar background in BackgroundFrameRenderer while resizing
To make sure there is always enough contrast between the status bar
icons and the background, we move the drawing for the status bar
background into BackdropFrameRenderer while resizing, so we can
extend the width into the full surface width.

Bug: 24365214
Change-Id: Ifbb10bacf66670c3637f6f6730a8ac47eb1c3939
2015-12-03 16:06:09 -08:00
Chong Zhang
48a87a5426 Fix window disappearing when docking a second app
When moving app1 to docked stack, the app2 is resized while in background
(fullscreen stack). Because of the config change, mWillReplaceWindow is 
marked true. But since the app2 is in GONE state, all updates of mFrame
are skipped. When it's made visible again, because mWillReplaceWindow is
set, update of mFrame in computeFrameLw() is still skipped, resulting in
wrong mFrame being used.

The fix here is to not set mWillReplaceWindow if the app is not visible,
as we don't need to preserve old window.

Also fix position change check.

bug: 25937471
Change-Id: Iea506296ebd5c2a108368fb2d1d77cdc31a36cdc
2015-12-04 00:02:34 +00:00
Yohei Yukawa
789d8fdbd9 Make LocaleList Parcelable.
This is a preparation work to pass LocaleList from TextView to IMEs via
EditorInfo.

Marshalling and unmrshlling LocaleList via Parcel is actually not so
difficult.  We can reuse its internal data representation "localeTags"
as a canonical serialization format.

As for implementation, there are two choices.  One is making LocaleList
Parcelable and the other is having a utility method to do that.

This CL uses Parcelable approach so that not only Framework but also
application developers can reuse the code.

Bug: 22859862
Change-Id: Ib28363bd5ff74228d2abeaa95004ec8bed72bddd
2015-12-03 15:53:50 -08:00
Chris Craik
9e50b788a5 Merge "Reorganize hwui test directories" 2015-12-03 23:39:22 +00:00
Yohei Yukawa
50611a8ad7 Merge "Add a test for constructLocaleFromString(String)." 2015-12-03 23:31:44 +00:00
Vineeta Srivastava
8b32eb64b3 Merge "Set Tether APN protocol type to IPv4 for Telus" into mnc-dr1.5-dev am: 9eacc97d71 am: 360930372f
am: 9bbb90383e

* commit '9bbb90383e6d8e78ac68248ff278394b37dc9fb8':
  Set Tether APN protocol type to IPv4 for Telus
2015-12-03 23:27:58 +00:00
Jorim Jaggi
6e0ce286a8 Don't remove colored bar views when relaunching
Change-Id: I518521e6b5e0b18a7f9ad9c7c6a67d55e2dfa2ab
2015-12-03 15:23:44 -08:00
Jorim Jaggi
4fa7892f35 Add flag so apps always draw status bar background
So we don't have to implement crazy magic when one app requests
drawing the status bar by itself, and the other doesn't in split
mode.

Bug: 24365214
Change-Id: I1f6a0efd0865b784402055e008da2f31e626f163
2015-12-03 15:23:27 -08:00
Rob Carr
a4740c02e6 Merge "Fix repositionChild positioning." 2015-12-03 23:23:26 +00:00
Yohei Yukawa
226c4bba67 Add a test for constructLocaleFromString(String).
This is a follow up CL for ed65bc0c62ca99a118057db7ad54c4ccc14d52d0 [1],
which fixed special handling of a fake language code "tl".

  [1] Ica9cd2baac002c406f92331aadd7725d7424046a

Bug: 20696126
Change-Id: Ifc8bf2ff6bd617a215e4b68f6b2bf9b94e80db07
2015-12-03 15:21:15 -08:00
Jeff Sharkey
b0b78ab587 Merge "Allow customisation of advanced settings in DocumentsUI" am: f1b325c1ec
am: f2a3c341ab

* commit 'f2a3c341ab9061b576ab399e1336e9e45afb8c2e':
  Allow customisation of advanced settings in DocumentsUI
2015-12-03 23:19:42 +00:00
Robert Carr
31e2848cc0 Fix repositionChild positioning.
Two seperate issues corrected. First top and left
were swapped as parameters to repositionChild. Second
the recent change to update attributes was incomplete.
Updating the attributes fixes the size and scaling
but its also necessary to update the frame in order
to trigger an update to mShownPosition. Extract and
use a method applyGravityAndUpdateFrame to do so.

Bug: 25791641
Change-Id: Id0b98d587e8acf163121b28eb377c4cf83ebc58b
2015-12-03 15:19:07 -08:00
Jeff Sharkey
f2a3c341ab Merge "Allow customisation of advanced settings in DocumentsUI"
am: f1b325c1ec

* commit 'f1b325c1ec41c09f6efeb3d7709e7e7af93eacb8':
  Allow customisation of advanced settings in DocumentsUI
2015-12-03 23:11:51 +00:00
Jeff Sharkey
f1b325c1ec Merge "Allow customisation of advanced settings in DocumentsUI" 2015-12-03 23:04:29 +00:00
Edward Savage-Jones
827dec0e48 Allow customisation of advanced settings in DocumentsUI
Enables the customisation of the default value of the DocumentsUI
'advanced' setting using overlays.

Change-Id: I240cbb845d15ab2ea6ae7a79a17b4f51905fdb9c
2015-12-03 23:02:47 +00:00
Winson Chung
47f98ae56b Merge changes I1e345044,I8c00aba3,I91536ce4
* changes:
  Fixing crash when the focused task was removed.
  Freeform workspace fixes
  Fixing jump when second finger touches the stack.
2015-12-03 22:57:06 +00:00
Jeff Sharkey
dc7a753e5f Merge "Attempt to unlock users with null token." 2015-12-03 22:36:07 +00:00
Jeff Sharkey
b9fe53705c Attempt to unlock users with null token.
When starting a locked user, try unlocking their storace will a null
token, which will typically succeed if there is an insecure
lockscreen (no PIN or pattern).

For users with a secure lockscreen, pass through a stub token for
now to indicate that it came from a user challenge.  Eventually we'll
hook that up to gatekeeperd.

Without this, we were only unlocking users with secure lockscreens.

Bug: 25943941
Change-Id: Ia0324d50f43f55dfe0b8366793ddc5d25d885922
2015-12-03 15:34:27 -07:00
Winson
aaf33bc2b2 Fixing crash when the focused task was removed.
- The previous fix didn’t work when the stack changed and the focused 
  task indices shifted.  It’s easier to just keep track of the focused
  task so that we can clean it up directly.

Bug: 25975225
Change-Id: I1e345044165d3a0a5eab29fb8c2a3f59df615832
2015-12-03 14:27:58 -08:00
Winson
a78a8f31d2 Freeform workspace fixes
- Fixing issue with the wrong task view index being calculated for
  freeform workspace tasks causing them to be invisible when dragged
  to the stack
- Reducing unnecessary detach/reattach calls for freeform tasks
- Adding freeform workspace background to match exit to home animation

Change-Id: I8c00aba377601da92195ef301ba5da1ffb0045c5
2015-12-03 14:27:35 -08:00
Winson
40149bfe8c Fixing jump when second finger touches the stack.
Change-Id: I91536ce49d04bc13cbd54f230139592d1d3a3cf1
2015-12-03 14:26:02 -08:00
Winson Chung
1c8a1d7bec Merge "Adding workaround to prevent flicker in Recents when resizing." 2015-12-03 22:23:47 +00:00