History log of /frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f40ee509c6c2c9486af09e577eb18a97a91374f9 10-Aug-2016 Phil Weaver <pweaver@google.com> Don't preserve a11y focus in hierarchy state.

This change rolls back functionality added in ag/747748.
The idea was to restore accessibility focus on
configuration changes, but the restoration was happening
too early, which caused ViewRootImpl and the View to
disagree about accessibility focus. This confusion makes
some views unreachable by swiping after a configuration
change.

Bug: 30042251
Change-Id: Iae32b5425a1e7de9a8f5be965feb912fd2d9a0bb
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
155edc693eecb64d821a95567e719d0de7ee9c85 09-Jun-2016 Phil Weaver <pweaver@google.com> Improve accessibility window title behavior

Un-reverts ag/1057448, but uses a version of Resources#getText
that returns null rather than throw an exception when no title
is available. This is the same call made before, so this change
should be safer.

Bug: 28744278
Change-Id: I8c123f4f6d74f796ab9e8ffcf955aaf881770da1
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
fc7130964024dc80c2c9a5e878418a81d35df00b 08-Jun-2016 Phil Weaver <pweaver@google.com> Merge "Revert "Improve accessibility window title behavior"" into nyc-dev
266ed9acc396ff007b75b8356429d703117de2d7 08-Jun-2016 Phil Weaver <pweaver@google.com> Revert "Improve accessibility window title behavior"

Bug: 29127065

This reverts commit 2a7e4442bf9892842e0fc7eba9296e8fcf9f8ea5.

Change-Id: Ibc5527cfedd49c685ffd1b8ae59e87ed99c93d39
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
8e879f1fec1ca6c641f270b58447033ab4671851 26-May-2016 Jorim Jaggi <jjaggi@google.com> Enforce background fallback to be non-translucent

To avoid screen garbage or wallpaper shining through, the background
we use there for filling the whole needs to

a) Be non-translucent in all cases except if the window is translucent.
b) Don't infer it from the theme as it might be unexpected. Don't define
it in the theme, and use black if it's not defined.

Bug: 28763785
Change-Id: Ifb724b5c5feea3ed70d68e5bd7615fa91185e743
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
2a7e4442bf9892842e0fc7eba9296e8fcf9f8ea5 20-May-2016 Phil Weaver <pweaver@google.com> Improve accessibility window title behavior

Suppress the default, unlocalized strings from being read as title.

Bug: 28744278
Change-Id: Iea0f7d8fed3d6428ada725cf3ffa077ba974b74a
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
d98dcab679ce477c3acba298feb8fc2302e69333 02-May-2016 Jaewan Kim <jaewan@google.com> Fix crash when device doesn't support picture-in-picture

Bug: 28512987
Change-Id: Ic8287d70fed491d7493d443ba7d9633b7d9aaea9
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
f0fd218382b96f052d22a2e8ee00510cc23a6d1e 20-Apr-2016 Jaewan Kim <jaewan@google.com> PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist

Bug: 27954955
Change-Id: I517e378d5c1672ac0eb87bdf4375b7d733276e58
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
ff22a56ef88214381cc9955f9a32d0e8d4db228f 18-Apr-2016 Adam Lesinski <adamlesinski@google.com> Use Activity resources in DecorContext

We use the application context in DecorContext to avoid holding a reference
to the Activity. However, the resources don't match the Activity's in a multi-window
world, so we use the resources from the Activity, which get updated as the Activity
goes between multi-window states. This avoids holding a reference to the Activity.

Bug:28096052
Change-Id: I2804f2420afad6dcecc56e5dece008c390540d72
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
3fb1c81394f98b025b488774916b7580f9e31dab 13-Apr-2016 Wale Ogunwale <ogunwale@google.com> Merge changes Ieefeb843,Ic2a94b09 into nyc-dev

* changes:
Update surface insets on window elevation changes.
Fixed bug with cropping out drop shadow for pinned stack.
8f5701bd9f1149d672d63758e522dcfaaa258a73 05-Apr-2016 Jorim Jaggi <jjaggi@google.com> Only force drawing status bar background if target >= N

Since forcing it all the time has the potential of breaking
compatibility with apps, we don't want to do this.

Instead, we only force it if the app targets >= N.

We communicate this to window manager with
PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND.

We introduced this for 2-up split-screen. If we have an app
that doesn't draw the status bar background by itself, we
just force the whole bar to be black.

The same applies for windows that used translucent status
bar - we also force the whole bar to be black

Bug: 27285627
Change-Id: I7f1ceaa364f8a4e851935f77aa5e8d913bf11791
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
246c209e4fe704c0745224be0ab05225e8431d11 07-Apr-2016 Wale Ogunwale <ogunwale@google.com> Update surface insets on window elevation changes.

Window manager factors in the surface insets when calculating the
right crop for a window surface. Without the surface insets been
updated and new param forwarded to window manager, the window crop
will not be the right size and the window drop shadow might not show.

