Commit Graph

6046 Commits

Author SHA1 Message Date
Yohei Yukawa
f53bbbc730 Merge "Ensure IC#finishComposingText() is called on the correct Handler." into nyc-dev
am: 9194f34

* commit '9194f344b922cd04e5e44206ada6191865631daa':
  Ensure IC#finishComposingText() is called on the correct Handler.
2016-03-28 06:55:07 +00:00
Yohei Yukawa
9194f344b9 Merge "Ensure IC#finishComposingText() is called on the correct Handler." into nyc-dev 2016-03-28 06:47:50 +00:00
Yohei Yukawa
aaa38c9f1a Ensure IC#finishComposingText() is called on the correct Handler.
This attempts to reland previously reverted CLs [1][2] due to an
unexpected regression (Bug 27824691).

The Bug 27868748 we want to address by this CL is that currently
InputConnection#finishComposingText() can be called on the root view's
Handler no matter what Handler is associated with
ControlledInputConnectionWrapper.  Actually the root cause of
Bug 6789252 is the same, but there we worked around it by not calling
InputConnection#finishComposingText() in certain situations [3].
With this CL we should be able to logically revert that workaround.

This CL also removes redundant IMM#mServedInputConnection.  This is safe
because the following two fields have the same lifetime.
 - InputMethodManager#mServedInputConnection
 - InputMethodManager#mServedInputConnectionWrapper
We do not need to maintain both of them.  This also allows us to use a
strong refecente in IInputConnectionWrapper#mInputConnection instead of
a WeakReference.  To understand why this is safe, we need to understand
how things previously worked, which is as follows:

  1. InputMethodManager#mServedInputConnection becomes non-null.
    -> IInputConnectionWrapper#mInputConnection.get() is guaranteed to
       be alive.
  2. InputMethodManager#mServedInputConnection becomes null or another
     object.
    -> IInputConnectionWrapper#mInputConnection.get() may not be alive.

Since we know exactly when InputMethodManager#mServedInputConnection is
updated, in theory we do not need to use WeakReference here, and
with this CL we do not use WeakReference anymore.  Actually the initial
commit [1] accidentally removed the last strong reference to the active
InputConnection and WeakReference could be null at any time, which was
what we observed in Bug 27824691.

  [1]: I1181e067aa5bedbdf0c7ec1bcec479257aea511c
       afb6558c8f
  [2]: Ibe94f115e607a198d12ecd3d4e4f91a7d9469c98
       16e2c7b59a
  [3]: I66f51da1299532793ef8fa700f35b0811670f235
       4e5184f929

Bug: 27868748
Change-Id: If2a03bc84d318775fd4a197fa43acde086eda442
2016-03-27 23:46:04 -07:00
Jeff Sharkey
bef5aad065 Update PRE_BOOT_COMPLETED for FBE.
am: bd91e2f

* commit 'bd91e2f3f6aca512a02be645b2515b5e3331e177':
  Update PRE_BOOT_COMPLETED for FBE.
2016-03-27 17:47:15 +00:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Jorim Jaggi
ea42b59a06 Merge changes from topic \'recents_transition\' into nyc-dev
am: a04c532

* commit 'a04c532a09b8d946ebc9a086f673220059218869':
  Implement transition for docking task in recents #6
  Implement transition for docking task in recents #5
  Implement transition for docking task in recents #4
  Implement transition for docking task in recents #3
  Implement transition for docking task in recents #2
  Implement transition for docking task in recents #1
  Show a scrim activity if task is not resizable
2016-03-25 22:32:27 +00:00
Jorim Jaggi
2adba07d75 Show a scrim activity if task is not resizable
Add a callback to TaskStackChangeListener which gets fired when the system
might need to inform the user that a specific app might not work in
multi-window.

Use that callback in SysUI to show a translucent activity which scrims the
activity behind to inform that it might not be resizable.

Debounce the information to once per multi-window session, to not make it
annoying.

Introduce launchTaskId to start an activity in an existing task, and protect
that with START_TASKS_FROM_RECENTS permission.

Bug: 27327287
Bug: 27431869
Change-Id: I89e8d653872ab01ba3c1e252b426e5481da0e6ca
2016-03-25 14:23:41 -07:00
Jorim Jaggi
08c8f70c6c Merge "Add shadow during resizing in docked mode" into nyc-dev
am: 1f6bdbc

