Commit Graph

7848 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
Selim Cinek
6db575803e Removed the group expand button
It's now a normal group expand button.

Bug: 27431551
Change-Id: I6e5dc83613533ef8590b0a8180d8c4be8322aa21
2016-03-07 15:11:56 -08:00
Selim Cinek
3b050317bf Removed the bundle number from the header
Bug: 27431551
Change-Id: Ia0c663f0bab875abba4b35d565f3ac4ed2306079
2016-03-07 15:11:55 -08:00
Wale Ogunwale
8d5a542f66 Clear app token mAppStopped when app resumes.
It is possible for an activity to be in the stopped state without
setting it's visiblility to false in window manager.
For example, the home acitivty behind the lock screen. Since the
lock screen isn't an activity it doesn't affect the visiblity set
of the home activity, so AM doesn't tell WM to hide the app token.
However, AM uses another channel to detect that the device is locked
and moves the activity into stopped state. WM on the other hand also
detects that the device is locked and hides the window surfaces of
all windows behind the lock screen. So, at this point AM has also
told WM that the activity is stopped. Once you unlock the screen
AM resumes the activity but doesn't report any visiblility changes to WM
since it's internal state didn't change. So, if you go from the home
activity to another app the home activity window will be destroyed
before the activity is stopped because mAppStopped is set to true.
We now set mAppStopped to false when the activity is resumed.

Bug: 27286867
Change-Id: Ic75456d30abd582fa44f932f5aeeb449950157ee
2016-03-03 18:59:26 -08:00
Yohei Yukawa
3d68c9d30f Merge "Add more JavaDoc to InputConnectionWrapper." into nyc-dev 2016-03-02 23:35:35 +00:00
Eino-Ville Talvala
74989b4d3f Merge "Camera2: Switch to auto-gen C++ binder interfaces" into nyc-dev 2016-03-02 21:47:13 +00:00
Chong Zhang
f8fd852060 Merge "Force disconnect when the surface is about to be saved." into nyc-dev 2016-03-02 20:10:10 +00:00
Jeff Sharkey
c53962d4ed When system server goes down, crash apps more.
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.

The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.

Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
2016-03-01 19:29:16 -07:00
Eino-Ville Talvala
5d2d7788f1 Camera2: Switch to auto-gen C++ binder interfaces
- Move camera AIDL files to frameworks/av
 - Update makefiles to point to new AIDL locations
 - Adjust camera2 implementation to match modifications to AIDL needed
   for native AIDL auto-generation
 - Move Surface.aidl to frameworks/native to allow use in
   native AIDL. Use android::view::Surface in Surface JNI to
   serialize Surface objects to ensure parceling compatibility.
 - Adjust service binder tests to new interface

Bug: 25091611
Change-Id: I85b817374b34a4540fa145328dbe4bbf7f746baf
2016-03-01 17:15:17 -08:00
Jorim Jaggi
8175846ed6 Fix popup window calculation for multi-window
If ignoreBottomDecorations=true, the display size was extracted from
the resources. However, this didn't work if the parent window was in
multi-window, as all the calculations went wrong. Instead, introduce
View.getWindowDisplayFrame which returns the "full" frame of the task
the window is currently in, without any insets, and use that to
calculate the bottom edge.

Bug: 26255254
Change-Id: I8b235b335775022ae399ee082d1200aa76cc047c
2016-03-01 09:00:29 +00:00
Chong Zhang
47e36a3e27 Force disconnect when the surface is about to be saved.
Some client will not disconnect, and if we're saving the surface (instead
of destroying it), we need to make sure the surface is disconnected.
Otherwise the client won't be able to reconnect to the same surface.

bug: 27295820
Change-Id: I471b8fbe8f590c900e17a017167466fc8a70b87a
2016-02-29 16:51:59 -08:00
Yohei Yukawa
1d1c21c9cb Add more JavaDoc to InputConnectionWrapper.
This CL makes it clear that InputConnectionWrapper cannot be used to
emulate the behavior when a null InputConnection is passed to the
system.