Bug: 27364161
Change-Id: Ieefeb8435543f3137672a065269cdeefca371111
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
9be3c7bdc7d49e9f99861d20fb134799291f20df 08-Apr-2016 Phil Weaver <pweaver@google.com> Eliminate side effects of a11y window title.

ag/898112 added passing the window title to accessibility. To do that,
it also updated copy of the title in WindowManager.LayoutParams. That
was a behavior change, and the change broke cts tests that enforce that
the title in LayoutParams matches its expected format.

This change restores the previous behavior and adds a separate field to
LayoutParams to old an up-to-date title to pass to accessibility.

Bug: 28002185
Change-Id: Ia5b549113600b7c4fcc80b76c3f3a944dddaf483
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
d4a19326085f2a68d568dfa754c29fd0ac49d193 04-Apr-2016 Phil Weaver <pweaver@google.com> Merge "Add accessibility window title and anchor." into nyc-dev
933076d80561751618f462b26309ce9e4c3ff3bf 30-Mar-2016 Andrii Kulian <akulian@google.com> Refactor usages of Picture In Picture and Multi Window (1/4)

Bug: 27365860
Change-Id: I1590e430a12ceb84cb83da295e0bf7e4378fea96
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
396d549113bc633f719acc643c7dfc5f2a8fae4e 23-Mar-2016 Phil Weaver <pweaver@google.com> Add accessibility window title and anchor.

Plumbing through the title of windows so support multiwindow
accessibility.

Adding ability to determine the anchor of a pop-up window so the pop-up
can be traversed as part of its anchor.

Bug: 27687627
Bug: 8449376

Change-Id: I59e98a29fb90029407a26de5bf3d900fed5dd627
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
c39c7b0ce2b80fbadfd58245c106cc513b83eac2 24-Mar-2016 Jorim Jaggi <jjaggi@google.com> Add shadow during resizing in docked mode

Bug: 27738239
Change-Id: I48c45bd97c2aa7f3d7bbb5b1ba650fbe408bd0bf
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
3b93a4d351aeb154fba8a4b2fa66ca25a951993d 30-Jan-2016 Wale Ogunwale <ogunwale@google.com> Renamed Activity class multi-window APIs

As requested by API council.

Bug: 26507736
Change-Id: I2a87c5eb3c1b48d52703103c2a4f72c250a9a827
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
1937a4c68a586e75501a90253c90b213a4d6167f 20-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Update width available for dialogs on all configuration changes.

Bug: 26504275
Change-Id: I7a0399e4af77ab02df8b3dff68adcf37b36d7ca7
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
4846ee3cc378001128680f2a3309c7e60bfcac75 07-Jan-2016 Jorim Jaggi <jjaggi@google.com> Optimize window relayouts when dragging divider

- Communicate the resize mode to ViewRootImpl. If it is a docked
divider resize, do not call relayout for every traversal.
- Do not call Task.resizeWindows() unconditionally when changing
Stack bounds. It might be just a move.
- However, not calling relayout breaks layout bounds while
relaunching. To fix that, do the following:
-- Inform ViewRootImpl that the activity just relaunched, and force
a relayout call in the next traversal so the client can pick up
the unfrozen bounds.
-- When unfreezing the bounds, cause a traversal in window manager.

Bug: 25015474
Change-Id: Iab9a445dabce4f6ec1e25957038fe40a4be65246
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
891c9ee76ef493e8a46b085fda3f43e4df56f75a 08-Jan-2016 Alan Viverette <alanv@google.com> Don't explicitly set the title's layout direction

The decor view may not be attached to the ViewRootImpl yet, so we can't
resolve the layout direction. Also, cleans up an instanceof check for
clearing the foreground since every class now supports foreground.

Bug: 26459947
Change-Id: I261661338dbaad6cc971ec7ae6875f514ecfbcde
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
60db7c317df900b598765e3560c1518174429408 07-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Merge "Use activity dimensions instead of display to calculate dialog size."
34dab0b3d9d461d441f9c63a39565c8734620cd3 22-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Use activity dimensions instead of display to calculate dialog size.

This adjusts the code for measuring and laying out dialog windows, which
used display dimensions as a basis for calculating the dialog
dimensions. Because of this dialogs would be too large in multi window
mode, where the parent bounds are far smaller than full display. This
switches to using dimensions for configuration received from activity
manager.

Mind, this is still not working as needed, because the resources return
minimal size of the dialog as if it was displayed on a full display,
rather than within activity bounds.

The CL also introduces better logging tags in ViewRootImpl and
DecorView. These normal approach works reasonably well when there is a
single activity on the display. However, when multiple windows are
displayed, it becomes impossible to determine which view root/decor view
logged what. This adds a suffix, that allows to identify the owner.

Bug: 26251921

Change-Id: I515a1ff9a81ee5ad086773196db71915e88a25eb
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
f4bdaeb38d7e9889216472284f9547f9726b7aa4 06-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Don't depend on mContentParent to determine if content was set.

mContentParent might be set due to window preservation, rather than due
to client setting the content view. We should mark the content view as
set only when it's explicitly done.