* commit '1f6bdbca6955ac195807fd82b325bd8010ea6141':
  Add shadow during resizing in docked mode
2016-03-25 21:19:16 +00:00
Jorim Jaggi
c39c7b0ce2 Add shadow during resizing in docked mode
Bug: 27738239
Change-Id: I48c45bd97c2aa7f3d7bbb5b1ba650fbe408bd0bf
2016-03-25 14:04:25 -07:00
Makoto Onuki
4304f6f10d Merge "Fix potential crash loop" into nyc-dev
am: 619f468

* commit '619f4682a3ba41d1d39356f16c9b1ec394b01464':
  Fix potential crash loop
2016-03-25 19:23:52 +00:00
Makoto Onuki
619f4682a3 Merge "Fix potential crash loop" into nyc-dev 2016-03-25 18:55:33 +00:00
Griff Hazen
228f051748 Merge "Detect ranchu as emulator" into nyc-dev
am: b63188d

* commit 'b63188de43c57174cccc1dc4c9b1df94828047e0':
  Detect ranchu as emulator
2016-03-25 18:19:16 +00:00
Griff Hazen
b63188de43 Merge "Detect ranchu as emulator" into nyc-dev 2016-03-25 18:05:47 +00:00
Makoto Onuki
c5475d42a4 Fix potential crash loop
Bug 27548047

Change-Id: I10648ccb2fd17464e18308846b910efa129ce126
2016-03-25 10:55:21 -07:00
Philip P. Moltmann
e3221b5488 Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev
am: ebf3976

* commit 'ebf397625ea5ee41af531da251d8d0cb89c26beb':
  Change hasCustomPrintIcon and setStatus as requested by API council.
2016-03-25 17:00:11 +00:00
Philip P. Moltmann
ebf397625e Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev 2016-03-25 16:50:36 +00:00
Griff Hazen
d3c454db29 Detect ranchu as emulator
Bug: 27780791

Change-Id: I23e5511acfba22260714874baf5e9380480b22bf
2016-03-25 09:35:20 -07:00
Philip P. Moltmann
d74d1e5491 Change hasCustomPrintIcon and setStatus as requested by API council.
Bonus: null advanced keys produced a exception deep in the print
       spooler. Hence prevent null keys on the surface from now on.

Bug: 27716355
Change-Id: I3c064956f4e670cd7091437ade06605aa8d797b0
2016-03-24 16:53:36 -07:00
Yohei Yukawa
a4700fe435 Merge changes I16312592,Iadfc226e into nyc-dev
am: cdf90bb

* commit 'cdf90bb6747aa100305def66a7984522600d803e':
  Revert "Remove redundant IMM#mServedInputConnection."
  Revert "Make sure to call back reportFinish() on the desired Handler."
2016-03-24 18:00:11 +00:00
Yohei Yukawa
cdf90bb674 Merge changes I16312592,Iadfc226e into nyc-dev
* changes:
  Revert "Remove redundant IMM#mServedInputConnection."
  Revert "Make sure to call back reportFinish() on the desired Handler."
2016-03-24 17:54:21 +00:00
Yohei Yukawa
223db8b6f5 Revert "Remove redundant IMM#mServedInputConnection."
This reverts commit afb6558c8f.

It turns out that this CL caused a serious regression Bug 27824691.

Bug: 25332806
Bug: 27824691
Change-Id: I16312592743a6673449c492ee5ba533256d343ea
2016-03-24 10:26:19 -07:00
Yohei Yukawa
1fa5f594a2 Revert "Make sure to call back reportFinish() on the desired Handler."
This reverts commit 16e2c7b59a.

It turns out that I1181e067aa5bedbdf0c7ec1bcec479257aea511c caused
a serious regression Bug 27824691.  To revert that CL, we have to revert
this one first.

Bug: 25332806
Bug: 27824691
Change-Id: Iadfc226eb91cc969b77c9d98e04ec3c76fe86ead
2016-03-24 10:24:23 -07:00
Clara Bayarri
c84e36b7ec Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev
am: 3e5bf78

* commit '3e5bf786b7ca36fa0cc150fcd8d0e7a69ecb9db0':
  Keyboard Shortcuts: plumb deviceId through
2016-03-24 13:37:26 +00:00
Clara Bayarri
3e5bf786b7 Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev 2016-03-24 13:30:48 +00:00
Clara Bayarri
322e4d23ea Merge "Keyboard Shortcuts: Add Keycodes for shortcut representation" into nyc-dev
am: bfd996f