We should provide some guideline for developers about how to deal with
bugs like crbug.com/571229, but as explained in the previous CL [1],
changing the behavior of InputConnectionWrapper could be a bit risky at
this point.  Hence we put more cautions in JavaDoc instead.

 [1] I8bc84d484ab0b27a02e74f11110430f70646e69a
     abc4b8f035

Bug: 27407697
Change-Id: I98d1fc096c108603647a85bb0ba045b5dd23d37b
2016-02-29 15:02:41 -08:00
Yohei Yukawa
b7480c2bd6 Merge "Revert "InputConnectionWrapper never supports null target."" into nyc-dev 2016-02-29 21:49:42 +00:00
Andrii Kulian
6cf85afcb1 Merge "Reset pointer icon when view is not present" into nyc-dev 2016-02-29 21:36:08 +00:00
Yohei Yukawa
abc4b8f035 Revert "InputConnectionWrapper never supports null target."
This reverts commit 90bd36363c.

Seems that the semantics of InputConnectionWrapper#setTarget() is more
complicated than I thought.  At least the following cases have worked
fine.

  case 1:
    InputConnectionWrapper wrapper =
            new InputConnectionWrapper(null, false);
    wrapper.SetTarget(ic);
    ...

  case 2:
    InputConnectionWrapper wrapper =
            new InputConnectionWrapper(null, true);
    wrapper.SetTarget(ic);
    ...

  case 3:
    InputConnectionWrapper wrapper =
            new InputConnectionWrapper(ic, true);
    wrapper.SetTarget(null);
    wrapper.SetTarget(ic2);
    ...

The previous code did not intended to break existing code.  Let's revert
it we decide how to deal with above cases.

Bug: 27407697
Change-Id: I8bc84d484ab0b27a02e74f11110430f70646e69a
2016-02-29 13:35:59 -08:00
Yohei Yukawa
90bd36363c InputConnectionWrapper never supports null target.
This CL makes it clear that InputConnectionWrapper does not support null
target.  In other words, the semantics of null InputConnection can never
be emulated by a non-null InputConnectionWrapper.

This is particularly problematic when app developers are just forwarding
the return value of super.onCreateInputConnection() to
InputConnectionWrapper or its subclass, because there are many chance
that super.onCreateInputConnection() starts returning null, e.g. when:
  A. the application is extending a Framework class, and the Framework
     class is updated by OTA.
  B. the application is extending system WebView, and the WebView is
     updated.
  C. the application is extending a 3rd party library, and the app
     developer creates a new build with a new version of the 3rd party
     library.

To make it easy to catch these kind of bugs, this CL lets the
constructor of InputMethodWrapper throw NullPointerException when target
is null.  Bugs like crbug.com/571229 should be caught by developers
more easily.

Bug: 27407697
Change-Id: I83875bea886d4784f9507c930050efc29708d9db
2016-02-29 12:45:49 -08:00
Andrii Kulian
33c1bc586c Reset pointer icon when view is not present
Sometimes pointer change request is delivered after view is detached from its
ViewRootImpl. E.g. when popup is present click outside to close it.

Bug: 27292939
Change-Id: I925728af334a1e1ae53f7e530d639e50b0c37f2b
2016-02-29 10:38:59 -08:00
John Reck
db0fd9dfb2 Merge "Switch to pbuffer surface sooner" into nyc-dev 2016-02-26 23:53:47 +00:00
John Reck
fc736869ac Switch to pbuffer surface sooner
Bug: 27286867

If the system/app is slow, it might take too long to
stop drawing. Switch the ordering of destroying stuff so
that we switch to the pbuffer surface first, then do
cleanup

Change-Id: If64a3dbb71bb9fd53567231590436a89b2f1a09e
2016-02-26 15:43:09 -08: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
John Reck
f4db3d253e Don't lose mInitialized in onStop()
Bug: 27350647
Change-Id: I74e6427ac4030645c416efb24948efdbdc90fa1c
2016-02-26 12:58:17 -08: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
6d2b3ac67c Merge "Show selection handles at the correct position for view transformation" into nyc-dev 2016-02-25 05:59:19 +00:00
Jorim Jaggi
26d02d29e3 Use actual window size for layout
When doing the actual layout pass, desiredWindowWidth/Height might be wrong,
because window manager has the final say how large the surface is, so use
that size.