Bug: 26345798
Change-Id: I749de9def8ff708592fa20abdb7da366ec52f24d
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
796b8c17d68841b6ee0988966fdd8259ba6629d9 22-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Only use DecorContext with main activity windows.

Bug: 26251921
Change-Id: Icd41eddd4f39b95a136ee366673fabbef9d4def0
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
3e5f080528c17acd93023ca47fa548da0e1ed2a7 15-Dec-2015 Wale Ogunwale <ogunwale@google.com> Merge "Fixed bug with caption not showing for some apps that handle config changes"
eb6722c0bc87dd5419df1eb92268b824c2d29b50 08-Dec-2015 Wale Ogunwale <ogunwale@google.com> Fixed bug with caption not showing for some apps that handle config changes

We currently decide when to show the decor caption onConfigurationChanged
However, if the app handles configuration changes or the threshold isn't
big enough for the configuration change to be reported to the app, we don't
display the caption in some cases when transitioning from fullscreen mode
to freeform mode.
We now also use the onMultiWindowModeChanged call to also determine if
the caption should be visible.

Change-Id: I237437f04ad90f904912ebac0253245f547b0e3e
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
77fb85eda9923970d6f8f699e8d628d37c3dd764 14-Dec-2015 Alan Viverette <alanv@google.com> Only handle Context submenus as dialogs when parent is a dialog

Bug: 25656520
Change-Id: I5841d8f0c3d4a537e2d94aacddb1687d05d5c258
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
3dec081967db3c0e906ff272d632618e260b6413 09-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Remaining APIs for freeform window caption.

The APIs are:
* setting a listener for the area of the caption where we display
control buttons; this is intended for apps that overlay the caption on
their content, so they don't display the content in that area and clash
with the buttons;
* specifying the color pallete of controls in the caption; by default we
try to infer the best color from the theme (dark buttons for light theme
and vice versa), but in case we get it wrong, we allow the developer to
overwrite it;
* specifying the caption background during the resizing; by default we
try to infer a good color from the theme, but in case we do it wrong, we
allow the developer to overwrite this.

The CL also includes merging of layouts decor_caption_dark and
decor_caption_light into a single one. Not only it reduces code
duplication, but also is necessary for allowing adjustment of the
controls color pallete after the layout was created.

Bug: 25486369
Bug: 25818398

Change-Id: Ib87fe849b07df341893ec7873982bf7ab932f6d5
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
9b81e406b03f9a1c39e33e54919d7bd84ce8998d 09-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Remove Window.setDecorView API.

We currently don't have a strong use case for this.

Change-Id: I106aaf1224d7934964d9b92628fd3cdd42507c46
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
012ce3453f5f7737cae5d6afa1338191e740274f 07-Dec-2015 Seigo Nonaka <nona@google.com> Merge "Allow IMEs to opt out the opaque navigation guard view."
0a9d1ea015af24056018ec02f6d9afd2f62243ba 18-Nov-2015 Seigo Nonaka <nona@google.com> Allow IMEs to opt out the opaque navigation guard view.

Previous CLs [1][2] introduced an opaque navigation guard view to
avoid the island effect (the real nav bar is transparent but the IME
shows its UI with assuming that the real nav bar is opaque).
[1] I460912ee7c117480c57b947ed31eca330819f32c
[2] I6a93f30aec83f1cecfb854073046cbc87ab4aa66
Although the current guard view works fine for that particular case,
there are two major situations where having an opaque navigation
guard view does not make much sense.
1. The IME shows no software keyboard at all.
Some IMEs automatically hide software keyboard when a hardware
keyboard is attached.
2. The IME relies on floating UI that is disjoint from the bottom of
the screen.
The main goal of this CL is to address case 2 because unlike case 1
the system is not able to automatically detect the case 2. Only IME
developers know when the opaque guard view should be opted out.
Of course, if IME developers can opt out the opaque guard view,
it means that they can also work around case 1 without relying on
the system, but again it is not the primary goal of this CL.
With this CL IMEs are now able to opt out the opaque navigation guard
view by calling Window#setNavigationBarColor(Color.TRANSPARENT) from
InputMethodService#onWindowShown(). Note that this API used to have
no effect for IME, hence reusing this here should have no compatibility
issues.
Note that any other color is currently ignored to minimize the impact
on UX.

Bug: 22564251
Change-Id: Iea77915ecc55eedaf19899e72c44f704ba9d852c
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
6e0ce286a820b2eccb8106335c531a89d841d0c4 02-Dec-2015 Jorim Jaggi <jjaggi@google.com> Don't remove colored bar views when relaunching

Change-Id: I518521e6b5e0b18a7f9ad9c7c6a67d55e2dfa2ab
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
021627eb5875372dea57ba91fa782fffbfbbc559 25-Nov-2015 Alan Viverette <alanv@google.com> Ensure only one context menu is shown at a time

Refactors the menu helper classes. Both classes now implement a common
MenuHelper interface, which eliminates the need to keep separate helpers
on PhoneWindow and unifies the DecorView showContextMenuForChild()
implementations.