* commit 'bfd996f5cd89d8c94fb23489ba62f3cab4b36f1c':
  Keyboard Shortcuts: Add Keycodes for shortcut representation
2016-03-24 11:57:26 +00:00
Clara Bayarri
bfd996f5cd Merge "Keyboard Shortcuts: Add Keycodes for shortcut representation" into nyc-dev 2016-03-24 11:49:05 +00:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Clara Bayarri
4e850ffaa7 Keyboard Shortcuts: Add Keycodes for shortcut representation
This changes the current API given app feedback received. In order to use
keycodes as well as chars we also must implement a mapping of Keycodes to
Display labels as only keys with a single char representation are provided
by KeyCharacterMap.

Bug: 27409783
Change-Id: I3da653adc4b8cbc66a4d1aa24a5f9181f71e83c3
2016-03-24 11:47:23 +00:00
Andreas Gampe
31e9eec4ea Merge "Frameworks/base: Refactor package manager" into nyc-dev
am: a7f2bcc

* commit 'a7f2bccca3f27a2ad12397ffb52d47fceea76018':
  Frameworks/base: Refactor package manager
2016-03-24 02:08:01 +00:00
Andreas Gampe
bdd30d86ef Frameworks/base: Refactor package manager
Introduce a mapping between dexopt reasons and compiler filters. Use
reasons in package manager and other classes, where possible.

Change PackageDexOptimizer to accept a compilation filter. Adapt for
the split-out profile merging. Pass compilation filter to installd.

Bug: 27689078
Change-Id: I8c0ea6f10fbfdbd096adecc52abfd2466d048fdc
2016-03-23 16:21:21 -07:00
Yohei Yukawa
8460701b3c Merge "Make sure to call back reportFinish() on the desired Handler." into nyc-dev
am: 2c8d528

* commit '2c8d528188f2ac9e482fe29d06ca5eb683be9b87':
  Make sure to call back reportFinish() on the desired Handler.
2016-03-23 21:53:50 +00:00
Yohei Yukawa
2c8d528188 Merge "Make sure to call back reportFinish() on the desired Handler." into nyc-dev 2016-03-23 21:48:51 +00:00
Abodunrinwa Toki
f227ca6b8e Merge "FloatingToolbar: Make it more obvious that there are more items in the overflow." into nyc-dev
am: 7c89170

* commit '7c891700995276c9f6952d0e1f2a2c1882d66f3d':
  FloatingToolbar: Make it more obvious that there are more items in the overflow.
2016-03-23 19:11:05 +00:00
Abodunrinwa Toki
7c89170099 Merge "FloatingToolbar: Make it more obvious that there are more items in the overflow." into nyc-dev 2016-03-23 19:03:51 +00:00
Abodunrinwa Toki
f0f4d73b5b FloatingToolbar: Make it more obvious that there are more items in the overflow.
1. Make the overflow show part of the items hidden behind the scroll view
2. Increase the time the scrollbar is on screen so users are less likely to miss it

Bug: 27427333
Change-Id: Ia0bff5fa29cba3103263bc7d063176b0ba7ff7b9
2016-03-23 19:02:32 +00:00
Adrian Roos
e933de8e76 Merge "Ensure notification color contrast" into nyc-dev
am: 9b95f61

* commit '9b95f615c45b2dac053aa45d881f6a4b3c301342':
  Ensure notification color contrast
2016-03-23 18:44:00 +00:00
Adrian Roos
9b95f615c4 Merge "Ensure notification color contrast" into nyc-dev 2016-03-23 18:14:54 +00:00
Adrian Roos
4ff3b120ff Ensure notification color contrast
Ensure we have at least 3:1 contrast for the
action buttons. Also ensures that the inline
reply box background has 4.5:1 contrast to white.

Further modifies the color of the inline reply
background to satisfy a 4.5:1 contrast ratio for
the entered text.

Bug: 26831312
Change-Id: If42b1c99d1adee547d0a583c1a69c48ef7287c23
2016-03-23 10:49:40 -07:00
Chris Banes
d4534a3d9d Merge "Allow AlertDialog to be used in a DialogFragment" into nyc-dev
am: a62a0f7

* commit 'a62a0f72864533f2de5d1cd311ed5030c293aa2d':
  Allow AlertDialog to be used in a DialogFragment