Bug: 27342700
Change-Id: I4f74fdef66ba7aa88b86f8c95fb391b1cc847beb
2016-02-25 01:21:20 +00: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
Seigo Nonaka
2f229ca27b Show selection handles at the correct position for view transformation
The selection handles are implemented based on PopupWindow hence it is
necessary to calculate the transformed location from the TextView's
local coordinates.

This CL only addresses the selection handle locations. Many
functionalities (e.g. selection handle moving direction, handle angle)
doesn't work on transformed view since many components are calculated
on the TextView's local coordinates.

Bug: 24902578
Change-Id: Iaa5fd2812969d097e3bf3219a818ffbc67aaef54
2016-02-24 12:56:36 +09:00
Doris Liu
3005843506 Merge "Support running AVD on UI thread" into nyc-dev 2016-02-23 22:43:53 +00:00
Doris Liu
28cfd20f02 Support running AVD on UI thread
By default, AVD animates on RT thread. But since in some cases there's a
need for a finer control on when the frame update for the animation should
happen, such as coordiating the AVD animation with other animations that
run on UI thread, we are providing a way to force the AVD to run on UI
thread.

Bug: 27278616
Change-Id: I372ecd3dc52e3fa0bdce3a1e9c19443f9b199027
2016-02-23 14:40:47 -08:00
John Reck
e5bfd2da4d Merge "destroyHardwareResources in onStop()" into nyc-dev 2016-02-23 19:45:09 +00:00
John Reck
d9b1607bd9 destroyHardwareResources in onStop()
Bug: 27286867

This hopefully makes everything fully-deterministic. It should
also fix some old annoyances around Bitmap lifecycle as they will
be released earlier in onStop() instead of waiting for
dispatchDetachedFromWindow() which may never happen.

Change-Id: I6e871760650780e327c0e42f62950c1052dd8019
2016-02-23 10:35:19 -08:00
Wale Ogunwale
1f240c9fbf Only copy layout param title if it is different from the current one.
Fixes WindowManager_LayoutParamsTest failure introduced in ag/866860

Bug: 27297744
Change-Id: I27ebf5d35b074d6b9c1634bc7cd18bba2844352e
2016-02-23 07:54:03 -08:00
Selim Cinek
ce2bd0fac7 Fixed a bug where the numpad wasn't working correctly
Also accepting the enter key now from the numpad as a
confirm key.

Bug: 27108451
Change-Id: I63dbd4b6cad3d2dce74e297dcb7abad9c5e66cbe
2016-02-22 15:57:02 -08:00
Jorim Jaggi
7587e38992 Merge "Restrict dock sides after rotation" into nyc-dev 2016-02-22 22:07:54 +00:00
Jorim Jaggi
5060bd8910 Restrict dock sides after rotation
Bug: 27167078
Change-Id: If51626b75321eebc277eb2399ee753ffe489642b
2016-02-22 16:59:43 -05:00
Yohei Yukawa
5a19477ec4 Merge "Unify windowGainedFocus() and startInput()." into nyc-dev 2016-02-22 21:52:56 +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
Joe LaPenna
90776de6bb Allow button events in ambient.
See thread: "key presses & Ambient"

Bluetooth media button presses and Stem buttons were being rejected in ambient.  This change allows those keys while disabling touch events while in ambient.

BUG: 25964771
BUG: 26524301

Change-Id: I914edd447c38678a06d27677be4597c0ee384635
(cherry picked from commit 7528f57c4d)
2016-02-22 20:39:48 +00:00
Yohei Yukawa
263e21f12c Merge "Remove unused InputMethodInfo#isEncryptionAware()." into nyc-dev 2016-02-20 00:33:22 +00:00
Svetoslav Ganov
3c3e271447 Merge "Discard prefetched disconnected predecessors of a virtual node." into nyc-dev 2016-02-20 00:32:58 +00:00
Svet Ganov
75e5816102 Discard prefetched disconnected predecessors of a virtual node.
bug:18247269