We now explicitly dismiss any previously shown context menu before showing
a new context menu. Previously we relied on the modal nature of the dialog
context menu to prevent multiple menus from being opened at once, but this
is no longer reliable with popup context menus.

Bug: 25656520
Change-Id: Idab3daa6d6888f803f2e33660fe1dd488e4c28d1
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
0d7e912b001838748bfb61b92b81d2f493ef4a6b 17-Nov-2015 Wale Ogunwale <ogunwale@google.com> Moved management of NonClientDecorView from PhoneWindow to DecorView

Bug: 24810450
Change-Id: I682afe1b15cb8ec1f98b38b88a499243d4c6c8a3
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
8804af2b63b0584034f7ec7d4dc701d06e6a8754 17-Nov-2015 Wale Ogunwale <ogunwale@google.com> Move DecorView out of PhoneWindow into its own class file.

Bug: 24810450
Change-Id: Ifa4e01517c80cec6d9a5b1051e5ccb7bab94a470
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
bc8d90d4848da14e680e136bead2527fbb4039ef 08-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Always add PhoneWindow when creating DecorView.

Because DecorView is now a static inner class, we need to remember to
always add the PhoneWindow on which it depends.
PhoneWindow.generateDecor will do that now to prevent further
mistakes.

Also remove PhoneWindow.setFeatureFromAttrs which is not used
anywhere and seems to be an artifact from the past.

Bug: 25086413
Change-Id: I0d8e5df717d7046e85ffc58f7ec4e94ce15a7d80
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
02a5a6bb9ba05bdf7517de90ede49fb535ea06ca 02-Nov-2015 Wale Ogunwale <ogunwale@google.com> Merge "Added StackId object for checking what features a stack supports"
3797c22ea16e932329ebffdc7e7ce09f9ecd9545 27-Oct-2015 Wale Ogunwale <ogunwale@google.com> Added StackId object for checking what features a stack supports

Helps make the code easier to follow since we are no longer checking
multiple stack ids at various decision points.

Bug: 25282299
Change-Id: Ifa6864a1ef56ce2eca4c94f87a4e0b993de987cd
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
b97ba3c09d5baf7c85ac4ddbdeb99770a7d3cab3 30-Oct-2015 Rob Carr <racarr@google.com> Merge "Add window setDecorView API."
1e60e0c61a3ec4b53aeae7fbe9c6da4d047a5d02 28-Oct-2015 Wale Ogunwale <ogunwale@google.com> Support for pinned stack to always be on-top of visible stacks

Bug: 25006507
Change-Id: I577e11224eead72dbb50def6be30b640707d2187
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
b6c2624c8d9ee71d1c8d0aaf8082f92bb84b1418 22-Oct-2015 Robert Carr <racarr@google.com> Add window setDecorView API.

Add a Window API for setting a view which will be placed in
the decoration area (next to the window control buttons).

Change-Id: Ie106cbea653ff95fdba987a2a43506d394600612
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
99db1863a84364339fc5dc9142f15910cdd96ed8 24-Oct-2015 Wale Ogunwale <ogunwale@google.com> Added support for pinned stack.

Used to support picture-in-picture use case for multi-window

Bug: 25006507
Change-Id: I3bef3f75e0c003f5974274294f1250171d424625
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
5bcd3189c52423040281a9f52eeaaef08a7db8a5 23-Oct-2015 Wale Ogunwale <ogunwale@google.com> Updated support for drawing background drawable when resizing

f3a62fbc58bbc7f081a53248cae48a8951294e8f added support for drawing
the background draweable when resizing an activity window.
However, after some additional discussion we decided that
R.styleable.Window_windowResizingBackground and
R.integer.config_windowResizingBackgroundColorARGB are not needed.
We use R.styleable.Window_windowBackground for the background
drawable and fallback to using R.styleable.Window_windowBackgroundFallback
which is now public if the first isn't set.

Bug: 24534744
Change-Id: Ia0507e25a1893ea941d259f1d4e88ce500dda154
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
5419280fb325eaf52102cf543deebb95a10a0871 16-Oct-2015 Adrian Roos <roosa@google.com> am 2de89ae8: am 3c439c72: am 85fae34e: am 70ea8578: Merge "Fix wrongly laid out navigation color view" into mnc-dr-dev

* commit '2de89ae843a0a6b492eaa55f96a641df16b718a8':
Fix wrongly laid out navigation color view
f3a62fbc58bbc7f081a53248cae48a8951294e8f 15-Oct-2015 Wale Ogunwale <ogunwale@google.com> Added support for resizing background color for an app window

R.styleable.Window_windowResizingBackground allows an activity to
specify the background drawable that should be used when it is being
resized in multi-window mode. If unset, the system will try to use
R.styleable.Window_windowBackground if set, then
R.styleable.Window_windowBackgroundFallback if set. Otherwise, the
system default resizing background color set by
R.integer.config_windowResizingBackgroundColorARGB.

Also, use decor title color as caption background color when resizing
instead of black.

Bug: 24534744
Change-Id: I83313865b4044b976ebc78d598e14e17e0f37212
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
fc7476da7a59f0fb7b07d6e188ae6d0b55f140b8 16-Oct-2015 Adrian Roos <roosa@google.com> Fix wrongly laid out navigation color view