2016-03-23 16:34:51 +00:00
Chris Banes
ccf8e661c7 Allow AlertDialog to be used in a DialogFragment
AlertController calls requestWindowFeature() too
later for DialogFragment. Fixed by moving it to the
constructor.

BUG: 27809055
Change-Id: Icef01316b4e857b41ccc29cc56bbcecd7f629342
2016-03-23 16:20:00 +00:00
Yohei Yukawa
06963ca369 Merge "Remove redundant IMM#mServedInputConnection." into nyc-dev
am: c1a72b6

* commit 'c1a72b6b74c08b0b304998838d1e792884a6354c':
  Remove redundant IMM#mServedInputConnection.
2016-03-23 05:51:14 +00:00
Yohei Yukawa
c1a72b6b74 Merge "Remove redundant IMM#mServedInputConnection." into nyc-dev 2016-03-23 05:41:08 +00:00
Yohei Yukawa
16e2c7b59a Make sure to call back reportFinish() on the desired Handler.
Before exposing #reportFinish() as a public API, we have to fix an
existing bug that my previous CL [1] for Bug 26945674 forgot to take care.

Currently BaseInputConnection#reportFinish() is always called by using
the root view's Handler.  We should move the logic to call
BaseInputConnection#reportFinishInputConnection() from ViewRootImpl to
IInputConnectionWrapper to make sure that the method in question can
always be called on the desired Handler.

To make things simple, instead of explicitly calling #reportFinish()
from IMM, this CL let ControlledInputConnectionWrapper#diactivate()
internally call #reportFinish() as needed.  This makes it easier to make
sure that #reportFinish() is called after all the queued method calls
are handled.

  [1]: Id9e579bb3e2966986cdcb1c34bc8cacfeca2e1a9
       612cce92ad

Bug: 25332806
Change-Id: Ibe94f115e607a198d12ecd3d4e4f91a7d9469c98
2016-03-22 21:27:48 -07:00
Yohei Yukawa
afb6558c8f Remove redundant IMM#mServedInputConnection.
Following two fields have basically the same lifetime.
 - InputMethodManager#mServedInputConnection
 - InputMethodManager#mServedInputConnectionWrapper
Hence we do not need to maintain both of them.

This is a preparation CL for Bug 25332806 and does not change any
user-visible behavior.

Bug: 25332806
Change-Id: I1181e067aa5bedbdf0c7ec1bcec479257aea511c
2016-03-22 20:53:08 -07:00
Wale Ogunwale
acd060d6cb Merge "Don\'t finish resolver activity onStop if it is for home intent" into nyc-dev
am: b2303dd

* commit 'b2303ddd0516881342067114d141bb8493997776':
  Don't finish resolver activity onStop if it is for home intent
2016-03-21 22:58:45 +00:00
Wale Ogunwale
b2303ddd05 Merge "Don't finish resolver activity onStop if it is for home intent" into nyc-dev 2016-03-21 22:53:10 +00:00
Wale Ogunwale
9014e66db0 Don't finish resolver activity onStop if it is for home intent
Helps avoid a continuous launch cycle if a resolver activity resolving
the home intent is the only activity in the system and the lock screen
is up which will put the activity in the stopped state. The activity
then finished itself onStop, but is then relaunched by the activity
manager since there are no other activities in the system and the
home activity should be present.

Bug: 27674536
Change-Id: Iaca67a00c4a37f70aafd18aedcbd8dba2f561203
2016-03-19 15:57:07 -07:00
Dianne Hackborn
23430bf34c Merge "Fix issue #27653326: Sync doesn\'t work in doze maintenance" into nyc-dev
am: bf949ce

* commit 'bf949ce8a0f8d0a39bdc069c4bedddc4edef26e2':
  Fix issue #27653326: Sync doesn't work in doze maintenance
2016-03-19 00:57:50 +00:00
Dianne Hackborn
bf949ce8a0 Merge "Fix issue #27653326: Sync doesn't work in doze maintenance" into nyc-dev 2016-03-19 00:53:03 +00:00
Yohei Yukawa
5a0d9cf754 Merge "Tell IMS about missing InputConnection methods." into nyc-dev
am: 1064d35

* commit '1064d35307cff0601a22c8401cb72f628883489d':
  Tell IMS about missing InputConnection methods.
2016-03-19 00:44:11 +00:00