Change-Id: I24f1ed1e9aa44fbb847722833fe68a1eef7e92c5
2016-02-19 16:29:33 -08:00
Yohei Yukawa
d9550a7545 Remove unused InputMethodInfo#isEncryptionAware().
This logically reverts a previous CL [1], which added
InputMethodInfo#isEncryptionAware() for File-Based Encryption (FBE)
support, since it turns out that the method in question is unnecessary
to make InputMethodManagerService encryption-aware.

  [1]: Icf921fe3661eccf4a589b08b616d05decc561356
       69811a98f1

Bug: 26279466
Change-Id: Ia4884bf5922ad453d4b9e5e3c6f0d17b36dc205d
2016-02-20 00:16:32 +00:00
Jorim Jaggi
82c9dc951e Fix configuration calculation when task is non-fullscreen
Apparently only the navigation bar is excluded when calculating
Configuration.screenLayout. Make the calculation for non-fullscreen
tasks consistent with fullscreen tasks.

Change-Id: I027e41e49ffe95245116f3d134e0bc93af0ee450
2016-02-19 22:59:34 +00:00
Doris Liu
46151a4739 Merge "End staging animators when destroy RootRenderNode" into nyc-dev 2016-02-19 22:45:55 +00:00
Doris Liu
e87a74e1a3 Merge "Revert "Revert "Check RenderNode's owning view before attaching animators""" into nyc-dev 2016-02-19 22:45:16 +00:00
Doris Liu
350e65206c End staging animators when destroy RootRenderNode
When animation happens in a dialog, it is possible for the dialog to
be dismissed and RootRenderNode to be destroyed before we create
animation handle for the staged animators. In that case, we need
to remove the staged animators so they will not run without a
animation handle.

Bug: 26975079
Change-Id: I0c2c6c1b530beaec3984c0b1c410df4fd8f25c95
2016-02-19 14:20:37 -08:00
Jorim Jaggi
8fe7e0a88e Fix clip reveal animation in docked window case
- Move ClipRectTB/LRAnimation to wm package, because that's the only
place we use it.
- Extend ClipRectTBAnimation to combine it with translation animation
so the clipping gets applied after the translation.
- Fix clip reveal transitions when a window is docked.
- Make the docked divider minimizing animations synchronized with clip
reveal animation.

Bug: 27154882
Bug: 22174716

Change-Id: If5c94c777f3b51c6f53f6f34cc261bf3439cfc88
2016-02-19 14:15:20 -08:00
Doris Liu
8b083206ae Revert "Revert "Check RenderNode's owning view before attaching animators""
This reverts commit eb40178af3.

Change-Id: I6838ecb35b50847746ee66ac204f14eb5f579b91
2016-02-19 13:52:41 -08:00
Jorim Jaggi
42625d1bc7 New behavior for docked stack when going home
- We keep the docked stack visible when home task is visible even
though it's not resizable.
- We introduce the a new concept called "minimizing" the docked stack,
which happens when going home. In this state, the docked stack is
clipped of almost completely.
- To achieve that, we introduce TaskStackBoundsAdjustController,
which adjusts the bounds of the docked stack when minimized. Also,
migrate the IME handling to this new class.
- We also need to inform SysUI that it is now minimized so it can
remove the drag affordance on the divider, and also make it a bit
smaller.
- When we detect an app transition, we check whether the home stack
gets visible/invisible. We then start an animation which runs in
sync with the normal app transition. For that we introduce
DockedStackDividerController.animate(), which performs the animation.

Bug: 27137961
Change-Id: I8623bc73cc6872bf28c5b1b8d5795974576811b2
2016-02-19 12:11:11 -08:00
Yohei Yukawa
116d872d9c Merge "Introduce InputConnection#getHandler()." into nyc-dev 2016-02-19 02:36:50 +00:00