The SystemUI visibility listener in DecorView
gets called between the measure and layout passes
and is therefore not allowed to change layout parameters.

This change makes sure that changes to the color view
layout parameters are applied eagerly when the insets
change instead of waiting for the views to become visible.

Bug: 24614374

Change-Id: If9df18f582163d0869c28a852c36697b1ce50621
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
2dfcf5ce2e96073d6cb875d048684e0a074ce2b6 14-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Keep freeform window surface translucent during resize.

Freeform window surfaces are translucent because most of the time they
have shadows. During a resize we stop displaying the shadow, which
might change the surface opacity from translucent to opaque. This change
only happens if the activity gets recreated during the resize, as this
triggers recalculation of the necessary opacity. If configuration change
happens the relayout will now contain new, opaque pixel format and cause
the recreation. The second blink will happen after we finish resizing,
as the surface needs to become translucent again.

Bug: 24668341
Change-Id: I450323276c49f176f0f6dfb3b21a5f6d742a8418
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
d16ebb0d099f80f590a4e1c2322c406be4768bbe 09-Oct-2015 Wale Ogunwale <ogunwale@google.com> Allow apps in home workspace to have non-client-decor.

Currently required for apps like recents to resize correctly
with the 2-render thread approach. Eventually we will want to
separate the functionality from the non-client-decor.

Bug: 24742523
Bug: 24810450
Change-Id: Id241bf8fe47dd8c4ec570c90149c859c45aa6285
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
c10bcedc3afa55e45ac12789b51e8366bfb32c5f 08-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Fix leak of decor view children.

When activity doesn't have a non client decor view but we preserve its
windows, we need to remove the children directly from the decor view
instead.

Bug: 24750271
Change-Id: I50e83ef61deba92e668ee165c4a297547a56071f
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
14418daa093f8cd39b7fccbc24115a6968dc8e92 05-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Fix recents crashing during docked stack resize.

Whether acitvity window should be preserved during the relaunch is
controlled by the activity manager and the existence of
non-client-decor should not affect it. For example, docked activities
will not have non-client-decor, but we would like to preserve them
anyway.

Bug: 24573657
Change-Id: I5d4852c3b7c26ac3ec1bbc105639f75b67d1d3ad
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
b816087962aba0019b022303330f03b897b580ed 22-Sep-2015 Skuhne <skuhne@google.com> Rendering the window frame with a second thread

Using a multi threaded render node to render the window frame
asynchronously from the application relayout.

Bug: 22527834
Bug: 24400680
Bug: 24459827
Bug: 24409773
Bug: 24537510
Change-Id: I1010fc6a8b6e38424178140afa3ca124433ab7e4
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
0daf2102a20d224edeb4ee45dd4ee91889ef3e0c 29-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Fix leaking the first activity while preserving windows.

This is achieved by not having the decor view hold onto the activity
context. Instead, we are wrapping application context, so that we can
have theme support and also have a special instance of window manager
that is aware of the phone window (the same way as activity do).

This reverts commit a5ffea3b7d323cb57c0f9872468dd5c2e2ec66bb.

Change-Id: I924f4c7ef8f0d20e9174bd7b3e00ec00b44443b9
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
a8be1b99ec6c9ad675d80717c25a57fed0aea923 29-Sep-2015 Chong Zhang <chz@google.com> Carry over app token when preserving window

Otherwise the token in the window's attr will be null after relaunch.
When this attr is updated with WindowManagerGlobal, setStoppedState()
will no longer find the view from the token.

bug: 24404382
Change-Id: Ib6935b03346a84dd023e224f72896041fda9dcd5
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
ed3912692f0ba8a647d795462e20fcdb67adbacb 01-Sep-2015 Oren Blasberg <orenb@google.com> Make context menus show as popup menus.

This means that right-clicking/long pressing on a view that is registered for
context menu will show the context menu as a popup menu instead.

Bug: 20016398
Change-Id: I96fea60435fff2f981d288521f490f8ff24ada15
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
a5ffea3b7d323cb57c0f9872468dd5c2e2ec66bb 25-Sep-2015 Wale Ogunwale <ogunwale@google.com> Revert "Fix leaking the first activity while preserving windows."

This reverts commit 640a3909a33c5688f7752e5db6f7c6b23801300c.

Bug: 24293179
Change-Id: I9819f85d96bee240544beee9583b070c751cb9fc
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
640a3909a33c5688f7752e5db6f7c6b23801300c 16-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Fix leaking the first activity while preserving windows.

Preserving decor view across activity relaunches would leak the first
activity, because the decor view would hold onto into in the form of the
context. This CL fixes that by having DecorView and NonClientDecorView
use application context instead.

Another source of a leak is DecorView being inner, non static class.
This would keep the orignal, first PhoneWindow around, which in turn
holds a reference to the activity. DecorView is now static and has
explicit reference to the PhoneWindow.

Change-Id: I3df58755d65d3d36ea2157908b0000b2d5c4ab70
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
a59ac9cd645d25f03e4e488100bd99f92e83a3a7 11-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Preserve window during resize triggered relaunches.

This changes application code behavior when the activity relaunches due
to configuration change. It only applies to scenarios, where the
configuration change was triggered by a user generated resize of an
activity (i.e. user drags a corner of an activity and thus changes its
size).

Preserving a window means that we will keep the decor view and non
client decor view around, but remove all children views when the
activity gets destroyed. When the activity gets created again, it will
attach its new content to the preserved view hierarchy. Mind, we
actually recreate application side Window object, since some of its
features might changed, but we retain its elevation (to not trigger
relayout with new layout params).

Preserving the window also means that we don't call the window manager
service to remove and later add the window. Instead, we continue using a
single window state throughout the resize operation.

Change-Id: Ie3d2878ed09c99ff343044bfe7a29a0ba07a265e
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
8e89b31a62fb9ec5ad33908c5e8e9c7ab2fd949f 10-Sep-2015 Chong Zhang <chz@google.com> Move window moving and resizing handling to WindowManager

- add a startMoving API to initiate a window move from app, once
the move starts WindowManager will take over the event handling.

- detect touch events along window's outside border and start
a resize if necessary

Change-Id: Ic7e8baba34e0aa27a43173e044ffb46e93e219e0
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
a5a93eea9b696ad57c77b6855681a317865c565c 21-Aug-2015 Skuhne <skuhne@google.com> Adding user resizability by dragging shadow outsets

This needs to land after 757372.

Bug: 21738872
Change-Id: I69283c8a38d625157dcb1b0d939bfaaa0f140f0c
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
49cbf6ba24a18c9c6dcfa907d282e45b55746579 18-Aug-2015 Robert Carr <racarr@google.com> ActivityManagerService: Rather than throw an exception, return
INVALID_STACK_ID from getWorkspaceId when there is no associated
workspace. This leaves the caller free to default.

PhoneWindow: Default to FULLSCREEN_WORKSPACE_STACK_ID in the case
of INVALID_STACK_ID returned from the ActivityManagerService.

Bug: #23171731

Change-Id: Id5132337459bd2ef81b2416434d7657b6f3d1855
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
4cbd3ac740ac395b9c8a5042118fdf2a6f757467 19-Aug-2015 Alan Viverette <alanv@google.com> Save and restore accessibility focus using decor view

Also avoids potential NPE when decor view is null or has no view root.

Bug: 23316836
Change-Id: Iccf75ddc0e4c769a234f5b80bc0707631c2719a2
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
abd89024acaa3870eb2a66a14f866d7f19afa3a9 17-Aug-2015 Alan Viverette <alanv@google.com> Merge "Manage accessibility focus during PhoneWindow save and restore"
dc12e1531ff9c4f9cc77289cbc7a0cd838ffcb8b 14-Aug-2015 Alan Viverette <alanv@google.com> Merge "Remove framework-private HSV APIs, replace with luminance"
ec6cf1846a67c421af5ce6f6acd38f64d65b1f1d 13-Aug-2015 Alan Viverette <alanv@google.com> Manage accessibility focus during PhoneWindow save and restore

Bug: 21403390
Change-Id: Ia474a54b55ba6e0309dda58939daa47b93a7dccb
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
c87ad53299eec33371bb9669c1484db19b4e5451 13-Aug-2015 Alan Viverette <alanv@google.com> Merge "Temporary revert "Clean up phone window save/restore""
eae66cd2c90bdb274602fd2c6da97207553bbb80 13-Aug-2015 Alan Viverette <alanv@google.com> Temporary revert "Clean up phone window save/restore"

This reverts commit 0578a725bf6905267b9caed6f5a8cedb2946e71e.

Change-Id: Ic460a0a7785a6829aab9963191714120859d36b0
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
e38e547d9886771b255f48be6da07e575bfb17a0 13-Aug-2015 Alan Viverette <alanv@google.com> Merge "Clean up phone window save/restore"
0578a725bf6905267b9caed6f5a8cedb2946e71e 13-Aug-2015 Alan Viverette <alanv@google.com> Clean up phone window save/restore

Comment clean up, final declarations only. No functional changes.

Change-Id: Ied118bcbd0462e2bf9745dee683d9e54a9767b1a
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
01da2fc7dff79f0d38dd298b60b9c4166134f56a 13-Aug-2015 Stefan Kuhne <skuhne@google.com> Merge "Adding API to access / change the task bounds"
ce2faa5871e3bf5ec8407506df18bed209dd824c 11-Aug-2015 Skuhne <skuhne@google.com> Adding API to access / change the task bounds

Bug: 21738328
Change-Id: I3aabcbe1dcc5caa70f66554157f41fbfacf4c50f
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
96165f4396a3ed5a6700dfe1507b43724fbefa57 12-Aug-2015 Adrian Roos <roosa@google.com> am e77660d7: am ea73528c: am afdfc2c0: am 192ca56d: am c0a4883d: Merge "Prevent overlap of color views in landscape" into mnc-dev

* commit 'e77660d7f4e261f21e9d8d2098c451d55ccbc533':
Prevent overlap of color views in landscape
81590a48a4bb0b6700e5535c5bce720ddfc76fa2 12-Aug-2015 Alan Viverette <alanv@google.com> Remove framework-private HSV APIs, replace with luminance

Luminance is the measure used by W3C to compute contrast ratios, so
we should be preferring that for "brightness" comparisons.

Bug: 22815971
Change-Id: I84a971d3cc6b12acebe8e455c0c0440c1c8bce06
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
fe836fabd9c6d3a3a7aaa51db7bb9bd6c9239833 12-Aug-2015 Adrian Roos <roosa@google.com> Prevent overlap of color views in landscape

Removes overlap from the color views which resulted in subotimal looks
when both color views were translucent and the nav bar was on the right
edge.

Also fixes a bug introduced in I2df7092a91eceeb815367ef917dd7289f4f2b27e
where the navigation-bar-on-right-side case got forgotten and caused
flickering in landscape when IMMERSIVE_STICKY was set but the navigation bar
was visible.

Bug: 22876533
Change-Id: I449a82eb3dc3f7b5051f26b37b362a196b4ff63a
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
624262cc40689d8ce2905676b163eee54ac5bdf9 11-Aug-2015 Skuhne <skuhne@google.com> Disallowing decor on the home workspace/stack

Bug: 23038659
Change-Id: Iee0b9fb3bd0b3f5d6759441485ef5edc514e8669
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
f4dd71a2657d23d12d5fe6e5e1273aab65d80ca4 07-Aug-2015 Stefan Kuhne <skuhne@google.com> Using workspace to dertermine decor to use

This patch uses the assigned stack to determine if
a non client decor needs to be added or not.

Since the visibility of the non client decor is
dependent on the used workspace, and an application
can transfer to a different workspace at any time,
the visibility might also change at any time.
As such this patch will also create the nc decor
for every window which might need it later in time.

BUG: 22984908
Change-Id: Ic7c0b3fd93d021bce882a5345738ceb3f608a3b9
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
1b42057707dce8039326492e89a766f397043aa8 07-Aug-2015 Stefan Kuhne <skuhne@google.com> Adding actions to non client decor buttons

This patch requires CL 744205 to be landed first.

Bug: 22881983
Change-Id: I1bbce52e18719adcd09c7e70e09c37ec33387b04
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
61b47bb267dec696e1bb11f7c5eb6b9d2f4bd096 28-Jul-2015 Stefan Kuhne <skuhne@google.com> Adding the 'non client decor view' to free floating windows

This patch adds a new free floating window non client decor view which
has:
- Two buttons (maximize and close) as it meets our current UX design
- A Shadow which changes size with focus
- It's own view as preparation for the thread distributed drawing and
user interaction handling (resize handles, etc)

Missing is at this point:
- The button functionality itself.
- Changing/removing decors based on window type (once the needed
patches land.

bug: 21738666
bug: 21739152
Change-Id: I6e41f2a7470256cee7bae35029d7e8c43fb235dd
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
f6f1a7ec9935c32e6c1155333de94ac9cd544442 01-Aug-2015 Dianne Hackborn <hackbod@google.com> am 628b4125: am bc2a8843: am b97c5ddd: am 9b36f526: am c1836bb0: Merge "Change MNC codename to just M." into mnc-dev

* commit '628b4125843b93dc7f3ed0c9bbea76ff470d2eed':
Change MNC codename to just M.
0e3de6cacaffcfeda4d6353be61e2f1f9ed80705 30-Jul-2015 Dianne Hackborn <hackbod@google.com> Change MNC codename to just M.

Change-Id: I4281d200ff6560791c47cf9073ceea1cb509361e
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
8d94835b4901fb01804bee3a1be8d05dbf510f65 16-Jul-2015 Derek Sollenberger <djsollen@google.com> Remove unused HardwareLayer and associated code for generic views.

bug: 20461288
Change-Id: I4efa9e31a42682a8a90438d52c9c665a582f950c
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
c3cb6c9b22ffd9907fd602fcace763c4ba9525e9 15-Jul-2015 Adam Powell <adamp@google.com> Relax strict ActionMode instance checking when finishing action modes

In previous platform versions, finishing an action mode would clean up
the current action mode even if it was not the same ActionMode
instance. Some common shared code inadvertently relied on this
behavior, so stay bug-compatible with it based on targetSdkVersion.
New apps will get the stricter behavior.

Bug 22265882

Change-Id: Id5d6341aefc07a3cb788d5d6d0b531816f761e42
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
165ce066b701ba0153000f0692bfc7032655d17d 07-Jul-2015 Jorim Jaggi <jjaggi@google.com> Fix assist for hardware long-press

Activating the assistant will now route through SysUI, so
we have the logic whether to start an activity or to start a voice
interaction session in one single place.

Bug: 22201770
Change-Id: I0f4699533aea2a1e595ee25a844434c82f548c01
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
0ab731340b162a14eb49b8df78a0e96eb6e3a934 24-Jun-2015 Doris Liu <tianliu@google.com> Merge "Add enter/exit animation for window provided CAB" into mnc-dev
169f87a04bf05c114efb2c66a56bf83173c638b7 23-Jun-2015 Doris Liu <tianliu@google.com> Add enter/exit animation for window provided CAB

Bug: 21886856
Change-Id: I6b20901c51ce7d74058f6ef866334f622a1fa3a4
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
972ab4f8588c365cf9c06e1f22b30a96fb0a06fc 17-Jun-2015 Abodunrinwa Toki <toki@google.com> Fix FloatingToolbar flickers.

This is fixed by avoiding calling toolbar.show() in PhoneWindow.
FloatingActionMode coordinates whether or not the toolbar should be
visible. PhoneWindow differs to it.

This CL also adds a new API:
ActionMode#onWindowFocusChanged(boolean)

Bug: 21617792
Change-Id: Ic49ce1000ce9c782d0f9e17e3d024d462c7b758b
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
41607d5a2b8cc4a3fde4a2f75e33a00e8d957b1d 17-Jun-2015 Adam Powell <adamp@google.com> Request application of WindowInsets when setting a content view

For both PhoneWindow and VoiceInteractionSession, call
requestApplyInsets when the content view(s) change. This is generally
what the developer expects if the new view tree responds to insets in
any way.

Bug 21620924

Change-Id: I60a88af55bf85217c3587aa37f03fdc3fdce686d
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
0f925d0def01d586108c6ef0683efd8d9bbe1737 09-Jun-2015 Clara Bayarri <clarabayarri@google.com> Merge "Fallback to old Window.Callback#onWindowStartingActionMode" into mnc-dev
9f8f6e4e1c93025892bb5d8005725bcbdab5830b 09-Jun-2015 Clara Bayarri <clarabayarri@google.com> Fallback to old Window.Callback#onWindowStartingActionMode

Some custom implementations of Window.Callback might not have the new
typed method, fallback to typeless if it is implemented and the type
was Primary.

Change-Id: Ie98f9a57354363f1b9f8e48f889298f3ee4b59e2
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
0e5f110fc915a9b044eb04cd07ae7ac588eacc8f 06-Jun-2015 Tim Kilbourn <tkilbourn@google.com> Pass an args bundle to launchAssistAction.

In order to track the input device that was used to trigger assist, the
input device id is sent as an extra in the assist intent whenever it is
available. This is particularly useful on TVs, when an app may want to
know whether the input device has a microphone.

Bug: 21666123
Change-Id: I0f8c09e2f617606bef481bdff924cb6b9b47dd12
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
a16cc15f6cf24b3ab30636476c4fa632265e44f1 02-Jun-2015 Jorim Jaggi <jjaggi@google.com> Make sure starting windows only draw once

The panel menu was invalidated, and thus a runnable was posted for
the next frame, to update the panel menu, and invalidate the view. We
avoid this by not invalidating the panel menu for starting windows.

Bug: 20949632
Change-Id: I67ca47e3a7ce3ba1d685c2313efa66fb1cdee312
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
8a8ffd4e9b15a04d2af0909205658f08c76bd6b2 27-May-2015 Adrian Roos <roosa@google.com> Translucent bars in landscape

Bug: 18739556
Change-Id: Ib9602a9d1f09e6bd6c1306927990676120dff012
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
2217f61e51ba4b19c56b19297c1e9cf74d7d860f 26-May-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""

This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
4bb6b751fbbb218e8a298db4aa008472a0aa8d31 23-May-2015 Dianne Hackborn <hackbod@google.com> Revert "resolved conflicts for merge of 47249f2a to mnc-dev"

This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
c7becb7ee78881646251ff4846e63eb6b96bf7ec 21-May-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 47249f2a to mnc-dev

This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
0d7d4ef56083543d58ef5835ec594865a547347c 13-May-2015 Clara Bayarri <clarabayarri@google.com> Fix Floating Toolbar appearing after ActionMode was cancelled

The Views created for the Toolbar were not cleaned up properly when the
mode was cancelled by the client in onCreateActionMode, leading to the
toolbar appearing over other views when it shouldn't due to
onWindowFocusChanged showing the Toolbar if it exists.

We don't actually need the views if we don't know whether they are
going to be shown yet, so moved view creation to after onCreateActionMode

Bug: 20713912
Change-Id: Ic0c31d1634e1e96d9981a77b2c769306a8bf1a8d
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java
6711f3b34c2ad9c622f56a08b81e313795fe7647 07-May-2015 Adam Powell <adamp@google.com> Move PhoneWindow and friends back into internal package

PhoneWindow, PhoneLayoutInflater and PhoneFallbackEventHandler decided
to @hide out over in the android.view package after the policy jar was
disbanded. Give them a more appropriate home over in framework that
doesn't imply that they should be accessed from other internal layers
of abstraction.

Bug 19606548

Change-Id: Id07b791d178fa447010b49b24726b52208838e88
/frameworks/base/core/java/com/android/internal/policy/PhoneWindow.java