History log of /frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
406d916c591e469a106c87e81c0931e15e88885c 09-Jun-2017 Sujith Ramakrishnan <sujithrk@google.com> Prevent unwanted keypress actions during TV Setup.

- Prevent Search or long-press Home actions
while TV setup is being completed based
on flag TV_USER_SETUP_COMPLETE.

Test: Manual - Reset device, ran Setup, tried keys.
Test: Manual - Rebooted device after Setup, tried keys.

Bug: 62419382
Change-Id: Ic8fb0f10943ab7c39a7d9857f62e6ab292231b40
(cherry picked from commit 0390fff82c37c705670a6c8937c11b52e2af4cb6)
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7ad24ba7f3b4b5287d6ba53d0dcfd5e3317e3ec4 21-Jun-2017 Robert Carr <racarr@google.com> Create Splash Screen context with CONTEXT_RESTRICTED.

It seems we need to do this to prevent loading and parsing
of downloadable fonts.

Bug: 62813533
Test: go/wm-smoke
Change-Id: I9bf9cfac7feba955217e0f3a0fcaa0d7e09d5991
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
469a2087d58325be9077dc06aed07563f9025179 14-Jun-2017 Casey Burkhardt <caseyburkhardt@google.com> Resolve 3 inconsistencies in accessibility button API
- Unify logic for detecting availability of the accessibility button
- Ensure the initial visibility state is propagated to A11yMS
- Ensure services only receive availability callbacks for changes

Test: Manual, created test accessibility services
targeting specific breakages
Bug: 38345417

Change-Id: I2250b32830cdfc2ecdc1dff7b7130dced2c1db29
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
67b29d5d498a497cf5164e0f840b30a8d197f716 10-Jun-2017 Jorim Jaggi <jjaggi@google.com> Fix wake-and-unlock animation

Since okToDisplay was false when we started the keyguard exit
animation, no animation was applied and we didn't create a
starting window, which lead to flickering. We fix this by
allowing animations from mScreenOnEarly.

Furthermore, we synchronize the navigation bar better with the
rest of the animation.

We also need to apply no animation to the status bar window as
we go through performShowLocked because we were waiting for it
to draw.

Test: go/wm-smoke
Test: Wake-and-unlock
Test: Make sure no other regression with screen on experience
Change-Id: I5f264b74cc258e8d7f608978edfb1faa5ead385c
Fixes: 38441599
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5f97880714e0ee2c503bca0d7681e896c53386b0 08-Jun-2017 Felipe Leme <felipeal@google.com> Closes Autofill UIs when back button is pressed.

Test: existing CtsAutoFillServiceTestCases pass
Test: LoginActivityTest#testSaveGoesAwayWhenTappingBackButton pass

Fixes: 62272098

Change-Id: Id34767ca32836f040e04790f0f2935ae49d88d71
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b4045d3791566a1965024591def87dff7d120295 17-Mar-2017 Andrew Zeng <zenga@google.com> Notify keyguard of when power button is pressed.

This is done on wear power button doesn't turn off the screen,
when the device wakes from keyguard UI isn't visible yet, so
it needs to react to power press in some way.

Bug: 35147955
Change-Id: I22619ea446770d09b53370e9244215646b60a9db
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
bfa81adfbe1819d55737dbbb2fb9157e50dbe022 25-May-2017 Wale Ogunwale <ogunwale@google.com> Fix unnecessary relaunches when unlocking with fingerprint sensor.

When the device is unlocked using the fingerprint sensor in an
orientation opposite to the lockscreen orientation, the app that
will be visible is first relaunched in the current lockscreen
orientation and then later relaunched in the correct orientation.
If the keygaurd is going away then:
- Don't let keyguard affect device orientation. We want to use the
orientation of the app that will be visible.
- Allow the rotation sensor to be enabled even though draw isn't
complete so window manager can get the updated or last rotation
reading.
- Don't clear the previous proposed sensor reading to allow
window manager to use the information to update the orientation as
needed vs. falling back to the previous orientation.

Change-Id: I8369723d6a77f2c602f1ef080371fa7cd9ee094e
Fixes: 38494778
Test: Launch an app that doesn't fix orientation like clock, hold
the device in landscape, press the power button, unlock the device
using the fingerprint sensor, and verify the the app isn't
relaunched.
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
017939e43ceb847333d1115258c3db1411dbc03a 24-May-2017 Erik Wolsheimer <ewol@google.com> Respect empty vibration effect configs in PhoneWindowManager and VibratorService

Bug: 38084098
Change-Id: I9d9d3772b624af4f0f527f00c418e6c93cfff88e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
23cc9aa50a1afb4ab4834b04c5c051b5b55747a0 23-May-2017 Jorim Jaggi <jjaggi@google.com> Fix window affecting SysUi visibility for once and all

This unforunately introduces another quasi-visibiltiy method but
I think this is the best solution, as the code is pretty clean.

Test: Navigate through, settings, make sure no flickering
Test: Launch music from notification
Test: Launch United app
Test: Go settings -> app -> settings repeadetly 100 times, make
sure light bar transition is always clean
Fixes: 38216281

Change-Id: I0b97334dea3bfef2966ad0c7dd8bbd9907f2574c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ff4cc4ebb516a39c6f3252a240a57646c3354484 19-May-2017 Keun-young Park <keunyoung@google.com> Merge "Wait for keyguard draw before stopping boot animation" into oc-dev
4136d2d54b986a09b237aee30974d3c00d308338 08-May-2017 Keun-young Park <keunyoung@google.com> Wait for keyguard draw before stopping boot animation

- Add check for keyguard drawn before stopping boot animation.
Otherwise blank screen can happen.
- Bind to keyguard service when sysui is launched to reduce waiting
time later.
- Increase keyguard timeout to 5 secs if it is not boot completed.
Otherwise (= normal screen on), keep the current 1 sec.
This timeout can still lead into blank screen so use bigger timeout
during boot-up to prevent such case.

bug: 37867510
Test: many reboots

Change-Id: Ibfdc42d295bb1d3f5b4ea316fe5aca9ab875e4be
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
51304d7380b6122ac55645fd9085ba071b04afa9 17-May-2017 Jorim Jaggi <jjaggi@google.com> Take snapshot when screen is turning off

Since we can't take a snapshot when screen is turned off, we need
to snapshot before we are turning the screen off. For this, we
- Add a callback from DisplayPowerController to give policy a
chance to do something before display will be turned off.
- Implement this callback by taking snapshots of all visible
tasks.

Test: Inspect logs/traces about screen off blocking to make sure
callback is working correctly.
Test: Insert artificial 500ms delay in onScreenTurningOff and make
sure we are unblocking screen off when turning on screen in the
meantime.
Test: Open Maps, go to recents, open maps again, scroll to another
location, toggle power button, make sure the old location isn't
shown during unlock.

Change-Id: I489f31358f838d418f894f996495946084f136a4
Fixes: 37107783
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c5b2bf18189dd42d738ad23034cf8e9b44e9f4c4 12-May-2017 Jorim Jaggi <jjaggi@google.com> Merge "Fix all issues with SystemUI visibility and transitions" into oc-dev
2df228c32c388a73ac4949c25755e03bd83fc5e0 12-May-2017 Jorim Jaggi <jjaggi@google.com> Fix all issues with SystemUI visibility and transitions

- Use win.isVisible again to determine top opaque full screen
window. !goneForLayout isn't really correct as windows that are
just about to draw can already influence SystemUI flags
- Don't coalesce messages in CommandQueue. This messes up ordering!
Bad!

Test: Unlock to Settings
Test: Navigate around in settings, make sure no flashes
Test: Cold launch United app
Test: Go to recents <-> settings 10 times

Change-Id: I15d37b35344d955c45591386182c5266bba74f01
Fixes: 37926053
Fixes: 37433095
Fixes: 37923474
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a9a52581c07ae7eac60b11f3d0451c7c77941379 11-May-2017 Eric Laurent <elaurent@google.com> PhoneWindowManager: allow volume keys in VoIP calls and screen off

Apply the same rule for volume keys during VoIP calls as during
PSTN calls allowing to change call volume when when the screen
is off.

Bug: 37571875
Test: Check volume keys work in Hangouts. Check regressions for music
and PSTN call volume

Change-Id: I2d5c654af47ade99ff4cb326e54e734087f5e8ae
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f93dc8b6504200d0b6d502d924a70a743f9b1411 08-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Exit transient mode as soon as status bar window is fullscreen" into oc-dev
2dc47c1dd55818a0bd68847215adccfe39d6dd88 05-May-2017 Jorim Jaggi <jjaggi@google.com> Exit transient mode as soon as status bar window is fullscreen

When bouncer was popping up this caused us to call
PWM.adjustSystemUiVisibility from SystemUI. Since the transient
flag got cleared in that case we also hided the status bar, as we
assumed we are still in transient mode.

Instead, we exit transient mode as soon as the window is
fullscreen, which is quite robust.

This is not a perfect fix but given that the transient bar logic
is so quirky that needs to be rewritten at some point this fix
is good enough for now.

Test: Open camera, swipe down to show transient bars, click on the
Lock icon in the camera activity.
Fixes: 36333950

Change-Id: I6939c26f283d7d791c22d5891b62a705f62c116f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a58589bdc168ad5a06dac3608712d3f9dfbc6d27 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Handle volume keys to apps in Vr mode" into oc-dev
4fca7821fbe8f20fa1f43733b974e7a758da4fb0 04-May-2017 Sujith Ramakrishnan <sujithrk@google.com> Merge "Accessibility shortcut on Android TV." into oc-dev
86ecf34ca4a07a876511be8f99abcb1d77ab73d5 29-Apr-2017 Karthik Ravi Shankar <karthikrs@google.com> Handle volume keys to apps in Vr mode

When a device is in Vr mode -
- Volume key event must be passed to the audio subsystem to reflect
changes when the configuration is enabled.
- When the configuration is disabled, neither the apps not the audio
subsystem should be able to receive the volume key events

Bug: 37625887
Bug: 36280728
Test:
- Verified that the app doesn't receive volume events
- Verified that the system volume bar is also not triggered

Change-Id: I245f7797873f764d0b017879723a6dbff1bb4d36
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e4e953ae4c42c10efe0c578a8dcfa5726bf8c6f7 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set sensor-supplied orientation always to portrait in VrMode." into oc-dev
c09d89c1ec4546cfbc5fe2a5091e8fe62be607cd 14-Apr-2017 Santos Cordon <santoscordon@google.com> Set sensor-supplied orientation always to portrait in VrMode.

For VrMode, we report the sensor as always being in
the device's default orientation so that:
1) The orientation doesn't change as the user moves their head.
2) 2D UI within VR shows in the device's default orientation.
This only overwrites the sensor-provided orientation and does not
affect any explicit orientation preferences specified by any activities.

Test: Start 2D UI within VR while device is oriented in landscape and
ensure that the item is displayed in portrait. Also start
2D UI with custom orientation and ensure it starts in its
preferred orientation.

Bug: 36516916
Change-Id: I56380b860eec73cf9485185ded811626e40c5c57
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6bed9bd765e2e82af0c957ff037518d3b362b632 26-Apr-2017 Sujith Ramakrishnan <sujithrk@google.com> Accessibility shortcut on Android TV.

- Added a Long Press (HOME + DPAD_CENTER) combination
as the Accessibility shortcut.

Note: Accessibility Shortcut in TV Settings still needs to be put in.

Test: Manual - Pressed the key combination and watched logs.
Test: Manual - watch -n 1 'adb shell dumpsys window policy | grep mAccess'
will show the keys pressed at any given time.

Bug: 36572948
Change-Id: I557aabad84b2c02ea195754fa2bd051934e324ee
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0db47f9364556af2a4e3f0e96670260d9c0a5a4a 27-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix volume key events are dispatched when screen is off" into oc-dev
6adb089cab726b706db8ab9b01bdd7d4de00e178 24-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Follow-up for I8cbf1bfbebc917b03f528f040bb019d193228bbb" into oc-dev
f52b6078ef56fcd9e88da02375dee9e1b9a47268 22-Apr-2017 David Lin <dtwlin@google.com> Fix volume key events are dispatched when screen is off

This fixes an error introduced by CL1736940 that the ringtone stream
volume is being adjusted when user presses the volume key during screen
off.

Bug: 36430174
Test: volume key up/down when screen is on and off
Change-Id: I78e957e2f87940a22a99b80f4ed65d986bc130c7
Signed-off-by: David Lin <dtwlin@google.com>
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
520dd4a8c230cb199be0369cd8c6a5ad6bcb377c 04-Apr-2017 Stephen Kiazyk <skiazyk@google.com> Remove swipe to exit persistent Vr mode behavior

This behavior is somewhat redundant now
* It is currently already possible to exit Vr mode in normal
circumstances by pressing the X in the top left of the screen.
* If a 'safety hatch' is needed, one can just press the power button,
which will require going through the Don flow again, which can then be
cancelled by pressing the X button.

As it is, the swipe behavior is likely just to cause confusion (and
currently, it puts the device in a bad state where the vr app is still
running, but the screen is blank except for the overlay). My proposition
is just to remove it and use the power button as the safe/guaranteed way
to exit vr mode.

Bug: 36965697
Test: Swiping no longer drops the screen to the overlay when in a
vrflinger application.

Change-Id: I461828f5dce67361a5f4d60c47ac7d6371a4efb3
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
abbe1ac0c56a4e923c5b29b8e099b9b17110c74b 18-Apr-2017 Yohei Yukawa <yukawa@google.com> Avoid acquiring a lock on the InputReader thread

This is a follow up CL to my previous CL [1], which might have
introduced a possible performance bottleneck because of holding a lock
on the InputReader thread.

With this CL addresses that concern by changing
PhoneWindowManager#mDismissImeOnBackKeyPressed to volatile that is long
used inside PhoneWindowManager.

[1]: I20721547c73360a70b5fc5cbe06824d577d1768a
d6475a682d9651a651f60856baef9b17b4633b13

Bug: 33824860
Test: Manually tested as follows
1. Open dialer and focus in to the text field to show an IME
2. Run 'adb shell dumpsys window policy' to make sure
mDismissImeOnBackKeyPressed=true
3. Tap the back button to dismiss the IME
4. Run 'adb shell dumpsys window policy' to make sure
mDismissImeOnBackKeyPressed=false
Change-Id: I0d0d06b0b848798c0f488b138812d932432b1d4d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d6475a682d9651a651f60856baef9b17b4633b13 17-Apr-2017 Yohei Yukawa <yukawa@google.com> A new power button mode to hide the IME when shown

As discussed in Bug 33038203 on certain platforms there is a demand
that the power button can change the behavior depending on whether an
IME window is shown on the screen or not. The behavior requested here
can be summarized into two parts:

* Hide the IME window if it is shown [1]
* Go to the home screen if no IME window is shown

This CL implements the above request by introducing a new config mode
for config_shortPressOnPowerBehavior. Note the definition of when an
IME is shown is often tricky than people would expect. The way this
CL is implemented is to propagate IME window state from
InputMethodManagerService (IMMS) to PhoneWindowManager via
WindowManagerService regarding when the back button on the NavBar for
phones/tablets should be shown as an IME dismiss key [2].

[1]: Even with this CL the IME still is allowed to ignore the request
to hide the software keyboard. Currently there is no official
protocol to forcefully hide the software keyboard. How to deal
with such a situation is a long standing TODO task.
[2]: Internally this is controlled by the following IMMS fields:
- InputMethodManagerService#mImeWindowVis
- InputMethodManagerService#mBackDisposition
Note that those fields rely on self-report from the IME. To be
precise, the base implementation of InputMethodService is
responsible for report back its internal state to IMMS when
necessary. The important point is that, although this could
allow a malicious IME to confuse the system UI to some extent,
supporting malicious IMEs is not clearly a goal of Android.
Anyway, the definition of when an IME is shown is a kind of
hot topic in several system services recently. Hopefully we
can come up with better definition and reliable mechanism in
a future release.

Fixes: 33824860
Test: Manually verified as follows
1. Change config_shortPressOnPowerBehavior to "5"
2. Rebuilt the OS image and flash it to the device
3. Make sure that the power button works like a home button
if software keyboard is not shown.
4. Open dialer and focus in to the text field shown on top
5. Make sure that the AOSP keyboard is shown.
6. Run 'adb shell dumpsys input_method' to observe the
following line:
mImeWindowVis=Active|Visible
7. Tap the power button to make sure that the AOSP keyboard
gets dismissed.
8. Tap the power button again to make sure that it works
as if a home button.
Test: Manually tested as follows
1. Open dialer and focus in to the text field to show an IME
2. Run 'adb shell dumpsys window policy' to make sure
mDismissImeOnBackKeyPressed=true
3. Tap the back button to dismiss the IME
4. Run 'adb shell dumpsys window policy' to make sure
mDismissImeOnBackKeyPressed=false
Change-Id: I20721547c73360a70b5fc5cbe06824d577d1768a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
46ae660bf2f2508db373a7adcf92aed9e3d52e93 14-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement new splash screen API" into oc-dev
7d0d10275213f23e2bd200d22822a3b700157688 23-Feb-2017 Jorim Jaggi <jjaggi@google.com> Implement new splash screen API

Test: mmm frameworks/base/tests/ActivityTests, launch
CustomSplashscreenActivity
Test: android.server.android.server.cts.SplashscreenTests

Bug: 37252694
Change-Id: Ie2aec4764d958086897296ed0fc3c39c55c4d8aa
Merged-In: I9a5bc19b8f63312e682e536500411e4ff4639f88
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2c4640b5ad08fa61aba69a0269ef0f9a00149496 12-Apr-2017 Jorim Jaggi <jjaggi@google.com> Don't consider app as top app if alpha = 0

Test: Open acetone launcher, make sure status bar changes color
Change-Id: I579034793deccabafce3399bd2c0bb7581ede016
Fixes: 37247006
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ec7708a4f63e917d19cb559d0361fb5df7bb882b 11-Apr-2017 Jorim Jaggi <jjaggi@google.com> Follow-up for I8cbf1bfbebc917b03f528f040bb019d193228bbb

Actually update when force is true.

Test: Check occluded Keyguard.
Bug: 36407040
Change-Id: I8efdbca0bececf5075da71b2efe246fda37ef610
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
30d64f3a93f5fc5aaf75eeb38d658ef04a884b41 07-Apr-2017 Jorim Jaggi <jjaggi@google.com> Revert "Revert "Handle case when snapshot dimensions don't match""

This reverts commit ba53d8ae410976709e1413b74173a791e8dead15.

Also fixes that we always had a size mismatch.

Test: TaskSnapshotSurfaceTest
Test: Open app in different orientation than snapshot, make sure
looks ok.

Bug: 36991071
Change-Id: If572b68fd72cec7679984fdff0be5905caba69f4
Fixes: 36703868
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e7ac324c71fb52d4104c8d92c9cea55d334bb4f1 06-Apr-2017 Jason Monk <jmonk@google.com> Merge "Revert "Handle case when snapshot dimensions don't match"" into oc-dev
ba53d8ae410976709e1413b74173a791e8dead15 06-Apr-2017 Jason Monk <jmonk@google.com> Revert "Handle case when snapshot dimensions don't match"

This reverts commit aea6b74e17a0f7b105999adad50dd20eac17df35.
Bug: 36991071
Bug: 36703868
Change-Id: Ie71992144e78a6580bfce17dfdf20396af80eacd
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9ba2e109a915928c73e646949629fc66876b0f54 04-Apr-2017 Jorim Jaggi <jjaggi@google.com> Fix NPE when status bar isn't available

Status bar isn't there in CryptKeeper.

Test: Boot non-direct-boot device
Change-Id: I8cbf1bfbebc917b03f528f040bb019d193228bbb
Fixes: 36407040
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
aea6b74e17a0f7b105999adad50dd20eac17df35 21-Mar-2017 Jorim Jaggi <jjaggi@google.com> Handle case when snapshot dimensions don't match

If the snapshot starting window has different dimensions than the
snapshots we have taken, we do the following:

- Create a child Surface that has exactly the dimensions of the
snapshot.
- We fill the parent surface with the app background color, as well
as all screen background decorations (status bar background,
navigation bar background).
- We also clip of the status bar/navigation bar background in some
cases, as it looks ugly if it's not behind the system bars.
- Furthermore, we inherit all layout flags on the window and all
layout relevant SystemUI flags on the window such that it's very
likely that the size will match, and the system bars are drawn
correctly.
- In order to make the transition from the snapshot to the real
window a bit more predictable/less messy, we enforce a minimum
duration the snapshot is visible, which is slightly more than our
app transitions.

Test: TaskSnapshotSurfaceTest
Test: Open app, go home, go landscape, open app again
Test: Go to multi-window, open app from recents with a snapshot
taken in fullscreen.

Fixes: 36703868
Change-Id: Ia2d4add6971a18ab7aa2942d2b644d6e87a402af
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ac52f2892d5c72c26387d510093ddfc741a8a632 30-Mar-2017 Winson Chung <winsonc@google.com> Ensure we show the PiP menu in response to KEYCODE_WINDOW.

Bug: 36687605
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testWindowButtonEntersPip
Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ce687c5e4a0ce27e9190fb5c823ec4649fbc3712 15-Mar-2017 Phil Weaver <pweaver@google.com> Restructure a11y shortcut settings

Separating the shortcut on/off from the shortcut service.
Enabling the shortcut to work from the lock screen if the
user wants it to.

Bug: 35872328
Bug: 35219988
Bug: 35443593
Test: Adjusted tests for shortcut controller, manually
activated shortcut in a variety of conditions.
Change-Id: Id39d33ec62eb5f11b76b2972089167dc7d4c625b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
07bf9630c886dc7b92df3ce27dc87c917c9db74b 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Should use getApplicationInfoAsUser instead"
327dfaa6592b156bd2a7ecbe311699c557a6b6b8 21-Mar-2017 Steven Thomas <steventhomas@google.com> Merge "Revert "Revert "Add remote callbacks for persistent vr mode"""
b70845c708a8c402219f05d26edaea38713e13c3 16-Mar-2017 Steven Thomas <steventhomas@google.com> Revert "Revert "Add remote callbacks for persistent vr mode""

This reverts commit 2abf1c60cc2fc6ec9bc590cb35e94581ecf93c2e.

We need the ability to register remote callbacks for persistent vr mode,
so vr flinger can register for persistent vr mode events.

Bug: 35885165

Test: Manually confirmed vr flinger can register and receive persistent
vr mode events.

Change-Id: I7713c4c8acae9a369fd0c06695ef712fddd12be8
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2bcca1d6242381725614a86cea3e2487347d3a2d 21-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs"
3b1ed1cb3d2939059bd4feec145d2ebb7aa959bd 21-Mar-2017 Jin Qian <jinqian@google.com> Merge "Revert "Add remote callbacks for persistent vr mode""
2abf1c60cc2fc6ec9bc590cb35e94581ecf93c2e 21-Mar-2017 Jin Qian <jinqian@google.com> Revert "Add remote callbacks for persistent vr mode"

This reverts commit 504c6d67d0c2e4cda5201372551914f94acce710.

Change-Id: Ia0f8d508272211736d421cf097abaa0bcbc3abab
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
de2ea835636e2c6d8c39fd5926dd44867ce43ad7 21-Mar-2017 Steven Thomas <steventhomas@google.com> Merge "Add remote callbacks for persistent vr mode"
22295fdcceb870d6c429512129b0ff94344c8f9f 20-Mar-2017 Tony Mak <tonymak@google.com> Should use getApplicationInfoAsUser instead

The second argument of getApplicationInfo is flags, not user id.
To specify user id, we should use getApplicationInfoAsUser.

Fix: 36349295
Test: Installed an app that called addWindow in work profile only.
And verify that it can be launched.
Change-Id: I9a36b8218082ffce9d903845357666c8366e6ed0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ff662fa937d5443d307f03692638314d84d8341b 16-Mar-2017 Sid Soundararajan <ssoundar@google.com> Add Long Press to Launch All Apps View

Test: On TV long-press HOME will bring a panel on the right
(left on RTL), showing a grid of apps.

BUG: 35806605
Change-Id: Ia2aec6b17e9522b9e6f1450f9d58f6a095d3ccf7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7121697a5e2d4458f6f63e9eb3b5deec62ee6202 31-Jan-2017 Michael Wright <michaelwr@google.com> BZZZZZZT! BZZZZZT! New Vibrator APIs

Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
runtest systemui-notification
Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
504c6d67d0c2e4cda5201372551914f94acce710 16-Mar-2017 Steven Thomas <steventhomas@google.com> Add remote callbacks for persistent vr mode

We need the ability to register remote callbacks for persistent vr mode,
so vr flinger can register for persistent vr mode events.

Bug: 35885165

Test: Manually confirmed vr flinger can register and receive persistent
vr mode events.

Change-Id: I28ee7f4e103fc53ae3e5d8e692cb2f6fa7bdbc82
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8ee7285128c3843401d4c4d0412cd66e86ba49e3 10-Mar-2017 Andrii Kulian <akulian@google.com> Move rotation tracking to DisplayContent

This CL moves rotation tracking from WindowManagerService to
DisplayContent. This way displays can be rotated independently and
rotation of the main display won't affect rotation of secondary
ones.

Bug: 34242678
Test: android.server.cts.ActivityManagerDisplayTests
Test: testRotationNotAffectingSecondaryScreen
Change-Id: Ic46aaa523482b31ff5ec77f0c2908ceda1156fc0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
82e6dfc54d58082427d4ce1cf359105f03225f89 25-Feb-2017 Dmitri Plotnikov <dplotnikov@google.com> Support for a remote key chord to trigger a bugreport on TV

Bug: 35635126
Test: verified that a bugreport is triggered by the gesture
Change-Id: I79d7392241c415ce895c2ea05009b162ca5b24d9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5aa8683bb78dc1c637a715efde7880d9010c6870 28-Feb-2017 Wale Ogunwale <ogunwale@google.com> Fixed some issues with alert window notifications

- Don't hold window manager lock while calling into notification
manager since it can end up calling into activity manager.
- Fixed issue with using checkCallingPermission() to check if the
system has the internal system window permission. This call fails
if it isn't a binder call. Change to use checkCallingorSelfPermission()
instead.
- Fixed class cast exception while getting app icon by using
IconUtilities class to the the drawable to bitmap convertion.

Change-Id: I4ef380618f558a8aac5b152d97536a614040397f
Fixes: 35780846
Fixes: 35846667
Fixes: 35854470
Bug: 35657567
Test: cts/hostsidetests/.../run-test CtsWindowManagerHostTestCases android.server.cts.AlertWindowsTests
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2ec8d8403ea13f77dd2a1fe9f11fff084ba85cea 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Exit persistent VR mode on edge swipe."
b047b8bd7e363081e91ba6cbc8d09cd355624584 09-Feb-2017 Andrii Kulian <akulian@google.com> Report move to display for activities that handle config changes

When activity that is moved between displays handles all configuration
changes, it won't be restarted. This CL adds a callback to the client
to notify it about display change. Usually it will be followed by
onConfigurationChanged, except when configuration didn't actually change.
When activity is recreated, it won't receive onMovedToDisplay.

Bug: 34862802
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I9a9501cab788623ada15a31efb53e4b2378639fe
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7eec37989f1d030d8f933712e6cb2bff8d9e4104 15-Feb-2017 Phil Weaver <pweaver@google.com> Suppress a11y shortcut on emergency dialer

Suppressing whenever the keyguard is locked, not just when
it's showing. This should reduce false triggering.

Bug: 34820720
Test: Verfied that shortcut no longer activates on emergency
dialer or lock screen.

Change-Id: Ic43c11798f04217c2871efe7d0fa21dbf61fd953
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
732aeb0e53d0c59c871f49cd7d88bb90ba017919 29-Jan-2017 Zak Cohen <zakcohen@google.com> Exit persistent VR mode on edge swipe.

Bug: 34736524
Test: Run device in persistent vr mode, swipe from edge and see it exit
Change-Id: I79c445afd4a08c2aa20504dc97a833c6b04198df
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
999b6890674eb5fdc215f4af225eea1d81212289 08-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Hide pointer icon while navbar is hidden"
19dab2df3a455fe4c87b4ad03fc0628932224909 07-Feb-2017 Vladislav Kaznacheev <kaznacheev@google.com> Hide pointer icon while navbar is hidden

When the navbar gets hidden as a result of
View.setSystemUIVisibility call, the most recent pointer gets
stuck because hover events stop being dispatched to the app.
Hide the pointer icon to avoid confusion.

Bug: 32248070
Test: ApiDemos > View > System UI Visibility > System UI Modes >
click on HIDE_NAV

Change-Id: Iae80bfa7ab5469946485a68e5308ea752a4645b0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
048c2bc19af4cfcb5e959f1bc07fbfa03a72e330 09-Dec-2016 Casey Burkhardt <caseyburkhardt@google.com> Initial implementation of Nav Bar Accessibility Button

This allows an AccessibilityService to set a flag in its
AccessibilityServiceInfo that triggers the navigation bar to show an
Accessibility Button and observe callbacks when the button is clicked
or there are changes in the visibility of the navigation bar.

Test: Manual (Created a sample AccessibilityService) + CTS
Bug:29231271
Change-Id: I03d653d85bc37df28ed71d8bba94b7c75fe56e43
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5cd907d3d6ceebf8731ef1f69347cce6f76109e9 26-Jan-2017 Wale Ogunwale <ogunwale@google.com> Alert Windows behavioral changes

- Introduced TYPE_APPLICATION_OVERLAY window type. Can be used by apps
to display windows on top of other app windows, but below critical
system windows.
- Deprecate alert window types TYPE_PHONE, TYPE_SYSTEM_ALERT,
TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE, and TYPE_SYSTEM_ERROR.
Apps should now use TYPE_APP_OVERLAY for this.
- Apps targetting O or greater are not allowed to add the old alert
window types.
Apps targetting less than O can still add the old types.
Apps with permission INTERNAL_SYSTEM_WINDOW (system signature apps) can
still add the old types.
- Z-order old alert windows types below TYPE_APPLICATION_OVERLAY if
they are added by an app without the INTERNAL_SYSTEM_WINDOW permission.

Test: android.server.cts.AlertWindowsTests
Bug: 33256752
Change-Id: I12170955a7a333151d3387c169b51c53c32164fc
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7da087d87d35c00f7864f4913ce55d61c356f7b7 01-Feb-2017 Phil Weaver <pweaver@google.com> Merge "Accessibility can capture fingerprint gestures"
27fcd9c97a2ceb50bab026237390207e5ee9e290 21-Jan-2017 Phil Weaver <pweaver@google.com> Accessibility can capture fingerprint gestures

Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
db6ca49dd000b7a23912391b38842762934fa3e2 26-Jan-2017 Zak Cohen <zakcohen@google.com> Add a home intent category for VR headset UI mode.

Bug: 30997244
Test: build only
Change-Id: Ibed6d24f5655ae7280c7de42cd5258b25d5af9d8
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
df7f28352029766755a4187786db12351ce843c6 25-Jan-2017 Evan Rosky <erosky@google.com> Merge "Changed cluster kb navigation shortcut to meta+[shift]+tab"
b7cab6a19096458a7fafa905eed52db83759b6c6 25-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'bisto-request'

* changes:
Allow privileged app to set media key event listener
Allow privileged app to set volume key long-press listener
516f9e68f37fee8d87d02445e43637ed9874de6c 24-Jan-2017 Evan Rosky <erosky@google.com> Changed cluster kb navigation shortcut to meta+[shift]+tab

Bug: 34509826
Test: Verified new shortcut worked in test app
Change-Id: I2e454a1291dbee9f6ca549d6ed2973248ff24d15
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5026936e49540449165fd5881231f8970a29ea91 23-Dec-2016 Jaewan Kim <jaewan@google.com> Allow privileged app to set volume key long-press listener

If the volume long-press listener is set, the listener will receive
the volume key long-presses instead of chaging the volume.

Privileged app needs permission
android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER to set the listener.

Bug: 30125811
Change-Id: I5e8fafbb950e5e11522da0f14004648d0877bf3e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fb1bf69d5d7fc8c45e3ddbb8916e21ae57432ff1 17-Jan-2017 Andrii Kulian <akulian@google.com> Set permissions for launching on private displays

- System UIDs must be allowed to launch anything and everywhere.
- Display owner must be allowed to launch activities on it.
- Apps that are already on target display must be allowed to launch
there.
- All other apps mustn't be allowed to launch on private displays.

Bug: 34230873
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testPermissionLaunchFromSystem
Test: #testPermissionLaunchFromAppOnSecondary
Test: #testPermissionLaunchFromOwner
Test: #testPermissionLaunchFromDifferentApp
Change-Id: Ic98005649a6368370c512e822cba4e9decc18ae9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
106fe732050f3d75a08c3bc48fdbcf84cac20b41 23-Nov-2016 Phil Weaver <pweaver@google.com> New accessibility shortcut.

Removing accessibility gesture from power dialog.

Adding new accessibility shortcut activated by holding both volume
buttons down. This shortcut is configurable by OEMs and users to
work with any installed accessibility service.

Bug: 30160335

Test: Added automated testing for the EnableAccessibilityController.
Manually toggled various services on and off.
Change-Id: I546bd29a2ab1ba64a0cbfd11e2004cdf85ee6cfd
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
02886a82d876aa5e31a92444fec70208599c509c 06-Dec-2016 Jorim Jaggi <jjaggi@google.com> Initial implementation of snapshots

All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ba41f4b9e3629c097cdd7b6538c5bcf4602728b8 15-Dec-2016 Jorim Jaggi <jjaggi@google.com> Clean up starting window to prepare for saved surfaces

- Move all starting window logic to AppWindowContainerController
- Use startingView to hold any kind of contents for startingWindow
- Remove some conflicting code which looks very old and doesn't
apply anymore.

Test: Make sure starting window still works.

Bug: 31339431
Change-Id: I018dd013ab7e64a44932b6d54ae9bb4a47f315d3
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
eb4a7943b19df05bb5bfb42cd26934ece45ef95c 21-Dec-2016 Andrii Kulian <akulian@google.com> Check if device supports HDMI before getting service

Hdmi control service is created only if device supports
HDMI CEC, so need to check for it before requesting.

Change-Id: I0e2d83514fd3b87e8db0a5e6784fc69377b890cf
Fixes: 33193534
Test: Manual - click home button, check logs for crashes.
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fecb615093e9781309efcc4d51ffb1808f26415d 29-Oct-2016 Ruben Brunk <rubenbrunk@google.com> Fix VR interaction with screen on/off/lockscreen.

- Add mechanism to prevent VR mode from being enabled.
- Disable VR mode while screen is off, or user is in lockscreen,
and re-enable when this is no longer the case.

Test: Fix merge from nyc-mr2-dev.

Bug: 31665197
Bug: 33655854
Change-Id: If777e0ef40b29bff42722f2aa10cff86a5831bc0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
854e46bd087dcac6c4b8adc2fec007e48784f79e 15-Dec-2016 Jorim Jaggi <jjaggi@google.com> Merge "Revert "Fix VR interaction with screen on/off/lockscreen.""
bbb5b6e8db346df613c15447c0697def8a76584d 15-Dec-2016 Jorim Jaggi <jjaggi@google.com> Revert "Fix VR interaction with screen on/off/lockscreen."

This reverts commit dfe0d7157da8e8a40ee86f0875531bfe2d657831.

Reason for revert: 33655854

Change-Id: Ie8573a394dee768859d64493dd8c17ee0c613287
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3eb310412633628f907bcbb24047457e8fec6fc0 15-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Get correct insets of the phone screen at boot"
ca4c1a34fd5d756b80ccac6a97efa37e68a6ace7 14-Dec-2016 Matthew Ng <ngmatthew@google.com> Get correct insets of the phone screen at boot

Before places such as
DockedStackDividerController.initSnapAlgorithmForRotations() tries to
run getStableInsetsLw() will get no insets on boot (via
onConfigurationChanged) because the navigationbar and statusbar have not
been added yet. This would leads to some miscalculations until
configuration changes such as rotating the screen.

Test: manual - logged the inset values on bootup with adb logcat
Change-Id: If07c8c007cb355dc418ff987fbb36ce104192379
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
dfe0d7157da8e8a40ee86f0875531bfe2d657831 29-Oct-2016 Ruben Brunk <rubenbrunk@google.com> Fix VR interaction with screen on/off/lockscreen.

- Add mechanism to prevent VR mode from being enabled.
- Disable VR mode while screen is off, or user is in lockscreen,
and re-enable when this is no longer the case.

Test: Fix merge from nyc-mr2-dev.

Bug: 31665197
Change-Id: Ia0a7fe8d443a24dce9395053cfe3d1c5847a88f2
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
40db029cfeb263b5b672ca687c347e58ed2ad2ae 28-Jun-2016 Jorim Jaggi <jjaggi@google.com> Light navigation bar support (1/2)

Test: Open an app that has this flag set.

Test: android.systemui.cts.LightBarTests

Bug: 29058491
Change-Id: Idaff65fdd5c59b68ae9920726c9ea50b53f96675
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cb566f368bc3b83640f3f75f64c1e29641e362df 07-Dec-2016 Mark Renouf <mrenouf@google.com> Revert "Allow power button to close an input method" am: 28f0e5bf48
am: fc526f6e84

Change-Id: Ifcf2f842c91677128e458dd7256013263543937f
28f0e5bf48e2d02e1f063670e435b1232f07ba03 02-Dec-2016 Mark Renouf <mrenouf@google.com> Revert "Allow power button to close an input method"

This reverts commit d28e907183fe48afc1ea0cb4f939b738cbcc2506.
Test: manually tested

BUG: 33038203
Change-Id: I7a4c6e95a69abb2e40df73509b6e67b93eacf6ff
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cf952e74b0079f3ff0b8cf5351bbf1bebfb06617 01-Dec-2016 Mark Renouf <mrenouf@google.com> Allow power button to close an input method am: d28e907183 am: 8da4ced46c
am: 9a21708ec6

Change-Id: I63d939d4dbd889cbd6f83ef101d817ccd561d707
d28e907183fe48afc1ea0cb4f939b738cbcc2506 29-Nov-2016 Mark Renouf <mrenouf@google.com> Allow power button to close an input method

BUG: 33038203
Change-Id: I5c44dc49db6b960b4e3e42545bfbbab62f357f08
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
241ae10b2189f449e57d8d660235ac56d8fb1b80 03-Nov-2016 Jorim Jaggi <jjaggi@google.com> Add explicit method to dismiss Keyguard

The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
db8e106fa35ca75f4a8bf9795edc7676fbf8e003 16-Nov-2016 Andrii Kulian <akulian@google.com> Don't include sysUI insets on secondary displays

Currently there is a single instance of WindowManagerPolicy
used in Window Manager and it is configured according to
primary display settings. Because of that it reports display
size with navigation bar insets even for secondary displays.

This CL adds displayId param, so it can adjust reported metrics
correctly when requested.

Bug: 32910901
Test: android.display.cts.DisplayTest
Change-Id: I14967fc13907c4fde17aed6a769d03cbde3ec1be
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
dc589ac82b5fe2063f4cfd94c8ae26d43d5420a0 11-Nov-2016 Sudheer Shanka <sudheersai@google.com> Update usage of ActivityManagerNative.

- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e69c93181f1f313dcedd07f677af1cea953fdf16 01-Nov-2016 Jorim Jaggi <jjaggi@google.com> The big Keyguard transition refactor (8/n)

Don't force mKeyguardGoingAway, as this never recovers. Make sure
to only show the dismissing Keyguard activtiy and recover the
state when trusted state changes.

Test: Make sure Keyguard is in a trusted state, start an activity
with FLAG_DISMISS_KEYGUARD from FLAG_SHOW_WHEN_LOCKED activity
and make sure there is no flicker.

Bug: 32057734
Change-Id: I5d212f6f9d5430250b22c8370f45dc95756432d2
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fc46e9b643881b7b2ab76854f3a0ac077e9def8d 22-Oct-2016 Sudheer Shanka <sudheersai@google.com> Move IActivityManager to aidl.

Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
10398dfb1dee7acfa4fc6a55042a59ee1692ce28 04-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Order non-app window containers."
3a9316945432d79eebd08b7122b2222a1983d8a9 03-Nov-2016 Wale Ogunwale <ogunwale@google.com> Order non-app window containers.

- Add non-app window tokens to the display child container based on
their base layer so the highest based layer is z-ordered on-top.
- Separated DisplayContent.mNonAppWindowContainers into
mAboveAppWindowContainer and mBelowAppWindowContainer where the former
contains non-app windows that should be z-ordered on-top of all app
windows and the later contains non-app windows that should be
z-ordered below app windows.
- Change wallpaper base layer to 1 so that it is always below all other
window types.
- Add Ime related windows/tokens to DisplayContent.mImeWindowContainers
so that we can track them together
- Use alternative binder token when adding window TYPE_INPUT_METHOD_DIALOG
so that it can properly be associated as an IME token in WM vs. with
system_server or sys-ui token.

Test: Existing tests pass.
Bug: 30060889
Change-Id: Ib53e09af12545868c3741d83aaccb7311c872b41
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b0d273427b3edf074a2c927b4f7e5d53fca2168a 02-Nov-2016 Jorim Jaggi <jjaggi@google.com> Get rid of Keyguard visibility modifiers on WindowState

Not needed anymore \o/. Also fixes a flicker when transitioning
between two activities that both set FLAG_LIGHT_STATUS that was
somehow introduced recently.

Test:
- Start an light status bar activity from another activity that
already has light status bar, ensure there is no flicker.
- Open IME and make sure the content gets resized like before.

Change-Id: Ie9c9e1cd40f909c449d36ae436250063af20539e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5b6714c2fa3cdd87642766e3fb0a1478d2422ec2 02-Nov-2016 Wale Ogunwale <ogunwale@google.com> Added support for window TYPE_PRESENTATION

Switched presentation feature to use new window TYPE_PRESENTATION
and also add its own window token to the display the presentation
is running on. This is needed as window manager no longer allows
tokens to have windows on multiple displays.

Bug: 32566372
Test: Presentation mode works.
Change-Id: I9c2998311b65640743b8e23ec4f10bf1ffbfd785
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b9389a7e66481476ca8a9238e8fe047bf67f1148 02-Nov-2016 Nimrod Gileadi <nimrod@google.com> Increment a MetricsLogger counter on back press. am: 580135c1b8 am: 51ac3a911c
am: a774e10aec

Change-Id: Ia3f485d5eb05c9700d8ae612dea069b97de7bf11
8d78693157cb3fa7ab1c9072ef913af4d67c6314 27-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (6/n)

Cleanup:
- Make sure all the state is nicely dumped.
- Remove some unused stuff.
- Fix a flicker when occluded -> unlocked

Bug: 32057734
Change-Id: Id87e26adccef740d608b325c2dc1f6db14dd4ec3
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
73294b6cf79910dc688e5b62d673082a3dec773b 27-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (4/n)

Nuke KeyguardScrim

Test: Kill SystemUI while lockscreen is showing, make sure nothing
is visible when being killed.

Bug: 32057734
Change-Id: I9f8d1e5a0e0f968460d8170627a849623c6a7245
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
77e104322920cb93c0ac3d5f101115826728d3d1 27-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (3/n)

Notify activity manager when dreaming showing state changed so
KeyguardController can update the occluded state when the device
is dreaming.

Test: Set dreaming while charging, wait until screen times out,
make sure that dream is occluding Keyguard.
Bug: 32057734
Change-Id: Ied6f485d9b4a1526cb4cd5f0701f86b1ea05830a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fe762344f4475a3a336bb46aef2d59c1fabf32ab 13-Oct-2016 Jorim Jaggi <jjaggi@google.com> The big keyguard transition refactor (1/n)

The heart of this change are two things:
1) Instead of using the force hide mechanism to hide windows behind
Keyguard, we actually make the activities invisible in activity manager.
2) When Keyguard is going away, we change the visibilities in activity
manager and run an app transition.

At the very core we move the responsibility of hiding activities to
ActivityStack, which checks whether Keyguard is showing, and then
hides all non-show-when-locked activities. For that, we need to check
whether any window of an activity has SHOW_WHEN_LOCKED set. We
introduce a callback from WM -> AM in case these Keyguard flags have
changed.

Furthermore, we decide whether to occlude Keyguard in KeyguardController,
which just checks whether the top activity has SHOW_WHEN_LOCKED set. When
this state changes, we prepare an occlude/unocclude app transition, and
in PWM we just inform the Keyguard about the animation so SysUI can play
along this animations in a mostly synchronized manner.

Since we now use an app transition when unlocking the phone, we get
lockscreen launch animations for free - window manager automatically
waits until the activity is drawn, or directly executes the transition
if there is nothing to animate. Thus, we can remove all the infrastructure
around "waitingForActivityDrawn".

The logic to show/hide non-app windows is moved to policy, and we add the
ability to run animations on non-app windows when executing an app
transition.

Test:
1) runtest frameworks-services -c com.android.server.wm.AppTransitionTests
2) Manually test unlocking Keyguard:
2a) Without security
2b) With security
2c) With security but trusted
2d) Portrait while activity behind is in landscape
3) Test launching things from Keyguard
3a) Without security
3b) With security
3c) Launch camera without security
3d) Launch camera with security
3e) Launch camera with securtiy and trusted
3f) Launch voice affordance
4) Set no notifications on lockscreen, drag down, make sure you get
the correct animation
5) Test clicking "emergency" on bouncer
5b) Test "Emergency info" on emergency dialer
5c) Test clicking edit button on emergency info, should show pattern on
Keyguard

Bug: 32057734
Change-Id: Icada03cca74d6a612c1f988845f4d4f601087558
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
580135c1b8c58a3d8834531a1df1029a18f343a4 31-Oct-2016 Nimrod Gileadi <nimrod@google.com> Increment a MetricsLogger counter on back press.

For Wear, we want to know how often users press the side button, which
is mapped to a back key press. The number of times the back button is
pressed is probably a useful metric for the rest of Android.

The counter string, "key_back_down" is not yet declared in
go/tron-counters, but we should get the framework change in ASAP.

Bug: 32396371
Change-Id: Ia102318cd5ca4d077ce404944084806198c334f7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
bda8650ecbe41b8602c0b39bab0a7607a75a22da 27-Oct-2016 Rob Carr <racarr@google.com> Merge "Disable seamless rotation when nav bar jumps."
0b9ac5a20fea57fe438b29265b12ce270a69df49 26-Oct-2016 Robert Carr <racarr@google.com> Disable seamless rotation when nav bar jumps.

When the nav bar visually moves on rotation, we want
to disable seamless rotation. We could investigate later
if it could be made to work.

Test: Try rotating camera video view on tablet.
Bug: 31817280
Change-Id: Ie13d7eaafd8bb66c8db574cd81d76fa9ca860e51
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8a2725f8da6a138bbaf5a85d27873dadc6dfed41 26-Oct-2016 Jorim Jaggi <jjaggi@google.com> Make sure to call dismissKeyguard after setOccluded am: ec50931d88 am: 1d4f2b9914 am: ae7f618f38
am: 4bcd7ec40b

Change-Id: Idd47ad1862c093e894d14e1eabb6f05f9733b083
1d4f2b9914feee3e47e53b2b2b256e85cbb0d992 26-Oct-2016 Jorim Jaggi <jjaggi@google.com> Make sure to call dismissKeyguard after setOccluded
am: ec50931d88

Change-Id: Ib25480fa4efe63940fed144f4e28dee185244fad
ec50931d884e0b8f13a5f3050d786275817a2d92 25-Oct-2016 Jorim Jaggi <jjaggi@google.com> Make sure to call dismissKeyguard after setOccluded

If we call it before, SystemUI will not dismiss the Keyguard as
it is still occluded in that state.

Change-Id: I15cf9cc43b9a2b747bfd224a6dfbd769eee19d69
Fixes: 32202560
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b97963475ad72f2fd4ec49857ff52c3375db5efe 15-Oct-2016 Andrii Kulian <akulian@google.com> Merge "Make usage of Configuration.EMPTY safe"
011c85729ae5799b85c694b831ad6a8e632878cd 15-Oct-2016 Winson Chung <winsonc@google.com> Merge "Adding PIP input consumer."
412754816d2b8e83f0f5f860b13f09f53d2da05f 11-Oct-2016 Winson <winsonc@google.com> Adding PIP input consumer.

- This CL provides the framework for manipulating the pinned stack using
an input policy (to be determined later) provided by the SystemUI.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNonTappablePipActivity

Change-Id: I025c41fff26ed05a35d68e59f10330680ed11ea8
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a8a9bc5860c5d6139366f01b2f66e3f592da92e1 14-Oct-2016 Andrii Kulian <akulian@google.com> Make usage of Configuration.EMPTY safe

With current approach there is a high chance of making a programming
error and altering the state of singleton Configuration.EMPTY object,
because previously configuration was usually set by link to it.

This CL changes the behavior to create Configuration member objects
only once and alter their state afterwards.

Test: Manual and existing tests still pass.
Change-Id: Ie267c2fbf555f137670b7bd2cd251b817c69bc8e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
164675414fa6e69efce447912930ce62ae2f08ef 13-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dreams: Fix lockscreen flicker"
909fe2d4f5f9a00faa25500c012cfe475c136def 12-Oct-2016 Adrian Roos <roosa@google.com> Dreams: Fix lockscreen flicker

Fixes a bug where dreams (and other SHOW_WHEN_LOCKED activites) would
show a flicker of the lockscreen when the device locked while they are
showing.

This was caused because the lockscreen drives locking the device by
making itself expand, but does not immediately know that it should hide
itself because the occluded state is only pushed when the lockscreen is
showing.

To fix this, we simply push the occluded state also when the device
isn't locked - that way, the status bar can go into the appropriate
state immediately upon locking.

Change-Id: Ie03bfcfe902fc562d76a773d3fc3371359f63563
Fixes: 29555358
Test: adb shell am start -n com.android.systemui/.Somnambulator
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e92c3f639893acbd9994ed50e592bc3109301099 12-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "power: PowerHAL support for HIDL interfaces."
44761c81eb16ec6b8ecdd8b047e67d92e837c1a1 11-Oct-2016 Nick Kralevich <nnk@google.com> Delete "Show CPU usage" am: fc4a5c2d85 am: f0c0188a8a
am: 34547a8dc2

Change-Id: I410846d3ff6856e5f9dee2efd551af8b9d1d94dc
f0c0188a8a7732a0acc3822ddde0a2c19b25639b 11-Oct-2016 Nick Kralevich <nnk@google.com> Delete "Show CPU usage"
am: fc4a5c2d85

Change-Id: I4da784d136601fb3458b8697a0a27a232cd89111
fc4a5c2d85eea5650cc722c1f3e7ab026accd624 11-Oct-2016 Nick Kralevich <nnk@google.com> Delete "Show CPU usage"

This functionality hasn't worked since Lollipop.

Bug: 21388590
Change-Id: Ie4388d88f6e06f3e2d2e84e9c4515b3ebc6a0ea5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0d43404a07c1372fef71181ab9daa8fa960fdd4c 03-Oct-2016 Ruchi Kandoi <kandoiruchi@google.com> power: PowerHAL support for HIDL interfaces.

Bug: 31177288
Change-Id: I3ce5a71958f47d26855513cf7523922e80dd25d2
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
94bad8bb68f0b91feff4eab5632fa9e43478258e 10-Oct-2016 Jorim Jaggi <jjaggi@google.com> Fix dismissing window showing am: f20b1428f8 am: 84e863e02f
am: cc742ac150

Change-Id: Ic75c15688d07795fc860fa8ce9c672e668fe1ac7
84e863e02f07415b3437295a3752a0052556836c 10-Oct-2016 Jorim Jaggi <jjaggi@google.com> Fix dismissing window showing
am: f20b1428f8

Change-Id: I58829c0bc567fc3c48e03276075d9256649d84e3
f20b1428f88fa81dbde0b96236c6f893f838d40d 03-Oct-2016 Jorim Jaggi <jjaggi@google.com> Fix dismissing window showing

Only show dismissing window if we are about to unlock, and not just
in all cases. For that, set a flag to true during the process, and
reset the flag after the Keyguard has unlocked.

Test: Have a FLAG_SHOW_WHEN_LOCKED activity that starts a
FLAG_DISMISS_KEYGUARD_ACTIVITY. Check whether window is hidden
when toggling the power button. Make sure that the device is
in a trusted state during the whole test.

Change-Id: I9346dd869d1cf50a42c64a5f7c69f8e24f1e1f9b
Fixes: 31810884
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4a0b84b4b4b27c6ee4730b8282901bb4a651d876 01-Oct-2016 Justin Paupore <jpaupore@google.com> SystemUI: Disable alternate nav bar in car mode am: 01915a1a2b am: b1e5d7c467
am: 2cd5a6962c

Change-Id: I16c2e80d9b51c06a034a8452d8d37ac7042c3631
b1e5d7c4675c57aa0fae13412ba249f70c7d7d56 30-Sep-2016 Justin Paupore <jpaupore@google.com> SystemUI: Disable alternate nav bar in car mode
am: 01915a1a2b

Change-Id: I8a6582f8cebf2c7dcde20658de595b1bf0df2814
01915a1a2b5b4584ece9bfd2e2c3c05d3b8c1088 29-Sep-2016 Justin Paupore <jpaupore@google.com> SystemUI: Disable alternate nav bar in car mode

Change ag/813926 introduced larger navigation buttons when in car
mode, and ag/891860 hid the recents button while car mode is active.
This change deprecates these behaviors, and puts them behind a flag.
A future change will remove this behavior entirely.

Bug: 31754884
Bug: 31754537
Change-Id: Iab7ec657105c08d8c45f76646ce0edbf3a5aa017
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3e907fd67c68f3e4844c8d5086f393d1eec0991d 29-Sep-2016 Nancy Zheng <nzheng@google.com> Do not launch assistant via long press when device is locked. am: 0d85ee2e78
am: fc824eb16d

Change-Id: I709b94235eccdb7949a3a24df9f50ba6c09cef1b
0d85ee2e7851ca9ba4afc465844e43910e4c0ce7 29-Sep-2016 Nancy Zheng <nzheng@google.com> Do not launch assistant via long press when device is locked.

Bug: 30194057
Change-Id: I6cd8046fd34308abbbbd1e3f3219d70af40b55c5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
329011cf402666678c47cd238a5170208a5bbc27 21-Sep-2016 Winson <winsonc@google.com> Removing private system ui flags from status bar flags logic. am: ab216609f1 am: b7a673ed95
am: dccfd4394e

Change-Id: Ie8bbbfb5c24957f64036e8de23d6a29e6669ea18
467557ab507521491ceb4aa7bfb7b457ed4bb6f2 21-Sep-2016 Adrian Roos <roosa@google.com> Allow dismissing ImmersiveModeCling without touch am: dab1516994 am: 74fde83ae7
am: 3572fec146

Change-Id: I6e1e9bf3374df2cc1a48a49afd67010e374ccb60
b7a673ed950d639eec29c7fcef6d5b6cb14f4c5b 21-Sep-2016 Winson <winsonc@google.com> Removing private system ui flags from status bar flags logic.
am: ab216609f1

Change-Id: Id7e0d308361acb7793c7b03e2ebe0114a956b380
07d798b9028b62895fd628188dd1802e750fa7a2 21-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removing private system ui flags from status bar flags logic." into nyc-mr1-dev
3a507b5da984efc6fa895e30b770a44f65a07d34 20-Sep-2016 Andrii Kulian <akulian@google.com> Extract global configuration update

- Separated config update in AM into several methods.
- Updated global config update in WM to reconfigure and
notify all displays.
- Removed redundant list of displays that are waiting for
configuration update.

Test: Manual testing and existing tests still pass.
Change-Id: I60d3013301267bd668348565dcd0a68e09023a0e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
74fde83ae744b14eaaea68b7b7c99e267f1bbe2e 20-Sep-2016 Adrian Roos <roosa@google.com> Allow dismissing ImmersiveModeCling without touch
am: dab1516994

Change-Id: Ie563bac05bd2f3f6dacfc6083ba5c3cde176c973
ab216609f1608e61827d955fcc9fd0560bc52e4d 09-Aug-2016 Winson <winsonc@google.com> Removing private system ui flags from status bar flags logic.

- Prevent third party apps from inadvertently changing internal SystemUI
flags through a call to setSystemUiVisibility(). These flags are only
set in the individual SystemUI components and can be updated in WMS
directly.

Bug: 29875297
Change-Id: I5ea238c8fb16a0eccd6e993d95a912acb359cee6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0b85c6ee78d868209143d9894570d7f5a9af50cd 20-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow dismissing ImmersiveModeCling without touch" into nyc-mr1-dev
8e87707a5285a94178145f51b6873c6ea69bfd8c 14-Sep-2016 Geoffrey Pitsch <gpitsch@google.com> Prevent notifyScreenshotError() from calling twice am: b2d6ed3cd1 am: d13870b1f1
am: 0e1400b9f0

Change-Id: I12029e9dc83a2096eb354776bb75216198ff3594
6d5ad4c0ebe070308de4e94710acb97684c28263 14-Sep-2016 Bryce Lee <brycelee@google.com> Support telecom related operations for watch back button usage. am: db776ce7f9
am: 9b2027a71c

Change-Id: I62a31f771ea390c59a4fafc4763a9ca3ec7c3228
dab15169943c55277448ea5f3221e2b5030cfbde 13-Sep-2016 Adrian Roos <roosa@google.com> Allow dismissing ImmersiveModeCling without touch

The immersive mode confirmation was not dismissable
without touching it because it wasn't focusable.

Change-Id: I89cdb7d4bd44e302859e731034c4395529f5e5fc
Fixes: 30469869
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d13870b1f14e3fc8b818a1a605f6ba8c91f78ebb 13-Sep-2016 Geoffrey Pitsch <gpitsch@google.com> Prevent notifyScreenshotError() from calling twice
am: b2d6ed3cd1

Change-Id: I754d4fbdcce050a0944894685167c973aef7ec53
221330f9f932a602b4a35e4e0931dac369eb0f5a 13-Sep-2016 Geoffrey Pitsch <gpitsch@google.com> Merge "Prevent notifyScreenshotError() from calling twice" into nyc-mr1-dev
db776ce7f9f19341f31c6623fdd24fbae28f3091 04-Sep-2016 Bryce Lee <brycelee@google.com> Support telecom related operations for watch back button usage.

This change allows for the back button to hang up or silence calls when
set through accessibility.

Bug: 30039247
Change-Id: Iff0e67180e1180c9bb8b27df023d7a7a64783543
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
dde3e898cc5c81393aae8bc1354699b0fe8a5147 07-Sep-2016 Jorim Jaggi <jjaggi@google.com> Quicker exit animation for bottom dock on Keyguard am: 48832811b0 am: 6e690e32a0
am: 292a746358

Change-Id: Ib3d3f73668ca7d81e91252111acfa8842659d2d1
6e690e32a0d8519f33e5566f3d2129fb56ade7e9 07-Sep-2016 Jorim Jaggi <jjaggi@google.com> Quicker exit animation for bottom dock on Keyguard
am: 48832811b0

Change-Id: Ifd3603c9c41fb475730521452a0326b453e2ce8d
1191fee63466117a886ce3d7b03b0562086c2984 06-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Quicker exit animation for bottom dock on Keyguard" into nyc-mr1-dev
48832811b0c216541c2a1fcedffb518fb38c723e 06-Sep-2016 Jorim Jaggi <jjaggi@google.com> Quicker exit animation for bottom dock on Keyguard

Change-Id: I9d07dc6ce7e2aec36bf797bd4041701315e71e0e
Fixes: 31274209
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
71c510236c92c14efae6ff00e68cf9ad38f51c32 03-Sep-2016 Svetoslav Ganov <svetoslavganov@google.com> resolve merge conflicts of bde1d34 to master

Change-Id: Id3cef32bb97cfe8483001e71207b65bc0bc6e304
dea62c6f58a2f444a63d01e201ba84a7d9575aa7 03-Sep-2016 Svetoslav Ganov <svetoslavganov@google.com> Prevent apps to overlay other apps via toast windows
am: aa07653d2e

Change-Id: I309615a989eade43401b086da42ff6522d000b68
aa07653d2eea38a7a5bda5944c8a353586916ae9 02-Aug-2016 Svetoslav Ganov <svetoslavganov@google.com> Prevent apps to overlay other apps via toast windows

It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout.

Now for apps targeting SDK greater than N MR1 to add a
toast window one needs to have a special token. The token
is added by the notificatoion manager service only for
the lifetime of the shown toast and is then removed
including all windows associated with this token. This
prevents apps to add arbitrary toast windows.

Since legacy apps may rely on the ability to directly
add toasts we mitigate by allowing these apps to still
add such windows for unlimited duration if this app is
the currently focused one, i.e. the user interacts with
it then it can overlay itself, otherwise we make sure
these toast windows are removed after a timeout like
a toast would be.

We don't allow more that one toast window per UID being
added at a time which prevents 1) legacy apps to put the
same toast after a timeout to go around our new policy
of hiding toasts after a while; 2) modern apps to reuse
the passed token to add more than one window; Note that
the notification manager shows toasts one at a time.

bug:30150688

Change-Id: Ia1dae626bd9e22541be46edb072aa288eb1ae414
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
833999e0c8107bbb74882b7eecbe9579818cb555 01-Sep-2016 Jorim Jaggi <jjaggi@google.com> Revert "Fix flicker while booting" am: ba5339d5d6 am: 6a032cca07
am: 2cfc4f61f9

Change-Id: I2e948345e57725dab6d64d6dabf3f5c08056207d
32cbdcc8c098b4a42212b3da345b929abad8ad6e 31-Aug-2016 Jorim Jaggi <jjaggi@google.com> resolve merge conflicts of c5bafe2 to master

Change-Id: I19dd5c88c664313c2f8b47d8f8fd556f630c8bf1
d7e12a92c704a9e2452c7600238b4a458e904155 31-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix flicker while booting am: 77cbe79b74 am: 49e5c88eda
am: 46a8341458

Change-Id: Ia20d301b9f7e4fe921b8c467002fd2759983e581
6a032cca07ca327de5e13750a44603ef4013dd15 31-Aug-2016 Jorim Jaggi <jjaggi@google.com> Revert "Fix flicker while booting"
am: ba5339d5d6

Change-Id: I1c3dfbe95e35db94d36d98507474690b0e70d4b2
ba5339d5d6012d91738be65cd6c87cb3cc918286 30-Aug-2016 Jorim Jaggi <jjaggi@google.com> Revert "Fix flicker while booting"

This reverts commit 77cbe79b74a65d34c1a0b85f9d46c690b9441b88.

KeyguardScrim is not hiding for some reason. Need more time to investigate.

Change-Id: I7624138dded386a7310386bc78b3b496af55b2b9
Fixes: 31174702
Bug: 29643498
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
314c05db45280dfdb9bdd516c7fcf9fad0136268 30-Aug-2016 Jorim Jaggi <jjaggi@google.com> Add animation when unoccluding windows (1/2)
am: 6626f54e65

Change-Id: I09be1e1b7d830067c354c6cdfd940deafa027a22
6626f54e658e3da44fab8a5cd6d9d3d4852e2cd1 22-Aug-2016 Jorim Jaggi <jjaggi@google.com> Add animation when unoccluding windows (1/2)

Before there was a jump-cut when a window that was occluding Keyguard
was going away, leading to an ugly flicker. To fix this, we do the
following.

- Always show windows with FLAG_SHOW_WHEN_LOCKED above lockscreen, even
if they don't "match" the currently occluding app (which is null in the
animation case)
- Move wallpaper behind last window that is not hidden by policy, so the
window doesn't get occluded by the wallpaper.
- Add a flag in the setOccluded call whether to animate or not. SystemUI
then plays a nice animation when it's set.
- Override the animation to always be the animation that happens when we
exit a window which is revealing the wallpaper behind, to make it
consistent with the home screen case.

Fixes: 30829255
Change-Id: Ib3fe20fc9003a0f9f291c974740f044ed8707e75
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
49e5c88edab1d1140baf7cd58600e8c1ead96a0a 29-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix flicker while booting
am: 77cbe79b74

Change-Id: Ib867c34cddaaa2f7877e93d31f8e959ab701859d
77cbe79b74a65d34c1a0b85f9d46c690b9441b88 27-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix flicker while booting

There was a short period of time where KeyguardScrim already went
away but status bar wasn't drawn yet, so we didn't consider it as
a wallpaper target so the wallpaper was invisible for a couple of
frames. Now only remove the scrim after the status bar has fully
drawn.

Change-Id: Ibf23b9e1277b6ce06e4ce70c9b7a5db9cbefce00
Fixes: 29643498
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b2d6ed3cd125d616ab44b89e36af34a52756c47c 24-Aug-2016 Geoffrey Pitsch <gpitsch@google.com> Prevent notifyScreenshotError() from calling twice

Found this while investigating the attached bug.
Fixes potential race condition between onServiceDisconnected and
mScreenshotTimeout both calling notifyScreenshotError.

If onServiceDisconnected is going to show an error to the user, I think
it should also unbind, as we would expect the user to re-take the shot
at that point. Ideally, this would replace the timeout handler entirely.

Not exactly sure how to test this - I tried crashing the
TakeScreenshotService locally, but onServiceDisconnected didn't trigger.

Bug: 28982719
Change-Id: I5093c61735b0661f9874c686e197cd894c3ef7ae
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
de304870faeae1aedd30c1d28be1c2a1a2c0efd7 23-Aug-2016 Robert Carr <racarr@google.com> Only allow focused window to select seamless rotation. am: 828ec3dc51 am: d2bacdaf6d
am: 90b211609d

Change-Id: Ia98b8e29873cf3a92e09a5206867dd0acef7264a
d2bacdaf6d40289330e6df40a3e59cb1f8ca3f9e 23-Aug-2016 Robert Carr <racarr@google.com> Only allow focused window to select seamless rotation.
am: 828ec3dc51

Change-Id: I617dbf02a81a004a38ec3b1da1381ae0497f64ba
828ec3dc518bfeff9cb9205e40652419e9c59443 22-Aug-2016 Robert Carr <racarr@google.com> Only allow focused window to select seamless rotation.

We require apps to opt in to seamless rotation. If a dialog or some such
has popped up above them, the dialog may not be prepared to rotate
seamlessly and we should just fall back to the old behavior for now.

Bug: 30968345
Change-Id: Ib9a7352ed84d41076bdd162bf38d151b053a307e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6fb0e52b85ebd5b31626703e3e0aea212ead70ac 18-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix a flicker when returning to the lockscreen am: d11d1a9486 am: afaf4ac7a9
am: 9322632f6a

Change-Id: I9cd7ead4caa2843e3063d55ea357e9e989c72f0e
afaf4ac7a9913ac587e6dbd7e6a24f8c0ddd90bf 17-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix a flicker when returning to the lockscreen
am: d11d1a9486

Change-Id: Ia0b617be2bb00db24115f04f362cd072d59ebe71
edddb17a67a78b20002e8dde24513bacfcc708d2 17-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix a flicker when returning to the lockscreen" into nyc-mr1-dev
d11d1a9486d44b98e28b70c25711ebfc283b746e 17-Aug-2016 Jorim Jaggi <jjaggi@google.com> Fix a flicker when returning to the lockscreen

If we return to the lockscreen from a FLAG_SHOW_WHEN_LOCKED activity,
there was an additional black flicker as the wallpaper wasn't shown
for a couple of frames. The issue is that we didn't set the wallpaper
flag again, to fix another flicker with lockscreen wallpapers. Now,
we pass the state whether we currently have a lockscreen wallpaper
and if we don't have one, we immediately set the wallpaper flag
again.

Bug: 30829255
Bug: 30883413
Change-Id: I9faeaa77b98eb02058171ce19cf90b43826ebe9e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7c54349d4b7157c5ca669d308044f379ee60eaf2 16-Aug-2016 Robert Carr <racarr@google.com> Allow seamless rotation before mTopIsFullscreen is set. am: 1ccd42510f am: 2dcc35ab94
am: 58f58f3b38

Change-Id: Id3a206921901b7ed24e43753342bcbf29d43f862
9d9ee4e5a366fdd2457ed756234a57cff843d884 16-Aug-2016 Robert Carr <racarr@google.com> Introduce new constant for double tap gesture rotation hint. am: 57d9fbd17f am: 5f684d92b6
am: bdbc23bebe

Change-Id: I6a9b2a55148a1c2428e871337bb300a84887adc7
2dcc35ab94b2e6a5ff344221b512a76368a96c76 16-Aug-2016 Robert Carr <racarr@google.com> Allow seamless rotation before mTopIsFullscreen is set.
am: 1ccd42510f

Change-Id: I52b5d288993a4fbf5b265f32e238b40a4b68f8d6
5f684d92b6777eba951b40ff27d328aa16f8be9c 16-Aug-2016 Robert Carr <racarr@google.com> Introduce new constant for double tap gesture rotation hint.
am: 57d9fbd17f

Change-Id: I994c15c692ec52160deb3d29b46396802562588a
1ccd42510fe40f5ece98c54cc6fcd2b2724440ac 15-Aug-2016 Robert Carr <racarr@google.com> Allow seamless rotation before mTopIsFullscreen is set.

The difference between mTopFullscreenOpaqueWindowState != null
and mTopIsFullscreen relates to whether the status bar is animating.
However the flag won't be cleared until the next layout pass following
the animation. As long as the window isn't animating we are fine to
rotate seamlessly. This check was copied from selectRotationAnimationLw.
A little code archaeology implies it was perhaps historical and
introduced before the flag had this meaning.

Bug: 30171992
Change-Id: I326bf7766f8ebe307b833d1ca0c0cdfe80b1eb6c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
57d9fbd17f32b19a7c5c1ccedcb9cd1428db5986 15-Aug-2016 Robert Carr <racarr@google.com> Introduce new constant for double tap gesture rotation hint.

As discussed in ag/1192965/ we have a special case for rotation
animation selection in launch from double tap. This was set to
ROTATION_ANIMATION_CROSSFADE as the goal was just to avoid
ROTATION_ANIMATION_ROTATE on the viewfinder surface and
seamless rotation in launch scenarios was initially descoped. Now we
are aiming at fixing this though, and ROTATION_ANIMATION_CROSSFADE
does not quality for seamless rotation. ROTATION_ANIMATION_JUMPCUT
also would not be a good choice because in the situation that the
rotation occurs before the app starting window appears, then we would
jump cut from unrotated wallpaper to rotated app, I think we want
a crossfade in this scenario. To this end introduce and use a new @hide constant
ROTATION_ANIMATION_SEAMLESS which qualifies for seamless but falls back
to CROSSFADE if seamless can't occur.

Bug: 30171992
Change-Id: If1945b17b5159be4cd5ba0b139d6bea9f7fcca33
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8a82e0ae0dc5a1bab5333b967ce955bc4dcd339b 10-Aug-2016 Doris Ling <dling@google.com> Fix fingerprint swipe gesture settings for secondary users. am: 34331b7ca9 am: 5cc8680521
am: 08e4b433f5

Change-Id: I0b18c8ec1e63dc2e39046dbac517de25c6e34752
5cc86805210818975d11d7f1f31b144e0a354c34 10-Aug-2016 Doris Ling <dling@google.com> Fix fingerprint swipe gesture settings for secondary users.
am: 34331b7ca9

Change-Id: I42ab349b7fa5dfd789a5dcabb3aebf88683421f6
fc5efaeabc71538ace8460ee8b6b53827b8c9e1d 10-Aug-2016 Doris Ling <dling@google.com> Merge "Fix fingerprint swipe gesture settings for secondary users." into nyc-mr1-dev
34331b7ca97f6cffe3bd91c8281732cc3379c7e8 09-Aug-2016 Doris Ling <dling@google.com> Fix fingerprint swipe gesture settings for secondary users.

Change to use getIntForUser() when reading the secure settings value for
fingerprint swipe, as PhoneWindowManager always read as user 0 by
default.

Change-Id: I1d08a970b031f7bce4864c982e791678e1ef221b
Fixes: 30709756
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c837e4bc0d86e65751de699c1f6e0502c7d4ef4d 08-Aug-2016 Evan Rosky <erosky@google.com> Merge changes Idfd40156,Ic903fc25

* changes:
Make user-switch transitions customizable
Add support for custom user-switch UI
5b2b567a2852f072702e9baf93ecfd98894ff0fa 08-Aug-2016 Muyuan Li <muyuanli@google.com> Prevents screenshot layer from dismissing IME. am: 36ca72c6c2 am: 4e6d496674
am: e0e89c3655

Change-Id: I995bb5f1569a187649adf8991c50c98ca24c4d0a
4e6d4966748cadf38fbb7c5f1c0a33420c94eff0 08-Aug-2016 Muyuan Li <muyuanli@google.com> Prevents screenshot layer from dismissing IME.
am: 36ca72c6c2

Change-Id: I0eb890d51edf58ac4e18d26af5331429a305c4f2
1839645126c8e7e0909e8ed8f0686c2122ba6078 28-Jul-2016 Evan Rosky <erosky@google.com> Add support for custom user-switch UI

Given config_customUserSwitchUi, AM/UserController will not show any
UI during user-switch (no dialog or screen-freeze).

Provides a mechanism (WM.setSwitchingUser) by which a custom user-switch
UI can notify WM/Keyguard when it expects a user-switch operation to
be running.

Bug: 29329555
Change-Id: Ic903fc251d7ec3a54bc6a77906d3afa45a6a5fac
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
36ca72c6c22489b5a29ce61ebf63824b3db03a52 07-Aug-2016 Muyuan Li <muyuanli@google.com> Prevents screenshot layer from dismissing IME.

Add code to adjustWindowLw to force the flag
FLAG_NOT_FOCUSABLE to be set for layer type
TYPE_SCREENSHOT.

Bug: 30485483
Change-Id: I11725eb89fda59b6d50fa1700845cdfe9ffb930b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4d514b7388b99dd692a8cd2c317117e5a1e1e5e2 05-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Improve trusted unlock while occluded am: ddcdecc952 am: 1f9b02b03a
am: 3b51c256a7

Change-Id: I248cd2d0d6707757f7fe2ae7c27f3b0393679290
92c9c4f3e6932958f5728705cb7ce1c255aa4a43 05-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Refactoring for improving trusted unlock while occluded am: d88eb2693b am: cb5642afae
am: bfe5166ac3

Change-Id: I760b5f4d780231b06ec8ef733a8a002c3dd2420d
1f9b02b03aa0e8602609584338af83162ac374ec 05-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Improve trusted unlock while occluded
am: ddcdecc952

Change-Id: I090d266a7a48e85eee669f13ff595407565d18ff
cb5642afaeb4686e3613130d83223667a0857bc8 05-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Refactoring for improving trusted unlock while occluded
am: d88eb2693b

Change-Id: I91f6bfe7a0573ad31785c5a3d1bff03a24d1107c
c49dfaf4d6161471a68bbc08d947c5d697a507e2 05-Aug-2016 Adrian Roos <roosa@google.com> Merge changes from topic 'smooth_unlock' into nyc-mr1-dev

* changes:
Keyguard: Improve trusted unlock while occluded
Keyguard: Refactoring for improving trusted unlock while occluded
f0976121d91744ea98651de073b6eee2b55ede18 05-Aug-2016 Anthony Hugh <ahugh@google.com> Add panic detection to back button am: 96e9cc5700
am: c1de1b6dde

Change-Id: I523e7719483840c4fb4fe39827b3a6652bdc1a39
ddcdecc9529bc4db7187458b09d15dcb1590825c 04-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Improve trusted unlock while occluded

Smoothly unlocks device when going from a SHOW_WHEN_LOCKED activity
to a DISMISS_KEYGUARD activity while the device is trusted.

This change suppresses the jank from going briefly through the
lockscreen if the device is trusted and unlockable without entering
a credential.

Bug: 27410215
Change-Id: Idd86e825d37a89538a0a1f690daf6afcf94a0699
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d88eb2693b6a70af0f5fbc5881ce855e28de33aa 04-Aug-2016 Adrian Roos <roosa@google.com> Keyguard: Refactoring for improving trusted unlock while occluded

- Adds a trusted signal from Keyguard to PhoneWindowManager
- Allows PhoneWindowManager to exempt DISMISS_KEYGUARD windows from force hiding
- Allows PhoneWindowManager to dismiss Keyguard while occluded

Bug: 27410215
Change-Id: I3ad490b64a5805b6f3888a9f37fcfbdd0116395e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
96e9cc5700c63c872f29f488129daf34f95292d2 13-Jul-2016 Anthony Hugh <ahugh@google.com> Add panic detection to back button

Adds "panic" detection to the back button. Implemented solution
uses 4x button presses in a short duration to detect for "panic".
The value used to determine the duration between key up and key down
that still count as a multi-button press is configurable via the
Settings Provider.

BUG: 28027764

Change-Id: Ibf1370ff3cb539a9a54002a8704922744a3ca5d7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
74b90c7d85e863c72f33998b4437bdb7ffe5c6b7 02-Aug-2016 Svetoslav Ganov <svetoslavganov@google.com> Revert "Prevent apps to overlay other apps via toast windows"
am: 2fc661a453

Change-Id: I37bfb7dc01ad512f34332e83f6cc6be31d1feaab
a2f247e6a63eefc70866202abbec0e3af3768695 02-Aug-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Revert "Prevent apps to overlay other apps via toast windows"" into nyc-mr1-dev
2fc661a453c8dd0f62c4e567641ab282f2f2c5fe 02-Aug-2016 Svetoslav Ganov <svetoslavganov@google.com> Revert "Prevent apps to overlay other apps via toast windows"

bug:30150688

This reverts commit dc24f937b031f5f4e153dbfeaa51e96415a09b71.

Change-Id: Id7e8ddbf82ab426f55a5296791f1e8ebb61514bc
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fd8ffb62a997da12d29c8b14b3ae0bd4116f8402 01-Aug-2016 Svet Ganov <svetoslavganov@google.com> Prevent apps to overlay other apps via toast windows
am: dc24f937b0

Change-Id: Ib3a97103f0f9aa980ab72412d4881d609178e641
fea7cfce8b6afe9a90c6b8353ae6bf10696c49d4 01-Aug-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Prevent apps to overlay other apps via toast windows" into nyc-mr1-dev
dc24f937b031f5f4e153dbfeaa51e96415a09b71 26-Jul-2016 Svet Ganov <svetoslavganov@google.com> Prevent apps to overlay other apps via toast windows

It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout.

Now for apps targeting SDK greater than N MR1 to add a
toast window one needs to have a special token. The token
is added by the notificatoion manager service only for
the lifetime of the shown toast and is then removed
including all windows associated with this token. This
prevents apps to add arbitrary toast windows.

Since legacy apps may rely on the ability to directly
add toasts we mitigate by allowing these apps to still
add such windows for unlimited duration if this app is
the currently focused one, i.e. the user interacts with
it then it can overlay itself, otherwise we make sure
these toast windows are removed after a timeout like
a toast would be.

We don't allow more that one toast window per UID being
added at a time which prevents 1) legacy apps to put the
same toast after a timeout to go around our new policy
of hiding toasts after a while; 2) modern apps to reuse
the passed token to add more than one window; Note that
the notification manager shows toasts one at a time.

bug:30150688

Change-Id: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
152bb674200cdfb39d3c0bc372ae22aa80b13fc6 29-Jul-2016 Doris Ling <dling@google.com> Default fingerprint swipe to disabled. am: d01217c0c2 am: fd8273d53d
am: 9bf2c7607e

Change-Id: I78b2e8e451f9ce09f650a46e91a679a9a1b9984d
d01217c0c2916547f810e3df1f0142c1160f44e1 28-Jul-2016 Doris Ling <dling@google.com> Default fingerprint swipe to disabled.

If Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED is not set, default it
to 0 to diable fingerprint swipe.

Bug: 30416729
Change-Id: I292aa696216facc8eaefd1f4bd698f6e5708dc85
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
710ca487d1c66ea86eaaee9110697a09660f7b5a 27-Jul-2016 Adrian Roos <roosa@google.com> Never show transient navigation bar when empty am: 1f4259057e
am: 794d684b69

Change-Id: Idd985c9dcc61e1ea03385288541e195b8f91b757
794d684b692e65aac2a824b960bb6d4984674a46 27-Jul-2016 Adrian Roos <roosa@google.com> Never show transient navigation bar when empty
am: 1f4259057e

Change-Id: I47739b5b1687457121564ef5f8fe9c7bb90b5b4b
6da665785869f0dadba9763f37076b4741960810 27-Jul-2016 Adrian Roos <roosa@google.com> Merge "Never show transient navigation bar when empty" into nyc-mr1-dev
48108559c497dbf32d6b31f60566513ce0942573 26-Jul-2016 Selim Cinek <cinek@google.com> Allow home button to be tapped while a incoming call shows a HUN am: 64be772e03
am: 3ee95debda

Change-Id: I6b256ffbaf2e22b2e62db627f7c2f5ca3834f501
3ee95debda4cd92f41fcd330e8ea12989fd68f82 26-Jul-2016 Selim Cinek <cinek@google.com> Allow home button to be tapped while a incoming call shows a HUN
am: 64be772e03

Change-Id: I459d3e0160f0b4acdd64e31dc31948685a98cf2a
52a11f7c64b6e3f94d4a2c35e3ee254a84b2a9f1 25-Jul-2016 Selim Cinek <cinek@google.com> Merge changes from topic 'home-button-lock-nyc-mr1-dev' into nyc-mr1-dev

* changes:
Fixes a bug where the lockscreen would be frozen
Allow home button to be tapped while a incoming call shows a HUN
64be772e0379af8dae42ec83f34a4dd7e8a5cc01 22-Jul-2016 Selim Cinek <cinek@google.com> Allow home button to be tapped while a incoming call shows a HUN

With heads-up notification the user will not always be in the InCallUi
screen when the phone is ringing. Locking the home button is no longer
appropriate in those cases.

Fixes: 27659054
Change-Id: I2631f00861542b207802c8b6d5b5e95548a44311
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1f4259057e3b3320cb5f342aa5779dd3ea3e6ae5 22-Jul-2016 Adrian Roos <roosa@google.com> Never show transient navigation bar when empty

Prevents the status bar from showing in a transient way
when it's empty and hidden by the focused window.

Change-Id: Iaa191ed7b50cbc656a0a763b02b677d11759293e
Fixes: 30283262
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c514ce84d6e8945fd4b46de73ac190421e166890 13-Jul-2016 Adrian Roos <roosa@google.com> Merge \\"Suppress immersive mode confirmation if navbar is empty\\" into nyc-mr1-dev am: 2061ff11c4
am: 2149506068

Change-Id: Ia637f2f45fe31778b2eabd2719cd6de0af27f1f6
2061ff11c4030e86b9a2938aeb6493ff40beea23 13-Jul-2016 Adrian Roos <roosa@google.com> Merge "Suppress immersive mode confirmation if navbar is empty" into nyc-mr1-dev
7aaa551733b40d12217c721b8a91c7212418131a 13-Jul-2016 Adrian Roos <roosa@google.com> Suppress immersive mode confirmation if navbar is empty

Bug: 29501674
Change-Id: Icc5b02e378dfca9136a0d04f286926127fdec70d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8a8d81633e724d98b0b681cb94a80b928a60963d 12-Jul-2016 Anthony Hugh <ahugh@google.com> Merge \\"Prevent back button from being handled by app after waking device\\" into nyc-mr1-dev am: 1b7c5631c4
am: dd476c8e57

Change-Id: I367456961363134903b4df8ccbaa00f92f36e290
1b7c5631c4e572f911e996f1f928de5adebfd47a 12-Jul-2016 Anthony Hugh <ahugh@google.com> Merge "Prevent back button from being handled by app after waking device" into nyc-mr1-dev
531eb4e9f6a12b7246acd0fe5a9b12f7908fade6 12-Jul-2016 Doris Ling <dling@google.com> Merge \\"Add a secure setting for double twist gesture for camera flip.\\" into nyc-mr1-dev am: 3e869587e8
am: b8d3caf4b8

Change-Id: I9265956ac2253f8a19c3a7f4dc8e6d9ada97f931
a60d31d70f3b9c2a08e38b3487b6c9a6314e0b5b 06-Jul-2016 Doris Ling <dling@google.com> Add a secure setting for double twist gesture for camera flip.

Add Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED to control whether the
double twist gesture should flip the camera between front and back mode
is enabled or not. Also move SYSTEM_NAVIGATION_KEYS_ENABLED from
Global to Secure.

Bug: 29869445
Change-Id: I614289e6de7b1ee4221de7047a5e0dd784607bed
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3040144617b1e0cb096670559f0fedf96a74d851 02-Jul-2016 Jorim Jaggi <jjaggi@google.com> Merge \\\"Docs: Job-scheduling doc for new DAC Performance section.\\\" into nyc-dev am: 1f64ea546b am: 9f64b020bd
am: a9f24e556b

Change-Id: Ib06c8c5d3dd23b7c7b9d66175940f08fb046bc87
9f64b020bd7450f1c61f8af171822a4bf99b36a7 02-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow voice interaction window to control system bars" into nyc-mr1-dev
90859bc4ce633e2716a4708234278321d74df461 29-Jun-2016 Jorim Jaggi <jjaggi@google.com> Allow voice interaction window to control system bars

Fixes: 29777675
Change-Id: I452bfa46cfdeb6ffa1f36c718df9bc7184fa74f7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8942204d935c5417154a8dd3cb90db3f47193d63 01-Jul-2016 Robert Carr <racarr@google.com> Merge changes I38cff63b,Id3739bbc,If052cd8c into nyc-mr1-dev am: 30efa24b11
am: 0dbe6db014

Change-Id: I3f0fd113bf9dc063f3bc60301f9a7ddf7d16581d
606f4d5d8c5e1b3db00d0544cd64dff1dd0581b6 30-Jun-2016 Robert Carr <racarr@google.com> Disable seamless rotation while animating.

Neither the animation code or the seamless rotation
code is equipped to handle it.

Bug: 28838855
Change-Id: Id3739bbc4335936cf3647af4ff97dd4efc134b65
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
fd10cd1989966d01011a0cf75f3282f3e12ca5a6 30-Jun-2016 Robert Carr <racarr@google.com> Force CROSSFADE rotation when launching from double tap gesture.

When activity transition triggers a rotation change, the starting
window will normally be the top window at the time we try
to select the window animation. However, these layout params won't
have the apps rotation animation set (as the client code will set that
on the real window, not the starting window). Eventually we would
like to add API to specify rotation animation via manifest to solve
this problem cleanly. In the mean time, we can force a specific rotation
animation from the double tap gesture, and clean up some camera
ugliness. We accomplish this by attaching an animation hint to
ActivityOptions.

Bug: 28838855
Change-Id: If052cd8cbae76651da43f3b4c590cd9dcc1afc0f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f0db3158fb9990e50389e31004309239aaec5624 23-Jun-2016 Jim Miller <jaggies@google.com> Merge \\"Enable fingerprint sensor navigation to invoke QuickSettings - rename \\"FP_NAV\\" to more generic \\"SYSTEM_NAVIGATION\\"\\" into nyc-mr1-dev am: 0520091641
am: 0a7efa1e47

Change-Id: Id8de76d28e581f5a4fa448dd48dc33870d81b538
07e0384a4e931bc94550c108ddd9b9514100161e 23-Jun-2016 Jim Miller <jaggies@google.com> Enable fingerprint sensor navigation to invoke QuickSettings
- rename "FP_NAV" to more generic "SYSTEM_NAVIGATION"

Fixes bug 28869612

Change-Id: I321240ee54506633d63a29e987b8d8638c652391
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0db4052d51fb48b6a19a72f75b49103054ff4219 22-Jun-2016 Robert Carr <racarr@google.com> resolve merge conflicts of 79116da to master

Change-Id: Ia6e42d99097da86e23b9d33659259d264a365c45
6da3cc0237d2483ead16a7013d1326bccc5112af 17-Jun-2016 Robert Carr <racarr@google.com> Implement seamless rotation mode.

Add a rotation mode which does not require freezing
the screen. For situations like Camera where only small
elements move on screen, this allows for seamless changes
of display orientation. This is achieved by transforming the
windows with their current buffer in the same transaction that
we rotate the display. We set things up so the windows are
frozen this way until they submit buffers in the new orientation.
There is a special case in the Camera window itself, and it's use
of NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY. In this case the buffer
contents are rotated by SurfaceFlinger and will never resize, for these
windows we just need to update the scaling matrix.

Bug: 28823590
Change-Id: I52dc6a86fcb3c08f736f0977ba3975a24fb8136c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3dcd1fc42ec2c400a764224507da66e20bbec6ec 21-Jun-2016 Jim Miller <jaggies@google.com> Merge \\"Enable fingerprint nav by default\\" into nyc-mr1-dev am: 1ac356280c
am: c4f7a60765

Change-Id: I56bc077248e6b08ea4a1b5aa384dbb063f67c9f5
a762ca79be588239eef9dd405f6d52231dbae062 20-Jun-2016 Jim Miller <jaggies@google.com> Enable fingerprint nav by default

Fixes bug 29462383

Change-Id: Ia1cbd1d33ab3a11b5c8e5a770243d9b36448577b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ec2e4bae989434afe5ea99aee5a45a39ec394c18 15-Jun-2016 Michael Wright <michaelwr@google.com> Merge \\\"Make lid switch edge rather than level triggered.\\\" into nyc-dev am: e85da2bc2e am: 3ccb86541b
am: 128139d684

Change-Id: Ia6e05213bfeab2cd842291a78037ff72e7e4e33f
128139d684410f71145d42ae3259cd448a568e16 15-Jun-2016 Michael Wright <michaelwr@google.com> Merge \\"Make lid switch edge rather than level triggered.\\" into nyc-dev am: e85da2bc2e
am: 3ccb86541b

Change-Id: Idb9926ac643bee1233457deb875b959a562a7339
ad0eb9d1d6d6a43e08fccf33cdd2ccd1d6809244 15-Jun-2016 Michael Wright <michaelwr@google.com> Merge \"Make lid switch edge rather than level triggered.\" into nyc-dev
am: e85da2bc2e

Change-Id: Iba2a0acf6901f3b7b1d1d3bea6053ad6e2aea7db
e85da2bc2eeabb425c4b1270dbd0e22095aac957 15-Jun-2016 Michael Wright <michaelwr@google.com> Merge "Make lid switch edge rather than level triggered." into nyc-dev
8cdceba0dc7b921ff7c83512ebe287353f4b6004 15-Jun-2016 Doris Ling <dling@google.com> Merge \\"Added config system navigation keys.\\" into nyc-mr1-dev am: 32300db186
am: 4be6c44ee2

Change-Id: I45ff845e5cf67d738c1f25b26bcd7acfe50ea9eb
32300db1862432644c61bb9d21618e0da154daa9 15-Jun-2016 Doris Ling <dling@google.com> Merge "Added config system navigation keys." into nyc-mr1-dev
a5a80a3c7732adef3e41d877723c6ad1bc8433a8 10-Jun-2016 Michael Kwan <mkwan@google.com> Merge \\"Merge Theme.Micro and Theme.Material.\\" into nyc-mr1-dev am: 458b716597
am: 2fbdb8e855

Change-Id: I3e39fa5ff57e5e7b3d86fe602161b586a5cbb21a
628cea45e231a6bdda0e66940f5059b8b3b8fadd 09-Jun-2016 Doris Ling <dling@google.com> Added config system navigation keys.

1. Added config_supportSystemNavigationKeys to config and symbols
2. Added SYSTEM_NAVIGATION_KEYS_ENABLED to Settings.Global
3. Updated PhoneWindowManager to check for the system navigation keys enabled
flag before expanding or collapsing the notification panel.

Bug 29120082

Change-Id: Ia73078520474ce5a1cbf2256c0d793ed74bbf589
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5a861676674521834b099c0e5a7547bc4340878c 10-Jun-2016 Michael Kwan <mkwan@google.com> Merge Theme.Micro and Theme.Material.

Bug: 29248638
Change-Id: I1f6a419de89f89e4a105e244c6495e2df29c120c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d388b6f218c5a99487f405b145b3163c730fb712 10-Jun-2016 Phil Weaver <pweaver@google.com> Merge \\\"Improve accessibility window title behavior\\\" into nyc-dev am: f8af34365c am: d567ae1b87
am: 4b82db9d9c

Change-Id: I5c4b6947f7645dd9ec660635f4d24d436f2e6ef2
d567ae1b87aaf4583039abb9d29f4e571cfc406c 10-Jun-2016 Phil Weaver <pweaver@google.com> Merge \"Improve accessibility window title behavior\" into nyc-dev
am: f8af34365c

Change-Id: I620cb3dc270a8ad409ec1760cedd778821fd8d98
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
2cfedbbe537c33316f01bee2067d6f1a20cb1d13 09-Jun-2016 Adrian Roos <roosa@google.com> Merge \\"Seascape Navigation Bar View\\" into nyc-mr1-dev am: 7d76682bb3
am: 8187b7056d

Change-Id: I3db4375855ac1081ea8e59411bf355f4b08150e0
7d76682bb3a3aaf0d6adec10014a18bebbd4a061 09-Jun-2016 Adrian Roos <roosa@google.com> Merge "Seascape Navigation Bar View" into nyc-mr1-dev
eba594fa1b31eb2ed51175eb08efe34dca18ce64 08-Jun-2016 Phil Weaver <pweaver@google.com> Merge \\\"Revert \\\"Improve accessibility window title behavior\\\"\\\" into nyc-dev am: fc71309640 am: 2c8099110e
am: d06094dd86

Change-Id: I9da39b5bbd28592f7babe17f3aff4142e04f2e47
d06094dd860ba3daf3934136dc0dc180e65879ba 08-Jun-2016 Phil Weaver <pweaver@google.com> Merge \\"Revert \\"Improve accessibility window title behavior\\"\\" into nyc-dev am: fc71309640
am: 2c8099110e

Change-Id: Id615a721b788760b54754355414fe9762d65f0ab
5c32d65e78dce57d671e355042b1258b83074067 08-Jun-2016 Phil Weaver <pweaver@google.com> Merge \"Revert \"Improve accessibility window title behavior\"\" into nyc-dev
am: fc71309640

Change-Id: I7b0c0636a69e4cc06d525f60d8621879ce45be22
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
5c12b923ff1e2e76926266a8b6666c2b0411ce57 04-Jun-2016 Jorim Jaggi <jjaggi@google.com> Fix delayed light status bar animation am: 72a6f058cf
am: 2e94e8e925

* commit '2e94e8e925514b186848ff59c2e162a2d0a3872a':
Fix delayed light status bar animation

Change-Id: I3109d00739a2cc2c9663796268c2c32fbcf52988
72a6f058cfcb72cad4da5ec8c84bc0a2b0d533a0 06-May-2016 Jorim Jaggi <jjaggi@google.com> Fix delayed light status bar animation

Make sure to do another layout when we show the dim layer so PWM
can pick up the change and send it to SysUI.

Bug: 28434629
Change-Id: I877669ede8534601933043f60c8cef8502918c7b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f5e5c3a72ac8d8ebd5cfbbdceb533a125190b610 04-Jun-2016 Jorim Jaggi <jjaggi@google.com> Merge "Add new attributes for wallpaper info" into nyc-mr1-dev am: c27660d45a
am: acfed07f72

* commit 'acfed07f725466e866445cfdf4fda94fa0e8f0a0':
Add new attributes for wallpaper info

Change-Id: Ie439547cb6964c1f90b2ac313408a502027ccd25
526505da256a9af8542e592c566bd87334d075e6 24-May-2016 Jorim Jaggi <jjaggi@google.com> Add new attributes for wallpaper info

Adjust test wallpaper to use these attributes.

Also fix some issues where wallpaper got laid out differently in the preview
mode.

Bug: 28770685
Change-Id: I259f3884f5f2c0b723a6a5ce012d45170f64c4c7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
21e39a2e0c15d74f148f244c64ca484ac8c08db1 03-Jun-2016 Michael Wright <michaelwr@google.com> Make lid switch edge rather than level triggered.

Right now, because of the way that configurations are applied, when
the display turns on because of an incoming phone call the fact that
the lid is "shut" will automatically put the phone back to sleep,
causing the ringer to be silenced. By making this edge triggered, the
display will only sleep or wake up when the lid is initially shut or
opened, respectively, avoiding this issue. In the future we may want
to revise this so that the lid-shut state is better understood
throughout the system to avoid these types of issues, but for now
this is sufficient.

Bug: 26600446
Change-Id: I10d403b62944ed6eceaff58cddad5c243a2884df
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
85d202b18ada8dc95f151087ab9778d1a31f7a30 03-Jun-2016 Adrian Roos <roosa@google.com> Seascape Navigation Bar View

Allow placing navigation bar on the left side aka seascape. Also
deal with fallout from this change in frame calculations, decor view,
and all over SystemUI - notably no changes to the navigation bar view.

Bug: 28823676
Change-Id: I91187a974a10a940787a858e2609f2e9c5bade78
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
5e5d174c81705560ee417b80ddc9a43e634522b3 28-May-2016 Adrian Roos <roosa@google.com> Merge "Fix IME and NavBar overlap with Direct Reply" into nyc-dev am: 2c69d1ecae am: 85e60d203e
am: 5cdc958240

* commit '5cdc958240cb00faa2a06cf1dddfae394ef5623d':
Fix IME and NavBar overlap with Direct Reply

Change-Id: I57cd14ea27720454d698ef9144a93f2bbaeba1fd
5cdc958240cb00faa2a06cf1dddfae394ef5623d 28-May-2016 Adrian Roos <roosa@google.com> Merge "Fix IME and NavBar overlap with Direct Reply" into nyc-dev am: 2c69d1ecae
am: 85e60d203e

* commit '85e60d203e4ec8d1c1db9ff55cdc6057a48a7812':
Fix IME and NavBar overlap with Direct Reply

Change-Id: I030e9b054ed62cb676223a1c1638e0da047002ed
f986b700de4f04431ae9e0f2d3bba36f8b3c51f6 28-May-2016 Hemal Patel <hemalp@google.com> Merge "Docs: Removed note in "Platform Versions" section" into mnc-io-docs am: 9dfa75ef43 am: 202017dcbf
am: 2c69d1ecae

* commit '2c69d1ecae5efff06a29bec3d73f9654b8851972':
Fix IME and NavBar overlap with Direct Reply

Change-Id: I9983d40ed0da917ea7f19df60b8f36e760dc26d7
dd654eaf406ee668a040c8964c63389fe4af80ad 27-May-2016 Adrian Roos <roosa@google.com> Fix IME and NavBar overlap with Direct Reply

In phone landscape, when the navigation bar is on the right,
and when the status bar is forcing the IME and NavBar, make
sure that the nav bar and IME don't overlap, even if the
NavBar is only transient.

Bug: 28914905
Change-Id: I22921f1aca7970c2d02dfd88408eb15c5b17151f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1f68154716520db8c234344a4f1cb00a2788898e 26-May-2016 Phil Weaver <pweaver@google.com> Merge "Improve accessibility window title behavior" into nyc-dev am: 7ab1a4d286 am: 0a16a8d1d6
am: f6a1e1fe05

* commit 'f6a1e1fe05885cfa2f5aebf9102bcac7daa4bcfa':
Improve accessibility window title behavior

Change-Id: Icc64e6cfe827e93c5b5be11c8244e681c037d952
0a16a8d1d6ee63519123857dc4f305c96de7198b 26-May-2016 Phil Weaver <pweaver@google.com> Merge "Improve accessibility window title behavior" into nyc-dev
am: 7ab1a4d286

* commit '7ab1a4d286898acffd1f3b444f9efc9e1d2a104e':
Improve accessibility window title behavior

Change-Id: Iff0d61871f48a66510e1fab72adbfb062c01c203
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
52cea80a0fda1419b93237a55e69314a05795420 25-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28931042: wtf in system server" into nyc-dev am: ae02bfdd28 am: 3f2704b112
am: 4cb2d09cc9

* commit '4cb2d09cc9ffeb2826a6409ccfe5e9a40bf5b71d':
Fix issue #28931042: wtf in system server

Change-Id: I157db2bf789bcf339748f5462e8ce3e4dc41478a
4cb2d09cc9ffeb2826a6409ccfe5e9a40bf5b71d 25-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28931042: wtf in system server" into nyc-dev am: ae02bfdd28
am: 3f2704b112

* commit '3f2704b112efd596c732965840762a3a53e5831b':
Fix issue #28931042: wtf in system server

Change-Id: I9c49dc77bcd6b6ef31342da9846cbe672f46f57d
f7af7ed20bf448259b5b2b838c650ec443f428db 25-May-2016 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #28931042: wtf in system server" into nyc-dev
am: ae02bfdd28

* commit 'ae02bfdd289f7172faeb57664ef47de8b547fa05':
Fix issue #28931042: wtf in system server

Change-Id: I0b15977a1b4e79743a6fe6937cd3463a4e3c2c3c
a8c16935d9ba4d09d79e90ec430a7f3d31492d48 24-May-2016 Dianne Hackborn <hackbod@google.com> Fix issue #28931042: wtf in system server

Broadcast needs to have a valid action. We'll just pick
a generic one, since the receiver here doesn't care.

Change-Id: Ifff87626d11dd9fafb4e68819e8c8cecdf7fe1aa
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2453fc78fa1172b9ac61b7205a2e6839da238087 21-May-2016 Chong Zhang <chz@google.com> Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager\'s handler" into nyc-dev am: 1f170ddef8 am: cd62a84d95
am: 48b313631c

* commit '48b313631cde76ee7ea148305972e1d17bddc3d9':
Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Change-Id: I31d0ab49697cfca52b4350347dfb0782d03cc7c0
48b313631cde76ee7ea148305972e1d17bddc3d9 21-May-2016 Chong Zhang <chz@google.com> Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager\'s handler" into nyc-dev am: 1f170ddef8
am: cd62a84d95

* commit 'cd62a84d954c8c6d518c59a628d6f1f3bac3327e':
Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Change-Id: Ic0d15c7aa71dad5015bf4d0ed8346af81bf774be
8741065958a2e72760a6135ad1c5593a7f53d777 21-May-2016 Chong Zhang <chz@google.com> Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager\'s handler" into nyc-dev
am: 1f170ddef8

* commit '1f170ddef81ee242dcdf8dc6b9aa60876cf3bff8':
Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Change-Id: I1aba93635303dad3a3267f54005dca8882f9cf0a
1f170ddef81ee242dcdf8dc6b9aa60876cf3bff8 21-May-2016 Chong Zhang <chz@google.com> Merge "Dispose HideNavInputEventReceiver on PhoneWindowManager's handler" into nyc-dev
9f7fb09fa393eadbb42a4d67343f118975c851b0 21-May-2016 Chong Zhang <chz@google.com> Dispose HideNavInputEventReceiver on PhoneWindowManager's handler

Disposal of input event receiver needs to happen on the handler
specified for receiving the inputs, otherwise nativeFinishInputEvent
could crash due to race with native dispose.

Instead of disposing mInputConsumer in beginLayoutLw(), post to
PhoneWindowManager's handler to dispose, and skip any input events
received after mInputConsumer is set to null by beginLayoutLw().

bug: 26927018
Change-Id: I094eb4472ea68f2c8bd6a428161d7edb11dc8900
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
409dcf3063bc97c5658af5da7aa74613ec46c7d8 20-May-2016 Winson <winsonc@google.com> Only broadcast screenshot error to the current user. am: 538c22630b am: 6e95485f50
am: e1953aff43

* commit 'e1953aff43d0eeeee9ccd71e68d140a591fe05b0':
Only broadcast screenshot error to the current user.

Change-Id: I15cd4fe83a630aada20982d6be4c12994d476e31
e1953aff43d0eeeee9ccd71e68d140a591fe05b0 20-May-2016 Winson <winsonc@google.com> Only broadcast screenshot error to the current user. am: 538c22630b
am: 6e95485f50

* commit '6e95485f502d342e03b93cc0fd34c00c70b86ac7':
Only broadcast screenshot error to the current user.

Change-Id: I4ca0a5af876a24c6bada1aa01678f3434425acae
e1a14b98a8e2e57f8ba1983aba5850da24f83e68 20-May-2016 Winson <winsonc@google.com> Only broadcast screenshot error to the current user.
am: 538c22630b

* commit '538c22630b3ffd3c9efd544552d5a7fb3ae876a8':
Only broadcast screenshot error to the current user.

Change-Id: I6eb8e2212bb837d25644d0e79abaef9c8a61f9a5
538c22630b3ffd3c9efd544552d5a7fb3ae876a8 19-May-2016 Winson <winsonc@google.com> Only broadcast screenshot error to the current user.

Bug: 28807226
Change-Id: I428ecc5572d7522580cdf38bded2fff9cf07abc2
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e3a46d8e811514d161a9011c8f02581dd4dcdcf1 18-May-2016 Jim Miller <jaggies@google.com> Merge "Add fingerprint navigation to enable pulling down the statusbar" into nyc-mr1-dev am: 0991ba5b01
am: a6ae8004c5

* commit 'a6ae8004c501f998818dc4af727b81dcc20de3f9':
Add fingerprint navigation to enable pulling down the statusbar

Change-Id: Ie28b7098c298daeabd35af3c0bfb6b88976ddc7a
f4c0a13170cd85da39953c354dc4c5eb836af038 18-May-2016 Jim Miller <jaggies@google.com> Add fingerprint navigation to enable pulling down the statusbar

Change-Id: If0584358fd615ebd9df11614c662f4f287abf5c4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4b13ab892ef095af6b76708876270139443df58e 17-May-2016 Anthony Hugh <ahugh@google.com> Prevent back button from being handled by app after waking device

The current implementation marks KEYCODE_BACK as a wake key in
KeyEvent. In theory, this prevents the back key from being
dispatched to the app. In practice though, on watches the key
both wakes the device and dispatches the back button.

This behavior is because of the logic in
interceptKeyBeforeQueueing(). Watches spend the majority of their
time in ambient, so when the code runs the
shouldDispatchInputWhenNonInteractive() logic, it always assumes
wake key events should be passed through.

With this change, I am adjusting the behavior for watches.
shouldDispatchInputWhenNonInteractive() has been modified to
handle the back button specially on watches so that the Down event
is treated as a wake up only.

The above change had an unintended side effect of sending an Up
event to the app without a corresponding Down event. I've also
added a cached value so that we don't send the Up event if
a Down event was responsible for waking the device.

BUG: 28716144

Change-Id: If8906bffd9b3e0b6070de3b4e7bce4d8178ac65d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3a14fb79163d0e1d8c9882d720a10c6a0ecd419e 17-May-2016 Jorim Jaggi <jjaggi@google.com> Handle multi-window for inset hint am: 23bf5462f0 am: b7bd18bdc6
am: bf9a7566df

* commit 'bf9a7566df02f7754ffeeba523cc904f73c0a45c':
Handle multi-window for inset hint

Change-Id: I033c6ad295bf235d181ad0fbfe5025cdcad5b4c2
23bf5462f05b33ce4390d8370520e43b74dbec09 14-May-2016 Jorim Jaggi <jjaggi@google.com> Handle multi-window for inset hint

We need to incorporate task bounds when calculating the inset hint
so we don't specify something wrong to the client which we correct
immediately after.

Bug: 28697105
Change-Id: I23cec7d6cc62a4d982e0796a867e803d4cce0803
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9c0df37ec9c0c43124b5c3fb127bf6caa3f915a6 12-May-2016 Jaewan Kim <jaewan@google.com> Merge "Fix continous crash in WindowManager in boot" into nyc-dev am: 927b6be3d9 am: 1f7f01ec77
am: 0cf458ca4a

* commit '0cf458ca4adea3ba6040601aed4d5eedf777e05c':
Fix continous crash in WindowManager in boot

Change-Id: I280b25ee9ff7cffeec8390027b59f75464fc99fa
3328433f13c6f357cfca98553ff90fabe1da9c1e 12-May-2016 Jaewan Kim <jaewan@google.com> Fix continous crash in WindowManager in boot

Bug: 28728894
Change-Id: I660e2709a674eb4089dbb38173375491a87828db
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
10b889de7d0c9271e3fb47c87a8ed140bee9c271 12-May-2016 The Android Automerger <android-build-merger@google.com> stephenli Manually merge commit '68fffa5'

* commit '68fffa5': (23 commits)
Fix smallest width configuration calculation
docs: DoDS, wearable reference docs
Switch the default text selection handles to Material style.
docs: Noted minor API changes in release notes
docs: added "billions" doc in Distribute>Essentials
Remove wear design pages redirecting to design/wear
correct the support library redirects to redirect whole path
Stop saving ActionMenuItemView state.
Fix iterator double-advance in ContentObserverController
TIF: Remove the uniqueness check for track ID from notifyTracksChanged
Update and add attributes to the JavaDoc for VectorDrawable
Use Q=100 JPEG instead of PNG for wallpaper display
Fix issue #28400000: Settings memory UI still showing z-ram...
docs: Updated support library revision history for 23.4.0
docs: Updates to notifications for DP3
docs: Added emoji section to api overview.
Fixed a bug where the QS was animating wrong when closing
Fix KeyguardManager.isSecure() to observe work profile
cherrypick from mnc-docs docs: Updated APK Signature Scheme v2 doc.
Docs: Added new Whitelist feature to Data Saver for DP3
...
254d9e4f410f63ed1ba3f917e207731c5d9d6538 12-May-2016 Jim Miller <jaggies@google.com> Merge "Fix KeyguardManager.isSecure() to observe work profile" into nyc-dev
ccf1db8a8a99685cde667403c4dd31bf45ab28f2 11-May-2016 Adrian Roos <roosa@google.com> Merge "Force status bar window to be visible when expanded" into nyc-dev am: 4b4e814533 am: 33f6c04283
am: f5d56bfdd5

* commit 'f5d56bfdd595e943c66779bba6775542907d447d':
Force status bar window to be visible when expanded

Change-Id: Ibb26289ef009325c96cb8bb9ab521a877b529d30
db1bc6bcc39c8c4deb1a86f889981e734a54fd72 15-Apr-2016 Adrian Roos <roosa@google.com> Force status bar window to be visible when expanded

Also don't collapse status bar if low profile gets set.
Status bar should almost never be collapsed without explicit
user action, and this only leads to issues.

Fixes: 27629489
Change-Id: Ibe5c64df578438c7224985b173a9cd967bf363bf
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e4044bb617ea849939058d953e250fcd540c75cc 11-May-2016 Jim Miller <jaggies@google.com> Fix KeyguardManager.isSecure() to observe work profile

The fix passes the calling userId instead of the current userId to
allow apps running as managed profiles to work.

Fixes bug 28666104

Change-Id: I9f8676ab11bd581d9e67b2b9f385036d4d3576ee
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ad0f9db9d6366033f0f9e91a3b06658bdad9eecd 10-May-2016 Winson <winsonc@google.com> Merge "Fixing regression in call to showRecents()." into nyc-dev am: e981777f0e am: 3da6a8d8a3
am: 76c72cdc89

* commit '76c72cdc895cbd30ee6ec19cddf28b6dd1bb7bb1':
Fixing regression in call to showRecents().

Change-Id: I4584eba9066d494482b3933aa72e84b0354af5dc
14db362511e52b4d5104115cf68e49c63763908a 09-May-2016 Winson <winsonc@google.com> Fixing regression in call to showRecents().

- Previously, the call was made to showRecents() which took a single
boolean to determine alt-tab state, and after the refactoring, it
no longer made the same call.

Bug: 28663474
Change-Id: I75fb793e56c9a094a4372d7157dbd0dd7ecdbda7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2c0d6dcc8c5b66021642a036a3b31b393b707c79 29-Apr-2016 Tony Mak <tonymak@google.com> No keyguard should be shown after reboot if it is in kiosk mode

1. we disable keyguard before KeyguardServiceDelegate connect the
KeyGuardService and the request is ignored. We now remember the request
and redo it after connected

2. Instead of checking PRIVATE_FLAG_KEYGUARD flag, use
isKeyguardShowingAndNotOccluded to check is keyguard showing.

Bug: 28164604
Change-Id: Ib02b5fc9dcc6e8d9934309f1e540ece4d845363d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f76b15057eb5b96f74fe90fed58525b4b5a0ec20 28-Apr-2016 Adrian Roos <roosa@google.com> Merge "Show lockscreen wallpaper on SIM screens" into nyc-dev
4b74f4de64806f1d98d9fca172b63fb1daab3b14 28-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix IME adjustment for voice interaction windows

Bug: 28344950
Change-Id: I42fa7abe28a693bc22c878c75839af4ef03e5e8a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a3760a4713de573c88fc9f14e9a25b358ef4eea2 26-Apr-2016 Adrian Roos <roosa@google.com> Show lockscreen wallpaper on SIM screens

Also fixes a bug where the lockscreen wallpaper was
showing in occluded mode and where the regular wallpaper
was flashing when going back from occluded mode.

Change-Id: Ibe6404acc4ed5db8807b3ef223b149e841730c8f
Fixes: 28271756
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
bdc4700155f5ff89e213cb0e9efe49897b888f7d 26-Apr-2016 Jaewan Kim <jaewan@google.com> Merge "PIP: Send KEYCODE_WINDOW to app first if PIP isn't exist" into nyc-dev
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
72c216f25072123f498105bc7ad98a65a7a3cdaf 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't hide app windows due to not showing when locked when keyguard is hidden" into nyc-dev
23fd1db68d1c28c8edc4ece1a0a1aa36c278e980 26-Apr-2016 Wale Ogunwale <ogunwale@google.com> Don't hide app windows due to not showing when locked when keyguard is hidden

This worked in pre-N because the only visible app was the app that can be
shown when the keyguard is hidden. That isn't the case in multi-window mode
where one of the apps can be shown when locked and the other doesn't have
the show when locked flag. Only hide the other app if the keyguard is shown.

Bug: 28368875
Change-Id: I5039098db74492fadf667fed24fc58448436681a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1d66995f47d548efe7863e88a8cc7bd2c66661a0 25-Apr-2016 Amith Yamasani <yamasani@google.com> Merge "Fix deadlock between VrManager, ActivityManager and WindowManager" into nyc-dev
02a0381e516f1782ff5a2170ed3b3e1bda7284fe 23-Apr-2016 Amith Yamasani <yamasani@google.com> Fix deadlock between VrManager, ActivityManager and WindowManager

Let WM register to listen for Vr mode state changes and keep
track of it locally to avoid calling out to vr manager.

Bug: 28342910
Change-Id: I071666fab7319f315021f48058177dd3141acc3a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0bf096f1b45959e260b09b2483e79187c1991f54 14-Apr-2016 Andrei Stingaceanu <stg@google.com> Keyboard shortcuts: dismiss when activities start via shortcut

* introduced a new intent DISMISS_KEYBOARD_SHORTCUTS and
and new public API in Activity (which sends a broadcast
to KeyboardShortcutsReceiver) which applications can
use to dismiss the keyboard shortcuts.

* plumbing and implementation for a new call to dismiss
keyboard shortcuts from PhoneWindowManager and used it:
** when starting activities invoked via Search+key
** when starting activities invoked via META
** when starting activities via application launch keys

* removed unused variable in
Activity#onProvideKeyboardShortcuts

Note that for apps started via touch (aka non-shortcut)
like tapping the Settings gear icon from the notification
bar the menu is not automatically dismissed.

Bug: 28012198
Change-Id: I83a8d4f342bb8a08115a648648834d0d2bac19fd
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3dd59487cc5f01f38e1e5068ce9257a40473baba 20-Apr-2016 Adrian Roos <roosa@google.com> Merge "Fix unprotected StatusBarManagerService calls" into nyc-dev
3eefb4c313d0269f7e8bd226bdcc2d039f9e5608 19-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use right starting window resource in multi-window mode." into nyc-dev
dfc18623edfd35778c1f2c8efab12dfeff98ded7 17-Apr-2016 Wale Ogunwale <ogunwale@google.com> Use right starting window resource in multi-window mode.

Use the override configuration for the task the app is contained
in to generate resources for the starting window.

Bug: 28220001
Change-Id: I6fdf39a6d6de41287b44b25861a76f58fe58dd53
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f2efdd8c7ca65745245a0ac26c681a8d376adb87 16-Apr-2016 Adrian Roos <roosa@google.com> Fix unprotected StatusBarManagerService calls

Some Binder calls in StatusBarManagerService were
left unprotected. They had no business being binder
calls in the first place, so they got moved to
StatusBarManagerInternal.

Bug: 28222649
Change-Id: Ib26dcca413eb642ba8cd6a4482bf13071f8bd3ab
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c99f05e1b0d3b13bbf46ebcb5b23307d6af4e1ce 16-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix broken statusbar disable flags" into nyc-dev
2a6291069187756a1c45786215716db3f37097f7 16-Apr-2016 Adrian Roos <roosa@google.com> Fix broken statusbar disable flags

Fixes a bug where the disable flags were
always applied to user 0 instead of the current
user because the user switch dispatch from
WindowManager was broken.

Change-Id: Ib2faf0777c5367af5bf07cb2d11c51ed0222d65c
Fixes: 28062568
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
681fc7b2670542aae0f3b9ef8f6c7a88db984ea9 15-Apr-2016 Jorim Jaggi <jjaggi@google.com> Fix wrong transition when dock minimized and docked app launched

When having an app docked and then going home, and then launching
the app from the homescreen, we had a wrong transition because
getTopMost task was already set to the launched app, because
getRunningTasks doesn't exclude the docked stack. Instead of adding
flags for getRunningTasks, which sounds risky, we just pass a "force"
value when we launch recents in this state.

Bug: 27154882
Change-Id: Iee4512fed13115dbbe8b74413ff1fa9b87afa0ef
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
eb88d83fc5da8ea05033c03bbb9f0d4b804ba162 14-Apr-2016 Jorim Jaggi <jjaggi@google.com> Add nice animation when adjusting for IME in multi-window

- Run a separate animation when we need to adjust for the IME. We
can't use the attached animation because the adjustment animation
needs to be longer than the IME animation.
- Also run an animation when IME is disappearing.
- Adjust IME exit animation to better match with adjustment exit
animation.
- Make sure to update adjust for IME when entry/exit animation of
IME is starting, to avoid flickers.
- Don't update the IME window in PhoneWindowManager for layout
until the animation has started. This lead to an issue where the
content inset was set too large too early.

Bug: 27154882
Bug: 28175599
Change-Id: I09a33413e307f84d6c3cf4ae928c280f7ad48348
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
469caae9ea03c8f4261b8fd6df25aa20b3647e9a 22-Mar-2016 Sriram Viswanathan <tvsriram@google.com> Disable recents button in carmode inside of NavigationBarView,
instead of doing it from PhoneWindowManager, which doesnt maintain
the mUiMode properly and in sync with that in the UiModeManager.
In addition the re-layout / modifications in the content of the
navigation bar in care mode are better consolidated in one place
instead of many places.

Bug: 27313462

Change-Id: I1bdc2324f649f19f879b71c695381587561498e9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b5dd049089a8c62efea445be9abd1f476fbf1ab9 14-Apr-2016 Muyuan Li <muyuanli@google.com> Fixes a bug in shortcut key.

All shortcut keys that are dispatched to listeners will be checked
against user provisioning status. Only if user setup is complete will
the listeners receive shortcut keys.

Bug: 28192375
Change-Id: Iecc5a21a40d07bdc4f71d1a36187cca4a5b30bde
(cherry picked from commit f0667f077f66ba3e58387f7570dd82a26aaed7b8)
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6b15ea5cea58e7b35e8ee6e751250e2670f6887e 04-Apr-2016 Wale Ogunwale <ogunwale@google.com> Limit don't dispatch when non-interactive and the display is off to watches

We still want to dispatch input for non-watch devices when the non-interactive
and the display is off.

Bug: 26277593
Change-Id: I38023b3494e46c63578dd3162e2b9aa0a213862d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
48143f7ec58f2793e236566e0d25d3b731858996 07-Apr-2016 Andrii Kulian <akulian@google.com> Merge "Caps Lock toggle with Meta + Alt (2/2)" into nyc-dev
347bb9a3cf53595b8beed17574cec9c0072aa819 06-Apr-2016 Jorim Jaggi <jjaggi@google.com> Merge "Don't lock device when double tapping" into nyc-dev
f1cdf9558d2b7f8fe5b8cf3d309b48809f04403b 06-Apr-2016 Jorim Jaggi <jjaggi@google.com> Don't lock device when double tapping

Bug: 24265204
Change-Id: Ia19e956def454604ed3f3e3e9815fc1872ef649a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
112d05678b7de53da8948f62dd2e968274f62244 08-Mar-2016 Andrii Kulian <akulian@google.com> Caps Lock toggle with Meta + Alt (2/2)

Caps Lock implementation in frameworks/base

Bug: 27482276
Change-Id: Ie0d8145c049197d4591e012832a710e4f751d2ac
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
11c62e17af9096f76d4532f26cacd809c3a5ef53 06-Apr-2016 Jorim Jaggi <jjaggi@google.com> Dynamic density change handling

- In PWM, make sure to read the height values after the new
configuration has been applied.
- Reset all navigation bar button icons when density changes.
- Adjust height of notification bar.
- Reload divider height values in SysUI and WM.
- Snap divider handle to a new position after loading the
new configuration, as the snap points change.

Bug: 26844819
Bug: 27450471
Bug: 27921696
Change-Id: I9e28f0c49f6367c5fcfac010e7a6e98a42e85996
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
002f7121b72c55cf21123a094f52424bde074c3c 30-Mar-2016 Andrei Stingaceanu <stg@google.com> Keyboard shortcuts: disable toggling from lockscreen

Do not allow toggling the keyboard shortcuts dialog
if the keyguard is locked.

Bug: 27717058
Change-Id: I4a16a863ed1a4d3cefa7ca41c1361592ef3c5b3c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
e5638a6f75472127493422a68954aa3fd2109658 26-Mar-2016 Jorim Jaggi <jjaggi@google.com> Fix nav bar consuming

- Cache shouldAlwaysConsumeNavbar so it doesn't get reset when
insets == null
- Remove logic with frame comparison when determining whether to
consume nav bar. Not sure how that ever worked.
- Make sure shouldAlwaysConsumeNavBar survives when consuming
insets.

Bug: 27157904
Change-Id: I35f209ab27cc12240038da7efa9e79c95f70c6ce
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0cb0f728fb48f3d10de74dedef13d155d5fed2b6 26-Mar-2016 Jorim Jaggi <jjaggi@google.com> Fix divider animation

Don't animate if the divider is offscreen.

Bug: 27859698
Change-Id: Ie41ed9d2a4b8ad8fc08fcb56bd85a56a13572acf
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
192086eb8aff3fb873a7e03ade0b81652aacf25f 11-Mar-2016 Jorim Jaggi <jjaggi@google.com> Implement transition for docking task in recents #1

- When the docking transition is happening, defer updating
the bounds of the home stack until the transition is done.
This is to preserve the scrim which is drawn in the recents
activity.
- Use the PROLONG_AT_START infrastructure to hide the task
in recents when starting the app transition.
- When recents finally get resized at the end of the transition,
reset it's draw state so we don't move the old surface around,
and the new surface gets drawn at the new position, to avoid
flickering.
- Remove hack around not layouting docked divider if it's not
visible, it's not needed anymore and resulted in a wrong
initial position.
- Fix animation selection for docked stack divider.
- Make sure win.moved() always gets called.

Bug: 27607141
Change-Id: I76c35f09461f044a90e2c88335008284b5839cc0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4e850ffaa757cd6f1e2578c454a7a83a93419e83 02-Mar-2016 Clara Bayarri <clarabayarri@google.com> 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
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7c74ae040d2edf956d3ec943f146c5baa93af0eb 14-Mar-2016 Wale Ogunwale <ogunwale@google.com> Merge "Disable FLAG_LAYOUT_NO_LIMITS window flag in multi-window mode" into nyc-dev
9185fb07c4df49fe604f9535505634f86aeac1c4 12-Mar-2016 Wale Ogunwale <ogunwale@google.com> Disable FLAG_LAYOUT_NO_LIMITS window flag in multi-window mode

FLAG_LAYOUT_NO_LIMITS allows a window to extend its dimensions outside
the screen area by setting the display frame to a really big value.
We don't want this in multi-window mode since all window frames should
be limited to their parent task/stack dimensions.

Bug: 27577275
Change-Id: Ie0a8b8c13de91561e06dadc27aac3a5ba209d05b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
34f09ca843268ea8aee108038b78abbc8e520ec7 04-Mar-2016 Anthony Hugh <ahugh@google.com> Add system wide long-press back button functionality

This CL adds long-press back button functionality as a system
intercepted keypress.

Incorporated in this is an update to clockwork overlays so that
long-press on back will launch ACTION_VOICE_ASSIST.

BUG: 27313719
BUG: 27427088
Change-Id: Iaff337dc50e0022d2392c19d095cec98563b1c7d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
44dbe294fbf06a1def61c48e758621e61ce23b08 10-Mar-2016 Winson <winsonc@google.com> Fixing issue where screenshot notification remains non-dismissible.

- Ensure that we start the screenshot as a foreground service to reduce
likelihood that it is killed while taking a screenshot.
- If the screenshot process times out or gets killed for any reason,
ensure that we update the notification with an appropriate error
message.

Bug: 27389179
Change-Id: I5007bda95538044bc753e4ceffd2f59a069c857b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7014a3a89392f4148dcbb3bfc805d26b90f55ae3 09-Mar-2016 Yorke Lee <yorkelee@google.com> Merge "Add configurable nav bar opacity rules" into nyc-dev
9b2ffb31df8b996f434f2f6f0df3274255a15ad6 08-Mar-2016 Yorke Lee <yorkelee@google.com> Add configurable nav bar opacity rules

NAV_BAR_OPAQUE_WHEN_FREEFORM_OR_DOCKED (default) - Nav bar is always opaque when
either the freeform stack or docked stack is visible.
NAV_BAR_TRANSLUCENT_WHEN_FREEFORM_OPAQUE_OTHERWISE - Nav bar is always
translucent when the freeform stack is visible, otherwise always opaque.

Bug: 26425669

Change-Id: I36ff12df4448a35c66f0e3dc2272169496b562d5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6ca619fe1aff489e1227b0db6a77c96e973a1db3 08-Mar-2016 Muyuan Li <muyuanli@google.com> Partial screenshot

Added a partial screenshot function in TakeScreenshotService
also added corresponding shortcut keys in PhoneWindowManager

Bug: 26820467
Change-Id: Id67cd3b4b0eed848eb4665056766546500bdac88
(cherry picked from commit 03e45541e9d54a2f285906ac7b5bcb374db14495)
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
605ec5cdca371629d1c197e8e541fb00596880c6 08-Mar-2016 Muyuan Li <muyuanli@google.com> Merge "Fixing shortcut key duplicate registration bug" into nyc-dev
8a97307e5b2dd3888dfc3e75bff39a8ad151fe2a 05-Mar-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Don't crash legacy apps with revoked "Draw over apps access"" into nyc-dev
24d24acf7a329f1c08ab08fb2ad7217878b08c1f 04-Mar-2016 Muyuan Li <muyuanli@google.com> Fixing shortcut key duplicate registration bug

Change-Id: I1300a14519b1aac701b105ed16144bb3ef57e73b
(cherry picked from commit 75bca3a5364adbc37d27aa5ed6aa5b36547137db)
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
03f2afc3db08d5d0becc48e14ad89fa969a6edaf 05-Mar-2016 Svet Ganov <svetoslavganov@google.com> Don't crash legacy apps with revoked "Draw over apps access"

bug:26396161

Change-Id: I8b86e175b4815e58ace78c37a86141c5e4dbe183
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2e4b7327ce4d93bbdcf959f38b0b8adba34add6e 03-Mar-2016 Yorke Lee <yorkelee@google.com> Add config value to force nav bar to be opaque

Bug: 26425669
Change-Id: I97dcfa734e6ca5688ae2a5e2b9330b1a70d7b623
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
94ce94e96069ab6c2ece4864ba4c7692f3168352 25-Feb-2016 Muyuan Li <muyuanli@google.com> Allows components to register shortcut key.

The registered shortcut will be called from PhoneWindowManager,
before dispatching

Change-Id: If26128939b45a639c8895719a7a23ca433f39fd9
(cherry picked from commit 4da863c5a8872dcabb179a978a2b2157d9081679)
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0ffd49cbe0ab4c13fd5528abacade898a8cff481 13-Feb-2016 Jorim Jaggi <jjaggi@google.com> 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
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7587e38992af85ea1f488f2155ff3576d65f2c18 22-Feb-2016 Jorim Jaggi <jjaggi@google.com> Merge "Restrict dock sides after rotation" into nyc-dev
5060bd891068b78bcbe72e1d8b61efac2da02c20 20-Feb-2016 Jorim Jaggi <jjaggi@google.com> Restrict dock sides after rotation

Bug: 27167078
Change-Id: If51626b75321eebc277eb2399ee753ffe489642b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9cea80cdddbecadb304eb7c8373cf1ed397f433a 16-Feb-2016 Svet Ganov <svetoslavganov@google.com> No overlay when permissions shown - framework

bug:26973205

Change-Id: I88395e47649191bb7db6dd8723c49e741ef4f1e4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
82c9dc951e8e19b9eab6120b6465e08c5d69beba 06-Feb-2016 Jorim Jaggi <jjaggi@google.com> 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
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7998e48ce3240d09f28cd365fb6ba58f8987470f 13-Feb-2016 Jorim Jaggi <jjaggi@google.com> Fix unlock transition when docked stack is visible

- Keep surface of docked divider when lockscreen is showing, like
all other apps, so we don't run into synchronization issues when
unlocking. We do this by setting policy visibily to false, but
keep clientVisibility=true
- Update docked stack visibility when starting unlock sequence to
visible.

Bug: 27154882
Change-Id: I6def5c18831e23579fcfc904133749f149eaf376
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
76b7d0d5d7bfaf27d0039437a7ab08325014e99a 12-Feb-2016 Jaewan Kim <jaewan@google.com> Revert "PIP: Use long press HOME for PIP on Android TV (2/2)"

Long press HOME will launch recents instead.

Bug: 27159966
Change-Id: I9a4fd847d716d7e4e4754c7a9c48628c46f82233
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9f6798a9367cc6134f956c422107361db43c4212 11-Feb-2016 Jorim Jaggi <jjaggi@google.com> Fix layout for full-screen floating windows

When the app doesn't set IN_SCREEN and INSET_DECOR but the window is
still full-screen, we force SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN but then
we still need to communicate the content insets to the DecorView.

In DecorView, we consume these insets in this mode and set it as
layout params so this behavior is completely transparent for the
app.

Bug: 26464646
Change-Id: Ib7332b845767a5bbc0266c380bf6240e322db943
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
86905582411c5c77a3e7641589cf206c6e5770f5 10-Feb-2016 Jorim Jaggi <jjaggi@google.com> Handle light status bar for split-screen

In split-screen the light status bar flag for one side of the
status bar can be different from the other side.
SYSTEM_UI_FLAG_LIGHT_STATUS_BAR is now reported for both
the fullscreen stack and docked stack, but not anymore in the
"default" SysUI visibility field when reporting a visibility
change to SystemUI. The change also reports the docked stack
and the fullscreen stack bounds, so SystemUI can guard tinting
the icons on whether the icon is one of the areas.

When calculating the light status bar flag in PWM, we keep track
of the top fullscreen opaque window state for the docked and
fullscreen stack separately.

Bug: 24365214
Change-Id: Id2240a86d75bf96e0138ec7652a4793859f56e3c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
81ba11eccbc2519338782100c13cf4a5909ad6be 04-Feb-2016 Jorim Jaggi <jjaggi@google.com> Put dismiss end target at navigation bar

This makes the animation when exiting docked mode a bit nicer
when you fling the divider towards to the navigation bar. However,
since the divider ends at the navigation bar, we need to immediately
dismiss it instead of fading out when the divider is fully occluded
by the navigation bar.

Change-Id: Ic5432fd118cb71be36485667b2c537caf5065ce5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9511b0f1e9ac629a4a747a0c9373d33ab33cfc32 30-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix bug where surface was not clipped off during resizing

When dragging the divider in a way such the task size goes through
the following transition

- Half size
- Full screen
- Half size

the surface wasn't clipped off anymore. This was because in full
screen configuration, computeDragResizing() == false thus when
going full screen -> half size, we reset the draw state to
DRAW_PENDING to get notified when it has finished drawn. However,
this also broke clipping.

In order to fix this, we always put the window into a resizing mode
no matter whether the bounds are fullscreen or not.

However, this introduces an ugly flickering on the navigation bar,
when going into docked mode, because the app doesn't draw navigation
bar background in resize mode.

To fix that, we calculate the presence of navigation bar whether the
window is fullscreen, and not just whether it's resizing. For that,
we need to calculate the presence in BackdropFrameRenderer, by using
the insets just sent by window manager.

Change-Id: Idf56df4ae7fefe67d068bc2eeda8dc4d83bbefb7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c552b04cb4aac9d31dbaf9744f32ddc14886e222 18-Jan-2016 Jaewan Kim <jaewan@google.com> PIP: Use StatusBarService to handle PIP key

Bug: 26591829
Change-Id: I7051fab966e2fc0887b2a21ddbf11aff7e16804b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1262dc039061a1c746335d9bf7a09056b42c84fa 22-Jan-2016 Michael Wright <michaelwr@google.com> Merge "Switch and store keyboard layouts based on IME subtype."
d5f7ed9fe9dc3590f6ef9cb7470e29e836a95907 19-Jan-2016 Michael Wright <michaelwr@google.com> Switch and store keyboard layouts based on IME subtype.

Rather than associate the keyboard layout solely with a specific
hardware model, we should also associate it with a given IME subtype.
This lets users switch between various languages and have the
keyboard change in unison with them so they can use the appropriate
layouts for each language.

This change adds initial support for associating IME subtypes and
keyboard layouts. We still need to:
- Remove support for the old style of layout association once the
Settings apps begins to use the new APIs
- Automatically select an appropriate layout based on the given
subtype (or set a reasonable universal default such as QWERTY)

Bug: 25752812

Change-Id: Ie88ce1ab77dbfe03ab51d89c1dc9e0a7ddbb3216
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4911787249e7bed96d5a1fdcd689e9823b50c758 19-Jan-2016 Jaewan Kim <jaewan@google.com> PIP: Handle KEYCODE_WINDOW to control PIP UI

Bug: 25580820
Change-Id: Ib8f605615f0cf64a37774a2559ffabe5148ed6d0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
52632e21faf5aa63e53e5626046bc1742cba100c 14-Jan-2016 Jaewan Kim <jaewan@google.com> PIP: Use long press HOME for PIP on Android TV (2/2)

Bug: 25580820
Change-Id: Ic269132ec7de1e725989ad57a1ee205b3334e3bb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
dc5b4535165d82e5e9c83576a47bd95cd422ca0a 06-Jan-2016 Adrian Roos <roosa@google.com> Scroll to RemoteInputView

Scrolls to the RemoteInputView when it's beneath the IME.
Also fixes ViewRootImpl to take into account translation
when calculating the location of the focused rect.

Bug: 22452379
Change-Id: I9b9649edeabf9bcab8fc487fe92dec62f388737e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a1dcb87565ab9a34ae14efebe4743701068cffad 13-Jan-2016 Jaewan Kim <jaewan@google.com> Merge "Revive volume up/down long press in TV"
765487f929f3d91ab3cd130b6b1d2008b25c4728 12-Jan-2016 Jaewan Kim <jaewan@google.com> Revive volume up/down long press in TV

PhoneWindowManager.interceptKeyBeforeQueuing isn't good place
to handle long press because rejecting a down event will not
synthesize further key repeat.

Move the logic to PhoneWindowManager.interceptKeyBeforeDispatching
instead.

This is the regression caused by following CL
001c59c Route volume keys directly to the audio system on TVs

Bug: 26268032
Change-Id: Ic8f6dfaec473c0d45ffa42475763622dc700e635
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1fcd0c2e651ffce089f6dda625c02247cb9b9049 13-Jan-2016 Jim Miller <jaggies@google.com> Merge "Fix problem where keyguard shows spontaneously"
737af724eb31f513386e91ee5510cc6991350937 31-Dec-2015 Jorim Jaggi <jjaggi@google.com> Snap docked stack after screen rotation

- Move DividerSnapAlgorithm to com.android.internal, also move
some utility stuff into DividerUtils which is used from both
SystemUI and window manager
- When the screen rotation changes, rotate the stacks like before
but then also snap the docked stack to a valid snap position.

Change-Id: I9e1aa13f42f398a25c9016e6f20395ee212e405b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2967f48f8574ce35acd6c5e4e9f7872c64f159d5 08-Jan-2016 Jim Miller <jaggies@google.com> Fix problem where keyguard shows spontaneously

A recent change caused keyguard to ignore the sequence number
when calling doKeyguardLaterLocked().

It also appears we can get into a situation where multiple
requests to show keyguard are pending. This change ensures
only the latest request gets handled.

Fixes bug 26326350

Change-Id: Ic6cba0054fe235a8838ca8c242b1840c9e8309d6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3dc52ed1799f96deaf802a5304f7301463dec58f 11-Jan-2016 Winson Chung <winsonc@google.com> Revert "Snap docked stack after screen rotation"

This reverts commit e65d6bb2072471e63b93aa14a288bc59ed86208f.

Change-Id: I245aa9be3ea98ff742e02b02f6f1d344bc2e8182
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e65d6bb2072471e63b93aa14a288bc59ed86208f 31-Dec-2015 Jorim Jaggi <jjaggi@google.com> Snap docked stack after screen rotation

- Move DividerSnapAlgorithm to com.android.internal, also move
some utility stuff into DividerUtils which is used from both
SystemUI and window manager
- When the screen rotation changes, rotate the stacks like before
but then also snap the docked stack to a valid snap position.

Change-Id: Ifb0c65dfbdfca2343a76b12de982c0701fe0c3ab
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9ebbe6afe7a433f78ca3d30c9f215c53212c34ac 17-Nov-2015 Sriram Viswanathan <tvsriram@google.com> Changes to support navigation bar system UI in car mode.

The change has all the platform changes required to support
modifications in the navbar dimensions and custom icons in car mode.
The UX is not frozen yet, but have placeholder resources provided
by android auto UX engineers.
The change assumes that the car mode configuration is known to the
WindowManagerService and uses its current ui mode to request the
latest from the policy (PhoneWindowManager.java). The change is
modeled on the way rotation is handled, where the Policy knows the
different view attributes for uiMode and just returns back the
window sizes based on the current uiMode requested. The policy does
know the current uiMode, but the order of when that changes is not
deterministic [from logs it does happen before any request to update
UI occurs, but guess that could change].

Bug: 25996809
Change-Id: Ia46cbe5096382d26c9eb8ec74cf59a059b767edb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c22ab7911a3efd7e0183f954f1760475d702ad3e 07-Jan-2016 Andrei Stingaceanu <stg@google.com> Keyboard shortcuts: minor naming refactor

Replace all occurrences of showKeyboardShortcuts* with
toggleKeyboardShortcuts* in order to be inline with
the current/desired behavior.

Change-Id: Ia076952ec40963b2727fd1f855b64859b94b1643
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d8b1d63f96580fe961e1751e7b4f56c90c1e0a76 05-Jan-2016 Winson <winsonc@google.com> Fixing issue with exit animation due to incorrect visibility state.

- This CL ensures that only Recents updates the SysUI visibility state
for itself, ensuring that the visibility state reflects the state in
Recents, and allows us to skip unnecessary work to close system
dialogs when it is not required.

Bug: 26390248
Change-Id: Ib6301a8300cc3da6da75fcbbceceb0e1da3beab4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
81fe2d1f0adc9e752d7f1a410d66af6a326fd6e2 21-Dec-2015 Jorim Jaggi <jjaggi@google.com> Refine snap position behavior

- Use the stable insets to communicate the system insets to the
docked divider view.
- When calculating the sizes for the snap positions, exclude the
system insets.
- Add 3 snap position modes: 16:9 in one window, 1:1, 16:9 in the
other (phone portrait). Only 1:1 (phone landscape). Fixed relation,
1:1, 1 - fixed relation (tablet portrait/landscape).

Change-Id: If2166c5fb99f12535eeab5de18e9f5aaf433d77c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
406585a7e37db2f38c9886cafcbc5ed5d85c5faf 21-Dec-2015 Jorim Jaggi <jjaggi@google.com> Reenable colored bars for multiwindow

Fix the previous bug that caused that we needed to disable colored bars
by only forcing the layout fullscreen flag for windows that would like
to be laid out with MATCH_PARENT.

Bug: 26050571
Bug: 24365214
Change-Id: I4f197ae5e2bf042980f5e8dc9eb852843af9859c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
96d5c8a9cea92471274b6c8f906e43d26be34ebd 18-Dec-2015 Filip Gruszczynski <gruszczy@google.com> Temporarily disable forcing of drawing status bar background.

Forcing status bar background drawing causes all windows to be
considered fullscreen. As a result alert dialog windows have incorrect
containing frames and aren't repositioned when IME appears.

Until a better solution is implemented for forcing drawing the status
bar, we disable it to have correct old behavior.

Bug: 26050571
Bug: 24365214
Change-Id: Ic27a394711a587fa152a238699cd19751e91a732
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ae61f7118a92e097e854c840d5726c0920f5db0e 09-Dec-2015 Yohei Yukawa <yukawa@google.com> Rotate IMEs (subtypes) by Meta+Space.

With this CL, PhoneWindowManager starts monitoring Meta+Space to trigger
input method rotation.

Note that InputMethodManagerService currently supports only one way
rotation. Currently there is no difference in the behavior between
Meta+Space and Shift+Meta+Space. Reverse rotation will be supported in
a subsequent CL.

Bug: 25753404
Change-Id: I4005692215edfcf8bed3e86b1e07000148f986f5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4407cbde63db301dc6383bc47b6dc95fa55fffaa 08-Dec-2015 Michael Wright <michaelwr@google.com> Merge "Add support for locking the screen when the lid is closed" am: 9dc3c36c9c am: 4d9e6190b1
am: 37c8bcbcc9

* commit '37c8bcbcc9f5098a2a7fde91a3b112abd35a85ad':
Add support for locking the screen when the lid is closed
37c8bcbcc9f5098a2a7fde91a3b112abd35a85ad 08-Dec-2015 Michael Wright <michaelwr@google.com> Merge "Add support for locking the screen when the lid is closed" am: 9dc3c36c9c
am: 4d9e6190b1

* commit '4d9e6190b186f1d2e1cd25defd0d6e12dd833b38':
Add support for locking the screen when the lid is closed
4d9e6190b186f1d2e1cd25defd0d6e12dd833b38 08-Dec-2015 Michael Wright <michaelwr@google.com> Merge "Add support for locking the screen when the lid is closed"
am: 9dc3c36c9c

* commit '9dc3c36c9cd796d90b65543567495d910d266e4c':
Add support for locking the screen when the lid is closed
7def60daa049271c0d595d2ff566965693ee88cd 13-Nov-2015 Edward Savage-Jones <edward.savage-jones@sonymobile.com> Add support for locking the screen when the lid is closed

This commit adds configurable support for lockscreen
behaviour when the user has a device cover/lid. This
is intended for lids with a viewing window so that the
user can see the time and interact with apps via the
window.

Change-Id: Id71883f66d1a180c4732912b3b59cabf9f4d7b6e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4fa7892f35268ff7d591928ac9f5a26c267031e3 01-Dec-2015 Jorim Jaggi <jjaggi@google.com> 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
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a771049b2ef401ab911a9e0a277dbf9b475388a1 23-Sep-2015 keunyoung <keunyoung@google.com> allow locking UI mode and block launching car dock for automotive

- add config to lock UI mode change: When this is enabled,
request to change car mode will be ignored. Apps can check
the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
apps cannot change day / night mode without having
MODIFY_DAY_NIGHT_MODE permission.
Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
and mode change
- All new configs have default values which keeps the current behavior.
Car products should override the configs to get desirable behavior.

bug: 22700993
Change-Id: Ic0e58f3428151e0b1c19a2e9a7d6ded32ff962a6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
8f7f3184d55850b1c4d2036319794151f564e9c0 18-Nov-2015 Jason Monk <jmonk@google.com> Allow QS tiles to open dialogs

Add a TYPE_QS_DIALOG window type, that is in the same layer as
apps and dialogs and such. It is guarded by having a token
that is granted by SysUI after a click has occured. If the
app shows a dialog before listening finishes (QS closes) then
the token will stay granted until the tile is removed by the
user, otherwise the token will be removed immediately to avoid
later dialogs.

Also fix a couple tiny TileService issues:
- Stop/Start listening reversed
- Fix javadoc referencing wrong action

Change-Id: Iedcdd5fd9a2af2b33eb7f6f17bb0e6c997879876
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
aa8b1c35add23922ff394e0193ba24cb15bd34f3 03-Dec-2015 Keun-young Park <keunyoung@google.com> Merge "Revert "allow locking UI mode and block launching car dock for automotive""
3b741e03b3eaa8a263f11cd1837091d3ac39483b 03-Dec-2015 Keun-young Park <keunyoung@google.com> Revert "allow locking UI mode and block launching car dock for automotive"

This reverts commit 1746369a6bcd1a7219e94366b3774bfdfff08fc6.

Change-Id: I4989e99b8f648145d0dbfe18e557102939e7d1e3
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ef3ca438c9b89949c020fecf13834851406f0482 03-Dec-2015 Keun-young Park <keunyoung@google.com> Merge "allow locking UI mode and block launching car dock for automotive"
64cdc1458bcf0d09781463a6e421b9b870b09687 30-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Remove dock divider surface when it's not visible.

We achieve the removal by notifying System UI about the visibility of
the dock divider. This way System UI can change visibility of the root
view, which in turn will cause the WMS to destroy or create the surface
as necessary.

Bug: 25844096
Bug: 25683717

Change-Id: Idbc33368db697a059af49106dfadb80c3d7d06c1
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cae4f1222f012da554c5376ee327af66068a7a96 19-Nov-2015 Joe LaPenna <jlapenna@google.com> Revert "Don\'t dispatch when non-interactive and the display is off." am: f2b9b2d85a am: f7aceb60e3 am: 2900dc2349 am: 617bd39465
am: 01186abc81

* commit '01186abc81c721c84a5d588bb7183d811d77f99c':
Revert "Don't dispatch when non-interactive and the display is off."
f2b9b2d85ae1b48896ad6b685de4cda8fab1c8fb 17-Nov-2015 Joe LaPenna <jlapenna@google.com> Revert "Don't dispatch when non-interactive and the display is off."

This reverts commit 2ccf0c8e636fd3be75c3a07f4cf60d72a4cfaa28.

BUG: 22422588
BUG: 25067918

Change-Id: I916c8bb19cd6a73c0be4bd3a0e3112938651e775
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
1746369a6bcd1a7219e94366b3774bfdfff08fc6 23-Sep-2015 keunyoung <keunyoung@google.com> allow locking UI mode and block launching car dock for automotive

- add config to lock UI mode change: When this is enabled,
request to change car mode will be ignored. Apps can check
the config using UiModeManager.isUiModeLocked()
- add config to lock day / night mode: When this is enabled,
apps cannot change day / night mode without having
MODIFY_DAY_NIGHT_MODE permission.
Apps can check the config using UiModeManager.isNightModeLocked()
- add config to disable car dock intent launch for home key
and mode change
- All new configs have default values which keeps the current behavior.
Car products should override the configs to get desirable behavior.

bug: 22700993
Change-Id: I351fc53163575d2f523c2d6e886befdb69a5a0c6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
57f76f1c549f37ffb4c0eaac40b6ab633404b0f7 05-Nov-2015 Filip Gruszczynski <gruszczy@google.com> Animate the dock divider appearance/disappearance.

We want to animate the dock divider appearance only after the entrance
animation of the docked activity finishes, so these two don't clash. For
disappearance they will animate together.

Bug: 24913915
Change-Id: Ibe5c3960f21fcc5e64039b158605fa09017c5c34
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
904271d904a8c6d4d74780c64139f4d8f9fc0537 24-Oct-2015 Puneet Kumar <puneetster@google.com> Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev am: ca9c43b27b am: fc12c7c1b7 am: b0482fe29e
am: f58fc291a8

* commit 'f58fc291a855c2f8ec4f493b0a54af668271714b':
Prevent recents from coming up when in SUW
fc12c7c1b7ecd71517feb70ec4fe027545fda4c2 24-Oct-2015 Puneet Kumar <puneetster@google.com> Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev
am: ca9c43b27b

* commit 'ca9c43b27b9e3bc007e731fe3a214cbed3edf8f3':
Prevent recents from coming up when in SUW
d847ad55554986d4312e100a8993994ed33edbfa 24-Oct-2015 Michael Wright <michaelwr@google.com> Prevent recents from coming up when in SUW

Bug: 25229538
Change-Id: I141c4eb928a5ce7f9858922862fe3dc1d3a33a90
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2a6a2c2de8ce2743679f488f056f22cd1adfd726 14-Oct-2015 Filip Gruszczynski <gruszczy@google.com> Change WindowState.mShownFrame to WindowState.mShownPosition.

We never use this field as a rectangle, we only depend on its left-top
corner. Using a frame is only confusing about the purpose of this field.

Change-Id: I5d6e6321db4fa3203bb7e0f1975ae6ddd1ec09bb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6e94a9eb8709ddd3127e3c0103cd6a0f550f6e74 08-Oct-2015 Wale Ogunwale <ogunwale@google.com> Added rules for status/nav bar customization when in multi-window mode

Status & nav bars are always visible and opaque when freeform or docked
stack is visible

We still need to refactor the code to allow force opaque to be updated
independently for the status bar and nav. bar. Once that is done, the
status bar should be transcluent if freeform stack is visible and
docked stack isn't and the status bar should be opaque if freeform
& docked stack are both visible.

Bug: 24365214
Change-Id: I48ecc6067c9b0f7239c12c98eb46f3fcefacd4f9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c7b01e6bed40f27370a3cce20156a7b32b3c5c6f 02-Oct-2015 Tim Murray <timmurray@google.com> am e6a4f902: am 0e28d919: am 3af80eff: am 79176379: Merge "Send POWER_HINT_INTERACTION on rotate." into mnc-dr-dev

* commit 'e6a4f902617f6bc23a0a43550b89683f1ed63e62':
Send POWER_HINT_INTERACTION on rotate.
3af80eff608b2ee2de7291f82b9163d5df4b15cf 02-Oct-2015 Tim Murray <timmurray@google.com> am 79176379: Merge "Send POWER_HINT_INTERACTION on rotate." into mnc-dr-dev

* commit '791763796e5f21e34c3ae81c1faad2a4c1a515dd':
Send POWER_HINT_INTERACTION on rotate.
1f407647d1ac45dc8b8bb7f388c8bae38cd82ea3 02-Oct-2015 Tim Murray <timmurray@google.com> Send POWER_HINT_INTERACTION on rotate.

Send a POWER_HINT_INTERACTION to improve redraw performance when the
phone is rotated.

bug 24583227

Change-Id: I1978f0dfb9a25c00ad4da5b44d10410ad7412001
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e95b0aef6d259ff9322bd9a34e36e61737844eee 30-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Improve visibility and layering of dock divider.

We adjust the visiblity of the divider now after every layout.

The divider was far too high in the priority list, based on the wrong
assumption that as a part of the system UI it needs to be constantly
visible. It should stay at the same level as applications, because it's
almost as a part of application.

Layering gets improved by having the relaunch animation receive zorder
top, just as if it was entering. The window that is being replaced fakes
this too, since it's not being animated, but should share the behavior.

Bug: 24500829

Change-Id: Iad3369a5ab6721b1bf7a94e8979dcf33e0805c7f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7a2421ddbbc3f74f670273a17e8b8449d8f97f13 24-Sep-2015 Jorim Jaggi <jjaggi@google.com> am 35f215cf: am 2d48a93f: am 98a8c7c5: am e1de9f67: Fix black Keyguard

* commit '35f215cfafcaff6f4a8283c0215431485f7382e5':
Fix black Keyguard
98a8c7c553108e6d6f6260ae5c1f05d8a6c8af10 24-Sep-2015 Jorim Jaggi <jjaggi@google.com> am e1de9f67: Fix black Keyguard

* commit 'e1de9f674575df3b17e475c4f32dd93d33e596e3':
Fix black Keyguard
e1de9f674575df3b17e475c4f32dd93d33e596e3 23-Sep-2015 Jorim Jaggi <jjaggi@google.com> Fix black Keyguard

When a window has both the flag fullscreen and the dismiss Keyguard
flag, we end up in a state where we hide the status bar window but
all other windows, because mShowingLockscreen nevers gets set
correctly. Move it up so we always set it no matter whether the
status bar window was visible.

Bug: 22875357
Change-Id: I7953fe7100cc99fe8fb7424a9b311b4630426657
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
466f3216505bd039a285881e06ead631331fe368 22-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Showing docked stack divider window.

When there is docked stack, we want to show a "handle" through which the
user will resize the docked stack. We add it from the system process,
because we want to avoid IPC calls.

Change-Id: If15fd2a0fcb7077446d1ba6c533acb3028a42039
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9e6b09121364ad507e02639d42dff970bf8eeeb6 22-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Split PhoneWindowManager.beginLayoutLw."
83dd955e52a9f5c461640c37e5535839efaa56e0 18-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Split PhoneWindowManager.beginLayoutLw.

This extracts layout of navigation bar and status bar into smaller
methods.

Change-Id: I5343e0b3b771c932adc271dfa84e0dab198cdf5f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d1ed82b902f383970810f4445d01f7e2f0ab4358 17-Sep-2015 Tim Kilbourn <tkilbourn@google.com> Remove duplicate initialization from bad merge.

Change-Id: I8059074202d0c8838a13f99095c2e8c2ff0b15e7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a85e6a445cc2631761228fde147e2eff01783574 17-Sep-2015 Bryce Lee <brycelee@google.com> am 84af8889: am d5334121: am 2f8ac2a3: Fix build due to merge of duplicate variable.

* commit '84af88899da58389d30792e717a055b8b5e24cab':
Fix build due to merge of duplicate variable.
e13fb40ecb1579ad9686f1a45fceca3c633db724 17-Sep-2015 Tim Kilbourn <tkilbourn@google.com> resolved conflicts for 0816319a to master

Change-Id: Ie89ccd479a2eccc95839c162a9b7367349d3886f
2f8ac2a35bbd81cd297d3ea3a1baaa554353e87e 17-Sep-2015 Bryce Lee <brycelee@google.com> Fix build due to merge of duplicate variable.

Change-Id: I1e8bad32b2118542408b6d8b87302861e3873d32
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a02f98239ea683b802ede31382f51eb88eda05d3 17-Sep-2015 Tim Murray <timmurray@google.com> am 952d5b33: Merge "Send power hint on fling gestures." into mnc-dr-dev

* commit '952d5b334ccdf9cab0f56673861906e59d4e9933':
Send power hint on fling gestures.
a4d22d718affbc7145d1012157feb819557b5c06 17-Sep-2015 Michael Wright <michaelwr@google.com> Send power hint on fling gestures.

Use the existing PointerEventListener infrastructure to listen for
gestures that look like flings and hint to the power system when they
happen. Since we don't actually have a bound for the fling like a
regular application would, limit them to five seconds and refresh
every time a new fling is seen until the five second time period is
up.

bug 24059298

Change-Id: I5757a1e88f2ab2ef08cccefa8221d809ae71bb6f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
35d648f3f2808ce46dab0df9f17dd759df76d6de 12-Sep-2015 Jorim Jaggi <jjaggi@google.com> am 0e950707: am 12e273fe: am f66e4979: am 84dc08a2: Dump Keyguard state in SystemUI and PhoneWindowManager

* commit '0e95070766dc499f66706c12253dda11d31ab014':
Dump Keyguard state in SystemUI and PhoneWindowManager
f66e4979c579bde5031c8e6f29e5163246fc54ee 12-Sep-2015 Jorim Jaggi <jjaggi@google.com> am 84dc08a2: Dump Keyguard state in SystemUI and PhoneWindowManager

* commit '84dc08a208eea7a4ddf043cadbb28987cf90ae22':
Dump Keyguard state in SystemUI and PhoneWindowManager
84dc08a208eea7a4ddf043cadbb28987cf90ae22 12-Sep-2015 Jorim Jaggi <jjaggi@google.com> Dump Keyguard state in SystemUI and PhoneWindowManager

Bug: 23970549
Change-Id: Iec1e8ac507268086e0e2935847eda606ea1fb700
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
00cd47a2d2147eaba031771fd7e8b6fdbf25cf46 10-Sep-2015 Jorim Jaggi <jjaggi@google.com> resolved conflicts for 0fb3f695 to master.

Change-Id: I679920313a872f8eb81cf00ffb6ffe037b8d0a3a
5a9bb9516d016549730d49cddcc2b2ee0e7a4e93 10-Sep-2015 Jorim Jaggi <jjaggi@google.com> resolved conflicts for 5d0e02b6 to cw-e-dev

Change-Id: Id974d29581304dc644659d1c470b5413d847944b
5941c98c641e64a26bf68816faf967d25cc8f256 04-Sep-2015 Adrian Roos <roosa@google.com> Add double-tap power button to open camera 1/2

Bug: 23787555
Change-Id: I052b64748f155c59fbb649b32265f559423a8845
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d6a1692ef340608101c376fa2fd87d7c189bb906 08-Sep-2015 Filip Gruszczynski <gruszczy@google.com> Refactoring of setting app starting window code.

This improves the code in following ways:
* move transferring of starting window into a separate method, so it can
be easier to understand;
* move checking of whether to display starting window from phone window
manager to window manager service; this has three benefits:
1) whole logic is in one place;
2) we don't need to schedule addition of a starting window, if we
would stop it later anyway;
3) we don't need to wait for creation of window style to decide, if a
window is floating.

Change-Id: Ibfbd87b84a7080e372211f162fa1865f8c5ab973
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9fb0b5b12c9e7acfc9890c5f2e5719dc1992d2f2 08-Sep-2015 Nick Armstrong-Crews <strongarm@google.com> am 13d2fa50: am 740cf71c: am 56ecfcce: Handle KEYCODE_SOFT_SLEEP from Ungaze.

* commit '13d2fa50b0815c63d2d289c27d8edacf1ace01eb':
Handle KEYCODE_SOFT_SLEEP from Ungaze.
dc6aa5fc53a85a3fcf98c1a01f766d9c16891765 08-Sep-2015 Nick Armstrong-Crews <strongarm@google.com> am d70377b5: am 36afc2b7: am 9b8f82a3: Merge "Revert "Handle KEYCODE_SOFT_SLEEP from Ungaze."" into cw-e-dev

* commit 'd70377b537450d03d5cdc2efb15977d48e5cfebd':
Revert "Handle KEYCODE_SOFT_SLEEP from Ungaze."
56ecfcce6c88fc80cf509effcebb124bbe0c79f8 08-Sep-2015 Nick Armstrong-Crews <strongarm@google.com> Handle KEYCODE_SOFT_SLEEP from Ungaze.

Needed for Ungaze to trigger "soft sleep" (respecting wake locks); operates by
sending new KEYCODE_SOFT_SLEEP to PhoneWindowManager, which calls
PowerManagerService's new method setUserInactiveOverride (thereby
causing immediate sleep, modulo wakelocks, upon next iteration of
PowerManagerService's main loop).

BUG: b/23589870
Change-Id: Iddafdde923605d119075e890eeda5d3fd3fd2bc7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b331bf951499396111cb47b477ac35e82c805322 08-Sep-2015 Nick Armstrong-Crews <strongarm@google.com> Revert "Handle KEYCODE_SOFT_SLEEP from Ungaze."

This reverts commit 677adf1e66ba83b8fb2c849c181303b35bd489bc.

Hiding new keycode to prevent change to public API before resubmitting.

Change-Id: Ic43273dd0c7ade1d51a36b77f363543f1df466e8
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e097d341a46a8c40c7e9e1e7e028088b7725b243 04-Sep-2015 Nick Armstrong-Crews <strongarm@google.com> am 7f37402d: am 43c4459d: am 6f0ba402: Merge "Handle KEYCODE_SOFT_SLEEP from Ungaze." into cw-e-dev

* commit '7f37402d8c5667f72c1ef02a20112d49d7a149b8':
Handle KEYCODE_SOFT_SLEEP from Ungaze.
677adf1e66ba83b8fb2c849c181303b35bd489bc 27-Aug-2015 Nick Armstrong-Crews <strongarm@google.com> Handle KEYCODE_SOFT_SLEEP from Ungaze.

Needed for Ungaze to trigger "soft sleep" (respecting wake locks); operates by
sending new KEYCODE_SOFT_SLEEP to PhoneWindowManager, which calls
PowerManagerService's new method setUserInactiveOverride (thereby
causing immediate sleep, modulo wakelocks, upon next iteration of
PowerManagerService's main loop).

BUG: b/23589870
Change-Id: I24a96bd6db8ff28674c907f2898e49c4f6140209
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7e50eba9f7f832e93f4e997c77bd217ee85b4f59 02-Sep-2015 Thanh Hai Mai <thanhhaimai@google.com> Merge "Disable recents in car mode"
6c009f5f085b567ea41775c95e8ac090c08e1deb 02-Sep-2015 Thanh Hai Mai <thanhhaimai@google.com> Disable recents in car mode

BUG: 9946472
Change-Id: I1cfe1e0da3a6fa0c3b592d81e97d90dd17b528fb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
759ab5a8fe4c0b702c7c750038c7d7b34616c2c2 01-Sep-2015 Selim Cinek <cinek@google.com> am 7f5128fd: am 406b60ac: am b8645fa7: am a7cad8e8: Merge "Fixed a bug where the secure camera would flash when rotated" into mnc-dr-dev

* commit '7f5128fda49b207b49b932eec2df22ff2ef4ef8b':
Fixed a bug where the secure camera would flash when rotated
a7cad8e8a4d698bd3880299265760f5158073e2d 31-Aug-2015 Selim Cinek <cinek@google.com> Merge "Fixed a bug where the secure camera would flash when rotated" into mnc-dr-dev
90b5e07c70ef4fe1f2b153334b09f5b7bd44507d 29-Aug-2015 Selim Cinek <cinek@google.com> Fixed a bug where the secure camera would flash when rotated

Bug: 23602571
Change-Id: I9608a004d97ad27a0f4c6da8e9d955dc644b4941
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3c2d1fd84be0ee58c26b194beeca772f30a5fe25 28-Aug-2015 Chong Zhang <chz@google.com> am 7c8eb2b9: am 52e6d458: am 430778bd: am 482635e3: Merge "Fix deadlock when updating rotation" into mnc-dr-dev

* commit '7c8eb2b9df3c0820c02421ab5ff3b11150bb9f12':
Fix deadlock when updating rotation
482635e34d0def1682ebc644db0636862994f649 28-Aug-2015 Chong Zhang <chz@google.com> Merge "Fix deadlock when updating rotation" into mnc-dr-dev
5aaa0b3880403dce0fd221a6f85bc62fd33c4e90 28-Aug-2015 Chong Zhang <chz@google.com> Fix deadlock when updating rotation

Post a runnable in MyOrientationListener.onProposedRotationChanged for
the updateRotation() so that it doesn't acquire WM lock while holding
WindowOrientationListener lock. It could cause deadlock if WM is
is performing a relayout and try to access WindowOrientationListener.

bug: 23507268
Change-Id: I5775f5a13cae0283fef64877801bf8a39dfc90a4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
143c93d49f7f9691ad37b8b036731b76f2171241 26-Aug-2015 Selim Cinek <cinek@google.com> resolved conflicts for merge of f1935575 to master

Change-Id: Ic18619bd5a81ae5172eef41bda0f8e473b6bda3f
372d1bdd54fe977c71bdaae895687c76ac35202a 14-Aug-2015 Selim Cinek <cinek@google.com> Launching the camera now from systemUI including animations

The GestureLaunchService now informs systemUI that a launch
has been requested and the systemUI, depending on its state
will launch the Camera in the correct mode, including
animations.

Bug: 22957192
Bug: 22958025
Change-Id: I815437c8bd33638245ac61a750f64af74fe3e1e3
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3014e63f08a1cb4ea02fcd9538c0c3439bb4ec53 20-Aug-2015 Clara Bayarri <clarabayarri@google.com> Merge "Hook up Ctrl + '/' to SysUI for a Keyboard Shortcuts screen"
f2debb1f9a8a166e249a456efc0b41d731c275c2 10-Jul-2015 Clara Bayarri <clarabayarri@google.com> Hook up Ctrl + '/' to SysUI for a Keyboard Shortcuts screen

This CL adds the necessary hooks between PhoneWindowManager
and SysUI to show a keyboard shortcuts screen given a specific
shortcut combination. SysUI for now just shows a Toast.

Change-Id: Icf43a81776b04a2e96a540f45b7cd3464342d679
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f13a24fa464a3d5a7253fddb67d8a31a94f37682 20-Aug-2015 Jorim Jaggi <jjaggi@google.com> am b7421d54: am e30df6fc: am 7de9fbca: am 2364af20: Merge "Save interactive/screen-on state in KeyguardServiceDelegate" into mnc-dr-dev

* commit 'b7421d5438f014f501691076cf86ac654798e6bf':
Save interactive/screen-on state in KeyguardServiceDelegate
c04960733110cac07c9aaa2e75ec5dc83e3a36f0 20-Aug-2015 Jorim Jaggi <jjaggi@google.com> Save interactive/screen-on state in KeyguardServiceDelegate

So when SystemUI/Keyguard crashes, we only call onStartedWakingUp and
onScreenTurnedOn when the device is interactive and/or the screen is
on.

Bug: 23344236
Change-Id: I0d0be91ff15d6c552304659956770ab88bb26ba4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b72d41da78948ee04b9f3de246d25de2e1df5cd1 13-Aug-2015 Alan Viverette <alanv@google.com> Merge "Allow translucent and hidden system bars when EBT is turned on"
817f3cd445b9e0ac452d32ce1ed25c541cc9dd83 13-Aug-2015 Alan Viverette <alanv@google.com> Allow translucent and hidden system bars when EBT is turned on

Bug: 21730477
Change-Id: I4fbbe3b86ef41de7d58c37e17957a885d01895e6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
80e33f12e397b5065b4bd49687b89c33c1059a5f 13-Aug-2015 Bart Sears <bsears@google.com> am 54bc30df: am a35ada48: am 3ab3ffc6: am b7ae1990: am bd29b07e: Merge "Fix Keyguard drawn timeout" into mnc-dev

* commit '54bc30df5a0211a026e5f804b3ea26dd6a626723':
Fix Keyguard drawn timeout
bd29b07eab3956796a7a09d7612e42e22616f458 13-Aug-2015 Bart Sears <bsears@google.com> Merge "Fix Keyguard drawn timeout" into mnc-dev
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
a4b51bc4fd4a3e40871fb8d77c2173f0c38bd162 11-Aug-2015 Jorim Jaggi <jjaggi@google.com> Fix Keyguard drawn timeout

The timeout for waiting for Keyguard drawn was posted at the wrong
place. If the screen was turning on but the device wasn't waking up,
like in doze mode, we didn't post the timeout, thus, if Keyguard
wouldn't notify us, we would never unblock the screen. This doesn't
really cause a user visible bug but it *could*
prevent the screen from turning on if Keyguard doesn't behave nicely.
Put it at the right place so I can sleep better.

Bug: 21855614
Change-Id: Icda31399261b4ee80c292ce09a0858b0127e2999
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.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/services/core/java/com/android/server/policy/PhoneWindowManager.java
a30d1348579d2612aab4ad0472a38465a383f5fd 06-Aug-2015 Michael Wright <michaelwr@google.com> am 9fa41b2d: am 0126d457: am 43a95cf1: am 44a14ef7: am eb7e3d7e: Merge "Don\'t dispatch when non-interactive and the display is off." into mnc-dev

* commit '9fa41b2dcb90a406a79f7b6d513eb43eb5f19197':
Don't dispatch when non-interactive and the display is off.
2ccf0c8e636fd3be75c3a07f4cf60d72a4cfaa28 05-Aug-2015 Michael Wright <michaelwr@google.com> Don't dispatch when non-interactive and the display is off.

We generally dispatch while the display is off and we're dozing,
under the assumption that the dozing window is controlling the
display state and wants the events as they come in. Unfortunately,
it's possible that we're dozing but something other than the dozing
component has focus, which leads to dropped and cancelled events.
This was preventing media events from being propogated to the media
session under a number of scenarios, so for now we'll just prevent
dispatching entirely while the display is off and the device is in a
non-interactive state. Going forward we should figure out a better
solution so that doze components can continue to receiving input
events throughout their lifecycle, regardless of the display state.

Bug: 22422588
Change-Id: Ia38bd81245234743e84548841d6478f75a6b8775
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
59107156d8da898fd08d9e082d847b758551744d 30-Jul-2015 Jorim Jaggi <jjaggi@google.com> am c778b9c5: am baec89e0: am 647ef8c8: am de8b10ee: am 95c6daed: Fix doze mode

* commit 'c778b9c5a55389cd2d2c34f16d26fc7755807a7a':
Fix doze mode
95c6daed397f658039184cf83755c245fb4b5dcd 30-Jul-2015 Jorim Jaggi <jjaggi@google.com> Fix doze mode

Make sure to reset the keyguard drawn state in the correct place,
so we don't return early in finishKeyguardDrawn() because
mKeyguardDrawComplete is still true.

Bug: 22808662
Change-Id: I7e18e91c412c6cac7fe253837949602f76b7f270
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0f4fa602339ab2f78072df2f031834094cf46aa2 30-Jul-2015 Maurice Lam <yukl@google.com> am 8abee2a6: am 103e96c5: am 34f86392: am 4c927895: am 75d958c4: Merge "Disable launching assist during setup" into mnc-dev

* commit '8abee2a698742045131baa9f561d36399b31b508':
Disable launching assist during setup
75d958c40e67c338d65df185ce1f09b164c58d49 29-Jul-2015 Maurice Lam <yukl@google.com> Merge "Disable launching assist during setup" into mnc-dev
e1d440be81e518450c0c013711926f570b928738 29-Jul-2015 Jorim Jaggi <jjaggi@google.com> am 7580672f: am ce58fa95: am fed9b281: am 353fe1c6: am 0d210f63: Animation for touch, wake and unlock

* commit '7580672fa8455dccc78806dcd878a5e191a62a45':
Animation for touch, wake and unlock
0d210f6395072db4a4c53d4cb8fac4a59a3965b4 10-Jul-2015 Jorim Jaggi <jjaggi@google.com> Animation for touch, wake and unlock

- Add callback to inform SysUI when the screen has been unblocked
and turned on.
- Cleanup inconsistent messaging about device interactive/screen on
and off.
- Add callbacks to inform SysUI about screen states
- Implement a quick fade for the scrim after touch, wake, and unlock.
First, start with a black scrim on top of everything, and then fade
it out.
- Make sure we play the normal unlock animation when device is pulsing
- Override navigation bar animations for touch, wake and unlock: Fade
in the same manner as the scrim.

Bug: 22571198
Bug: 21855614
Change-Id: I8ff08d72cced1e0f03c78d71ff710d8a4f6b848c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d6e7bab0e873478ebed89f6d421cb3160764a643 25-Jul-2015 Jorim Jaggi <jjaggi@google.com> am 9fd390c6: am 5efe21e4: am 5b65bb1b: am b6c6e45a: am f3255489: Fix ambient display

* commit '9fd390c6b998eea2795a20ef0ff9f88018e03a4f':
Fix ambient display
f325548992d449a2da564216191edb5ad2773bfd 24-Jul-2015 Jorim Jaggi <jjaggi@google.com> Fix ambient display

Due to a refactoring for touch, wake and unlock for fingerprint
devices PhoneWindowManager now waits for Keyguard to draw its first
frame in all cases, including when screen turns on for pulsing.
However, since in this case the device is not awake, we need to check
for screen on instead of awakeness when proceeding with the wake-up
sequence. Without this change, screen on was blocked forever in the
pulsing case.

Bug: 22605235
Change-Id: Ib6089fd14b673e62347f2c9108d9a6783caa26b7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
39d1381ed3c6abfa8600ab19b59c141456fb0f12 24-Jul-2015 Maurice Lam <yukl@google.com> Disable launching assist during setup

Check for user_setup_complete before launching the assist layer.

Bug: 22694702
Change-Id: I2509c2aa081002dced192a074716fb23f91dde86
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d2e7e355d836f18adcdb44db9c1931d1c3663ef1 23-Jul-2015 Jun Mukai <mukai@google.com> Allow sticky immersive mode by mouse hover.

When the app enters into the immersive mode, swipe down from the
top edge makes immersive_sticky (showing transient status bar),
but this is hardly done by mouse. As is discussed in the bug,
we want to make the same effect for mouse hover at the very top
line of the screen for 500msec.

Same applied to navigation bar with the bottom of the screen.

Bug: 20093789
Change-Id: If4484b5bcee567ea89c28ed06807564cb8f9ccef
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
740452e8756cb7f51ed185c3906a5ca61b8fcdd4 09-Jul-2015 Jorim Jaggi <jjaggi@google.com> Touch, wake and unlock

- Add onFingerprintAcquired, so Keyguard can grab a wakelock to prevent
the device from sleeping.
- If we get a successful fingerprint, wake the device up, immediately
dismiss the keyguard and tell PWM that we kicked off our frame that
will represent the correct state.
- PWM then waits for this frame to be drawn, and then turns on the
screen, which results in unlocking directly to the previsouly
opened app.

Bug: 21855614
Change-Id: I5f43df17fa5e4e9c6a6392eef4a4590b07df4f96
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
6893aeee48adc1f8b8aebde5e21b7e1294acfaf2 17-Jul-2015 Adrian Roos <roosa@google.com> am 5536bb48: Merge "Fix stuck scrim on keyguard-less devices" into mnc-dev

* commit '5536bb48b2829f04f9a8258bfe698e5e4a26f234':
Fix stuck scrim on keyguard-less devices
5536bb48b2829f04f9a8258bfe698e5e4a26f234 17-Jul-2015 Adrian Roos <roosa@google.com> Merge "Fix stuck scrim on keyguard-less devices" into mnc-dev
da93454bfa7c46ba5607c74252c458b48a473e9d 16-Jul-2015 Billy Lau <billylau@google.com> am 008409a2: Merge "Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW..." into mnc-dev

* commit '008409a2ea1feed095d53ce51429e4fed964c50c':
Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW...
008409a2ea1feed095d53ce51429e4fed964c50c 16-Jul-2015 Billy Lau <billylau@google.com> Merge "Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW..." into mnc-dev
060275ffc7fbfc72b19871f7dd7aefb61a81a1fc 15-Jul-2015 Billy Lau <billylau@google.com> Bug: 21589105 Rescoping SYSTEM_ALERT_WINDOW...

AppOpsManager:
Changed the default mode for SYSTEM_ALERT_WINDOW to MODE_DEFAULT instead of
MODE_ALLOWED. Otherwise, an app that did not declare for this permission will
actually be allowed to perform OP_SYSTEM_ALERT_WINDOW, which is undesirable.
This change also allows callers to make their own decision based on the
current policy (M vs pre-M apps).

policy/PhoneWindowManager:
Added additional checks that will handle MODE_DEFAULT - this happens when an app
is newly installed but not yet configured.

wm/WindowManagerService:
Enriched some checks to include the treatment of MODE_DEFAULT - this will allow
pre-M apps uninterupted capability to draw on top of other apps.

Change-Id: I8de77730e158c97587427820cfba721bd5607bea
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c7b0435cc709c328da8e2b515ea04c8bc40d1094 15-Jul-2015 Jim Miller <jaggies@google.com> resolved conflicts for merge of 1d4247c4 to mnc-dr-dev

Change-Id: I057c529dcd5d48e0dcf256a9d096c5d8b815892a
280a64e793d081847c5dcea23ed9be38aa5332d2 13-Jul-2015 Dianne Hackborn <hackbod@google.com> Improve tracking of screen on reasons.

- New screen on app op to record the last time each app has
caused the screen to be turned on.
- New battery stats event that tells us the reason the screen
has been asked to turn on.
- Propagate out power manager API to specify the reason a caller
is asking to have the screen turned on.

Note that currently the window flag to turn the screen on bypasses
much of this because it is being handled in the window manager by
just directly telling the power manager to turn the screen on. To
make this better we need a new API where it can specify who it is
calling the API for.

Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
4cfdcf5b0551e5656ea379c428e78b812c2e5cbe 09-Jul-2015 Jorim Jaggi <jjaggi@google.com> Touch, wake and unlock

- Add onFingerprintAcquired, so Keyguard can grab a wakelock to prevent
the device from sleeping.
- If we get a successful fingerprint, wake the device up, immediately
dismiss the keyguard and tell PWM that we kicked off our frame that
will represent the correct state.
- PWM then waits for this frame to be drawn, and then turns on the
screen, which results in unlocking directly to the previsouly
opened app.

Bug: 21855614
Change-Id: I0c43bcc9d334b509632704fb0c123ab3351edff2
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3542f7de3333f57bf0d01d8cfbd91a2a42038bf9 14-Jul-2015 Adrian Roos <roosa@google.com> Fix stuck scrim on keyguard-less devices

Bug: 22413062
Change-Id: I6da6438ec54d33a1aa82d5575eb29e9bc4dbdd58
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
e249eb3a6f33ee945113a8f11e8382e70c4e066f 14-Jul-2015 Jinsuk Kim <jinsukkim@google.com> Merge "Perform One touch play upon pressing home key" into mnc-dev
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
e601b712b10323d0c0a737567cf6798a0d20a219 07-Jul-2015 Jinsuk Kim <jinsukkim@google.com> Perform One touch play upon pressing home key

Power on TV (optional) and switch HDMI input when home key is pressed
on a device with HDMI-out port (playback device).

Bug: 22204515
Change-Id: Ie1714e9bb066fedc618ee176d1a2bd1572393a6e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d40c423b1cdccd61ed411b0b9e3fbefd47e99f9c 01-Jul-2015 Filip Gruszczynski <gruszczy@google.com> Merge "resolved conflicts for merge of 300ccf4a to mnc-dev" into mnc-dev
63c4a7185cf1b03ba45cc3147e87270502334387 01-Jul-2015 Yohei Yukawa <yukawa@google.com> Merge "Reland "Fixed constant window switching on lock screen..."" into mnc-dev
d1a092218b4b40cfd53a643e0ae01095815f4b30 01-Jul-2015 Yohei Yukawa <yukawa@google.com> Reland "Fixed constant window switching on lock screen..."

This is a manual reland of I3680256d41793f62def42fda00e26db1dcc9,
which was certainly merged into lmp-mr1-dev then auto-merged into
master but silently lost there for unknown reasons when
I8c42a1e6091b0fe1253e90265ac248087e was auto-merged into master.

Changes in WindowAnimator.java was already covered by
I2933eaf0ab55fe31cb382c46c411033e33a756e0 so this CL does not
include that change.

Bug: 18021493
Bug: 22158649
Change-Id: Ib1bf9f5bef44d0400230afc32231f7d1f3a1c98b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2987f616faca534a792686a53304c9932634310c 01-Jul-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 300ccf4a to mnc-dev

Change-Id: Ia315e314bfde0c066a2c25d93f8cbdc71fee0a14
3ae447e8bb0bb5375e696e33331ef959db7e89ad 30-Jun-2015 Bryce Lee <brycelee@google.com> Merge commit '91d2cbf4' into manualmerge

Change-Id: Id018e65bdbd67f040af13a07207cac33a4a2a158
9bb290bcc36fe11f96312feb40aaf3323a96ebae 29-Jun-2015 Chris Wren <cwren@android.com> add more power manager metrics

dream start/stop
dream duration
screen timeout setting

Bug: 21893298
Change-Id: I783f72953fc40c0d276a7845daa048e2fe0db78c
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f62f4c94a36f5c2f7ad3c70316dc585ea3fd721a 30-Jun-2015 Billy Lau <billylau@google.com> Merge "Bug: 21589105 Rescoping the SYSTEM_ALERT_WINDOW permission to an explicit toggle to be manually enabled in Settings." into mnc-dev
cc6366dde1776d40ab58f2475c4e1f8993253d7a 29-Jun-2015 tiger_huang <tiger_huang@htc.com> Use the correct lock to protect members in PolicyControl

Members in PolicyControl can be accessed by multiple threads via the
public functions called by PhoneWindowManager. Most of the functions
are called with the window-manager-lock held, but reloadFromSetting()
is an exception.

In this patch, we acquire the window-manager-lock before calling
reloadFromSetting() to ensure accessing the members with the same
lock held.

Change-Id: I54ac5cab2a2d74c568fa96145f7a6741c6d99e36
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cbe540f94691b595ca2eaede2871d885c38a845c 25-Jun-2015 Billy Lau <billylau@google.com> Bug: 21589105 Rescoping the SYSTEM_ALERT_WINDOW permission to an explicit toggle
to be manually enabled in Settings.

Raised the protection level of SYSTEM_ALERT_WINDOW from dangerous to
system|signature|appop. Added a new API in Settings for developers to invoke
the main configuration setting. Also added a new metrics in MetricsLogger.
Finally, also made changes to PhoneWindowManager to check the permission to draw
overlay properly.

Change-Id: I4a073e6f038b8b8d2fa5bd6ad60abda496be9701
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d389684beaf5be3afbb78d11ffd32f07eaabee58 24-Jun-2015 Bryce Lee <brycelee@google.com> resolved conflicts for merge of 91d2cbf4 to mnc-dev

Change-Id: I1c7e2999483a7959630844ecd20f5f37b7896aae
82e595fd6e3a9438b090106c226bb2f8bb2a6254 22-Jun-2015 John Spurlock <jspurlock@google.com> Merge "Volume: Force focused state to disambig multiple sliders." into mnc-dev
67a0f850a4d3358f3e1168bc84012edf96139ac2 15-Jun-2015 John Spurlock <jspurlock@google.com> Volume: Force focused state to disambig multiple sliders.

And fix volume policy so that a focused slider at the top
of the screen does not cause the window to pan.

Bug: 21476764
Change-Id: I4a52270ca5ecf9b9bd6e787ef580ecbd32e62625
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0348ba2e2303d9dce57a6b5d19cc47ecc5089afe 19-Jun-2015 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #20494208: Go out of device idle when headset button is pressed" into mnc-dev
b6683c428698105f715985a96066192aa62e9f53 19-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #20494208: Go out of device idle when headset button is pressed

Rework how we record active transitions in battery stats to be
more general, and add an API that others can call in to
DeviceIdleController to request that we go out of idle mode.
use this for VOICE_SEARCH_HANDS_FREE.

Change-Id: Ie58de60e63036a4142881283835961fbcceec892
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2f280d06396d7b8234197a3b1a35d5319f7d6951 18-Jun-2015 Stefan Kuhne <skuhne@google.com> Fixing voice panel centering issues in landscape on phone

The new assist panel (long press on home) was not centered in landscape
mode on phones. This was caused by ignoring the stable insets in the
PhoneWindowManager.

bug: 21708971
Change-Id: I97a968a41c2966b09eba496fbe57c840affdf9ec
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9326dc1407e3942c35b197b7e0287ea4a50a56d8 12-Jun-2015 Stefan Kuhne <skuhne@google.com> Removing screen artifacts afer orientation change in sleep mode

Avoiding screen artifacts upon rotation change in sleep mode. This will
be done by postponing orientation changes until the entire UI got drawn.

Bug: 16849724
Change-Id: Ib1d818258d12f5c1909de4558af46aec27e29c75
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
48d1b14b7b54ae1491e7d9d5fdd9be8906c19a3c 11-Jun-2015 Jeff Brown <jeffbrown@google.com> Pause activities when the screen is off.

Bug: 19948628
Change-Id: I90923605d50f4ee381da4e05117879554e0a1dee
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
159f558a39d200e08e06245d64ec1df9a08e7d93 08-Jun-2015 Tim Kilbourn <tkilbourn@google.com> Merge "Pass an args bundle to launchAssistAction." into mnc-dev
e1f3214e72b63ed7cbe368005622055f80da0e0d 08-Jun-2015 Mady Mellor <madym@google.com> Merge "Change stylus button press to context click in View - API review feedback" into mnc-dev
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
b0c673b50e75cb9d931156d4e09e9628ba3caec1 05-Jun-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of f6a04305 to mnc-dev

Change-Id: I92e666bfd6d8ad051bdee7dce5712b9cb8e6a01d
e860891b1a7d4c1b581f294fa5831999caac6506 05-Jun-2015 Mady Mellor <madym@google.com> Change stylus button press to context click in View - API review feedback

Updates all references in View's onStylusButtonPress to onContextClick
as per API review feedback.

Additionally listens for mouse right clicks and calls the onContextClick
method for these as well for the stylus button press.

Bug: 21572278
Change-Id: I5c1ee8c8f23a77d7c677b86356e89d0e4fc40056
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d5169157408eeb8d5612b2c0272d6458ad4020de 04-Jun-2015 Nick Vaccaro <nvaccaro@google.com> Merge "Wait for KEY_SLEEP UP event before calling goToSleep()" into mnc-dev
461829d607b32ee492b6123043ae4232ed82ae93 03-Jun-2015 Adrian Roos <roosa@google.com> Prevent windows below the keyguard from showing

Fixes a bug where windows below the lock screen
could become visible if a SHOW_WHEN_LOCKED activity
hides the status bar.

Bug: 21450145
Change-Id: Ie660394cb96d7e6839bd4fb7c2729133bac2dfc5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.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/services/core/java/com/android/server/policy/PhoneWindowManager.java
5b9b66c73c80697c1d3694a2d4ee975e409bd89d 02-Jun-2015 Olawale Ogunwale <ogunwale@google.com> Merge "Should reset mDismissKeyguard on keyguard secure change" into mnc-dev
1e47a8e096fc28dcab0a55bc4f2e6b747bfb1a07 01-Jun-2015 Jorim Jaggi <jjaggi@google.com> Merge "Cleanup Keyguard handling when turning off screen" into mnc-dev
99bcc3eee23ed8bd15bd108d068d6f9f694e4393 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev
e785ffa059dcb3bcff242ae4c89cdb43b081dcb2 12-May-2015 tingna_sung <tingna_sung@htc.com> Should reset mDismissKeyguard on keyguard secure change

If user sets a non-secure lock screen, launch an activity which
appends window flag FLAG_DISMISS_KEYGUARD, then insert a PIN lock
SIM card, activity window will become black screen.

This is because mDismissKeyguard keeps on DISMISS_KEYGUARD_CONTINUE
when keyguard secure changes from non-secure to secure like in the
insert PIN lock SIM card case. If mDismissKeyguard is
DISMISS_KEYGUARD_CONTINUE and keyguard is secure, there is no chance
to launch keyguard unlock window anymore.

This patch handles the use case that to reset mDismissKeyguard to a
new cycle from DISMISS_KEYGUARD_START to DISMISS_KEYGUARD_CONTINUE
again once keyguard secure state change suddenly to let keyguard
window has chance to be launched.

https://code.google.com/p/android/issues/detail?id=78806

Change-Id: I0d4fd0b9bdf7d0a39f35427bfd4e1b928d9bca6b
Signed-off-by: tingna_sung <tingna_sung@htc.com>

Conflicts:
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d175b6cfe0b35dfe251cc9315aacb048bf6e54c5 28-May-2015 Jorim Jaggi <jjaggi@google.com> Cleanup Keyguard handling when turning off screen

Before, Keyguard was shown whenever PhoneWindowManager went to sleep.
However, this was too early on some devices, and too late on others.
Now, the callbacks are split up into two phases: startedGoingToSleep
and finishedGoingToSleep. In the first callback, we decide what to
do and play the lock sound if necessary. In the second callback, we
actually show the Keyguard, or reset its state necessary, so it
doesn't interfere with the screen off animation.

Bug: 17929748
Bug: 20782303
Change-Id: I4c4406595b07b7589d64f380cd3fa96bed3d20ee
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cb81d183672a3d9858ade10a997990c5d66a1be3 30-May-2015 Jeff Brown <jeffbrown@google.com> Merge "Tell PhoneWindowManager when we start/finish interactive changes." into mnc-dev
416c49c4049f572134273e228d7988904a51b990 27-May-2015 Jeff Brown <jeffbrown@google.com> Tell PhoneWindowManager when we start/finish interactive changes.

Added some new callbacks that can be used to more precisely trigger
certain behaviors that need to happen around the time the device
is put to sleep and locked.

Fixed an issue where the going to sleep signal might be sent too
early on devices that don't support ambient mode due to the extra
wakefulness change between DOZING and ASLEEP. We are now track
the early / late interactive change work separately from the rest.

Bug: 21375811
Change-Id: I95387195e216ae92a6e45485bd1bd362e41aa45a
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b85e1ecfdf410b6aec7b6f93e3932b0aa32fba06 30-May-2015 Adrian Roos <roosa@google.com> Fix broken transition to secure apps when relaunching

Previously, the logic for keeping occluded mode during transitions
would also trigger when transitioning from the lockscreen to a
SHOW_WHEN_LOCKED activity that was already on-screen, which would
then prematurely clear the occluded mode and break the launch
transition.

With the fix, the lockscreen must already be occluded before the
keep-occluded-during-transitions logic is triggered.

Bug: 21525170
Change-Id: I1d9ad95b2dd0728af7986f09adb67a617cc62cb2
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7c9d94404fe9196e1f75fd56ff55624343c88ebd 28-May-2015 Jorim Jaggi <jjaggi@google.com> Merge "Fix status bar window IME flags & layout" into mnc-dev
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/services/core/java/com/android/server/policy/PhoneWindowManager.java
aa8061448ec5a0e3cef9685f4186fc94e09eb78e 21-May-2015 Jorim Jaggi <jjaggi@google.com> Fix status bar window IME flags & layout

When bouncer was showing, but keyguard was occluded, staus bar
window couldn't receive input, and thus the IME window was placed
below the status bar window. In addition to that, fix the layout when
IME is showing up on the bouncer screen.

Bug: 19969474
Change-Id: I38d21647801b57608d49c3f525d4840e6ba58296
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d6623618b28906d058ac61623e11853ebe9ad1de 23-May-2015 Selim Cinek <cinek@google.com> Fixed logspam and handling subwindows with the input consumer

Bug: 21402648
Change-Id: I4c1c73487dfd19ba452ff2077d8541547f149c3b
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.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/services/core/java/com/android/server/policy/PhoneWindowManager.java
d02ec5989dd93df1d6ab45ad9f280730553f11e6 22-May-2015 Adrian Roos <roosa@google.com> Merge "Request transient bars after panic" into mnc-dev
91e5b0f598f19499e55dcb8f0243b430e3c1ee4f 22-May-2015 Filip Gruszczynski <gruszczy@google.com> Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-dev
ddc8b278783340c80d5bf881b4fa834a68576dfa 22-May-2015 Adrian Roos <roosa@google.com> Request transient bars after panic

Bug: 19282730
Change-Id: Ib621a837ba06847a02333e1786ea50e5d854c7d7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
7d85ea93e951dc1dd82e7879e0399c56d116f231 21-May-2015 Jorim Jaggi <jjaggi@google.com> Always tell Keyguard about occluded state

If there was a window with FLAG_DISMISS_KEYGUARD first, when the
device was unlocked, mWinDismissingKeyguard was set to that window.

Now, a window with FLAG_SHOW_WHEN_LOCKED came on top, so we set the
Keyguard as occluded, but we didn't reset the window that is
dismissing Keyguard.

After that, the old window with FLAG_DISMISS_KEYGUARD was the focused
window again. However, since we didn't reset mWinDismissingKeyguard,
we ended up with DISMISS_KEYGUARD_CONTINUE, and lockscreen was not
occluded anymore. However, we never really told Keyguard about it
because DISMISS_KEYGUARD_CONTINUE was set instead of
DISMISS_KEYGUARD_START.

The first fix of this bug is to always tell Keyguard about the
current occluded state. The second fix is to reset
mWinDismissingKeyguard in case a window SHOW_WHEN_LOCKED comes on top.

Bug: 20102975
Change-Id: I7c778df09a1e393b9eeaf51fd2013012cb40fea9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
f98702eae04e239670e8b882d53c974d4b56e291 21-May-2015 Selim Cinek <cinek@google.com> Protecting against the correct flag for the input consumer

Also allow hiding the navbar if immersive or immersivesticky.

Bug: 21089476
Change-Id: I540e668746056a0e4bb077898792afd225e4e19e
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.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
f83e824216435e45f36a3587e269888f791b2a01 20-May-2015 Selim Cinek <cinek@google.com> Fixed that touches where incorrectly consumed when fullscreen

The fake window that was added when View.SYSTEM_UI_FULL_SCREEN was
set consumed all touches, even those going to the SystemUI and not
just those of windows below. The input consumer is now correctly
positioned in the window order to only capture the right touches.
Clicks to the volume panel and the heads up now correctly go to the
right place instead of just unhiding the SystemUI bars.

Bug: 21089476
Change-Id: Ib53dfc0b33b70084ca607d0f044db30b6e6c91d6
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
01f280d376218c5a007fc29f70b876375ad24204 19-May-2015 Adam Powell <adamp@google.com> Migrate uses of config_windowIsRound to Configuration.isScreenRound

Move existing code that previously relied on config_windowIsRound to
use the new Configuration.isScreenRound() method. Also move the system
property override for emulators over to the initial setup of a Display
so that the configuration property is consistent with existing
expectations.

Remove config_windowIsRound from symbols.xml. The symbol now only
exists as a default value redirect for overlays already configured to
supply this value.

Change-Id: I24e6564030a6051c3ac7262868983b43e13eee65
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b593a814519e977fffd43eda1ba2be4d4efe1fd1 15-May-2015 Nick Vaccaro <nvaccaro@google.com> Wait for KEY_SLEEP UP event before calling goToSleep()

Calling goToSleep() on the KEY_SLEEP DOWN event causes a race
condition with the touch driver when the KEY_SLEEP event is generated
via a palm press if the touch controller is told to go into
AMBIENT_ON mode (touch controller goes into suspend mode) while the
user's palm is still on the touch panel. If touch controller gets
into suspend mode before user removes their palm, the act of removing
the palm from the screen will cause the touch controller to generate a
wake event and the device will "wake back up" into interactive mode.

Waiting for the KEY_SLEEP UP event before putting the device to sleep
assures palm is off the panel and thus removes this race case.

Bug: 19951365
Change-Id: Id4e3313caa264f43e37994ed37015de87b8ff662
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
03fdca1b29aff07583b7764b7b359cbbfc58e577 08-May-2015 Selim Cinek <cinek@google.com> Merge "Fixed a bug where the heads-up would not show when full screen" into mnc-dev
4a4a2bddc48a33cbaa49a8844b9fd36e2fc5e219 07-May-2015 Selim Cinek <cinek@google.com> Fixed a bug where the heads-up would not show when full screen

Bug: 20728541
Change-Id: I74bc74c4936b003a4c0c37b7c7da2d1fa138c077
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.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/services/core/java/com/android/server/policy/PhoneWindowManager.java
d274400205d054010e60ddd69f1535bedf41d96b 01-May-2015 Mady Mellor <madym@google.com> resolved conflicts for merge of 04f2fe39 to master

Change-Id: I9cd9efb3ead33cef9a0de95417d71d535cbc1bce
e82067b57595a2bce656e5ba3a9bcf19048f2f25 30-Apr-2015 Mady Mellor <madym@google.com> Add onStylusButtonPress listener to View

The gesture is: stylus touching screen + button pressed, the event
is recognized when the button is pressed, not when it's released.
It can be pressed during DOWN or MOVE.

If the stylus touch + press button is occurring longpress cannot
occur and vice versa. Also adds the haptic feedback and accessibility
bits specific to the new gesture.

Bug: 19620479
Change-Id: Ibc4654978ef39e7b4251d17636453d90f3bf622d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d21b3c8881a105295bdc8d52978129b53feea33d 23-Apr-2015 Jun Mukai <mukai@google.com> Expand the notification panel by Meta-N.

Bug: 16351826
Change-Id: Ib33f2a3fee385ecb44e1e331e34dd9b2d6dee4aa
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
602c68e4ffa1d17b2032c0e05c5d4d4dc8795adf 25-Apr-2015 Adrian Roos <roosa@google.com> Smooth transitions between SHOW_WHEN_LOCKED activities

Bug: 12536117
Change-Id: Ia5f96e49587661440ae31fba17c42b2e3a9557fb
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
a93311f91730be33c734689c6dfbbcf7fd12d6d7 21-Apr-2015 Jeff Brown <jeffbrown@google.com> Merge "Make activity manager sleep top activity when dreaming."
c5e73bf9f8a3434571b407f0f1abd701a8e69131 21-Apr-2015 Craig Mautner <cmautner@google.com> am da506ffa: am 14818725: am 80f99121: Merge "Prevent infinite layout and wallpaper flashing"

* commit 'da506ffabadd551241e23aecf08e378e7d0f30b1':
Prevent infinite layout and wallpaper flashing
061ea99546fbba1da86094518992cf6b7a125278 18-Apr-2015 Jeff Brown <jeffbrown@google.com> Make activity manager sleep top activity when dreaming.

Added the concept of a sleep token to represent a demand to sleep.
We grab this token whenever a dream window is visible.

This change also deletes a special condition in shouldSleepLocked()
which would tend to keep activities running when the lock screen
was shown unless they had previously been sleeping. I believe this
condition is no longer necessary and the policy is much simpler
without it. Let's see if anything breaks.

NOTE: This can currently only be used within the system server process
but it might make sense to move it to IActivityManager (guarded by
DEVICE_POWER permission) so that keyguard can use it. If we added
a callback on release to inform the client that the underlying activity
has finished drawing then we could untangle a bunch of keyguard
specific logic.

Bug: 18866521
Change-Id: I84b2118f5b990a71a1647d1cee536ad3d99f3a24
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
0a4dc2258fa8216920e1a0b83cbf7d3729386e2f 14-Apr-2015 Wale Ogunwale <ogunwale@google.com> Added TYPE_APPLICATION_ABOVE_SUB_PANEL window type.

TYPE_APPLICATION_ABOVE_SUB_PANEL will be displayed on top of their
attached window and any TYPE_APPLICATION_SUB_PANEL panels.

Bug: 20135562
Change-Id: I711de3c19c01432c44de205bf09934a8b23b53fd
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
662ed801add5c0cc6ba35238d46494344f086dac 10-Apr-2015 Bryce Lee <brycelee@google.com> am e0233e7e: am 73b56873: am eccaf729: Allow going to home action to work for SHORT_PRESS_POWER_GO_HOME with keyguard enabled.

* commit 'e0233e7e1162ce3e699d6eb6648e82d1b403e51e':
Allow going to home action to work for SHORT_PRESS_POWER_GO_HOME with keyguard enabled.
2fdeeabe78b0f54f3163b1b3741ac813828b3511 02-Apr-2015 Jorim Jaggi <jjaggi@google.com> Implement new assist gesture and motion

Change-Id: Ic8ba18c200058062f4d38ac4226d3516af3d3df0
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
225d3b5449d29b43e619d8538d024305f6e81ba9 01-Apr-2015 Jorim Jaggi <jjaggi@google.com> Add more internal API's for assist

- When starting a voice interaction session from SysUI, a callback
can be passed to know when voice interaction has successfully started
- Add a new window type for the voice interaction starting window,
which resides behind the voice interaction layer.
- SystemUI now also inspects the voice interaction service to get the
logo asset for the starting window.
- Make VoiceInteractionSession window fullscreen, to accomodate for
the visuals.

Change-Id: If8c3c445e8b39841f48e8d153e6d1ba81e447286
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
2ed3e5fba6f7d1161b4702e13e01b040701495cf 02-Apr-2015 Bryce Lee <brycelee@google.com> am d7e349e8: am 7eeaad24: am 7a1454fe: Merge "Do not use the status bar as the system decor layer if it is not visible." into lmp-mr1-modular-dev

* commit 'd7e349e8cbfc290f1cbbf099b0b9c76e545f5357':
Do not use the status bar as the system decor layer if it is not visible.
988e3a570f2b7d709636055a1fe63b1e22702c5c 31-Mar-2015 Adrian Roos <roosa@google.com> Merge "Prevent sensor induced rotations while screen is touched"
93f724b04ef83aae7ab6ce97a9dc890d0c8c8b47 24-Mar-2015 Craig Mautner <cmautner@google.com> Merge "Recalculate input method top edge."
4774f6a4e4c1aeb682653da5ed301e195abab54a 23-Mar-2015 Craig Mautner <cmautner@google.com> Recalculate input method top edge.

The bottom edge of an input method target window is set using the top
edge of the input method window. A switch from using the input
method's content frame's top edge to its display frame's top edge
(ag/634725) caused the underlying window to be obscured. This fix uses
the lower of the two frames to set the bottom edge of the target
window.

Fixes bug 19434816.

Change-Id: I5fe73fbe8a432b24a12c030f029cdfcd55e23274
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9fc0b6fb1fd30bade0c5249f4368a69218e128bf 19-Mar-2015 Bryce Lee <brycelee@google.com> am b45d3926: am 8320cf2d: Merge "Fix wrong intent being passed in PhoneWindowManager." into lmp-mr1-modular-dev

* commit 'b45d3926f327948c486c92ddc7fdb97dbc98e401':
Fix wrong intent being passed in PhoneWindowManager.
8b1c27c5abd569664566ccdb84f772aeaa962ddd 19-Mar-2015 Bart Sears <bsears@google.com> am f5353e9d: am 91281bbd: resolved conflicts for merge of cc86bc0c to lmp-mr1-modular-dev

* commit 'f5353e9dda15fe49023083ec7ca2131feed7787d':
Prevent activities from being started during setup wizard.
d799f70187c3c91a8d63a4230cc290966b8a462f 17-Mar-2015 John Spurlock <jspurlock@google.com> Merge "Audio: Flag volume adjustments from hardware keys."
a483a1d85e526202613c9b7354bbced9969cbfe0 17-Mar-2015 Filip Gruszczynski <gruszczy@google.com> am 81c47fc2: am 86318d76: Merge "Option for going home when going to sleep for devices without physical button." into lmp-mr1-modular-dev

* commit '81c47fc23a0a15dddf37d96d28305e8b5e5ca2da':
Option for going home when going to sleep for devices without physical button.
b94f2d6cad92c4f6ad184920e06a260d87eb3b6a 17-Mar-2015 John Spurlock <jspurlock@google.com> Audio: Flag volume adjustments from hardware keys.

Bug: 19793279
Change-Id: If20d70c13c9e7d1f8a6b31e0069564073d30e2bc
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
3595be4d19caaa7ddfbff0b979d135aaf5ac20b1 05-Mar-2015 Adrian Roos <roosa@google.com> Prevent sensor induced rotations while screen is touched

Bug: 19408285
Change-Id: Idadacc4cfb0cf41477155dc837297bacc3533ba5
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
9087433753a5068819dcd3e86bdc2cce82bb8040 10-Mar-2015 John Spurlock <jspurlock@google.com> AudioService: Write base stream volume changes to the event log.

- Add a new volume_changed event, reported at the stream level.
- Only include changes to base streams (no aliases).
- Include the caller for each change. A caller is either:
- a pkg name (for external calls or known media sessions)
- a system server class's log tag (for internal calls,
disambiguates "android")

Bug: 19599935
Change-Id: Ia61b68ff1e7e2907a24972790ec052bfe099e665
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
c12569110d558e584fb9074dbe0c1aaf79ccdcd6 11-Mar-2015 Mark Renouf <mrenouf@google.com> resolved conflicts for merge of 91239a0b to master

Change-Id: Ib30f0631278602f0363181021f1ad364e4ec2f8d
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
d3b28408d1b9d36c27e4d1cfafe8c3097579961b 09-Mar-2015 Bryce Lee <brycelee@google.com> am 168d0ade: am 1e53b98c: Merge "Allow press and hold from non-interactive." into lmp-mr1-modular-dev

* commit '168d0ade0cb5a733c83d7dcfdf0a0efa3250cb16':
Allow press and hold from non-interactive.
75328b703f8f83fdd62f11105ecd61df2ebe4420 04-Mar-2015 John Spurlock <jspurlock@google.com> Merge "Audio: Remove the concept of master volume."
ee5ad729b90deff435f9875337cbc434be4f8fe7 03-Mar-2015 John Spurlock <jspurlock@google.com> Audio: Remove the concept of master volume.

- Remove two config resources (use master volume, and volume ramp).
- Remove master volume adjustments / getters / intents.
- Retain @hidden setMasterMute, needed for device admin
- Remove master volume logic in AudioService.
- Remove master volume logic in VolumePanel.
- Rename "getMasterStreamType" to "getUiSoundsStreamType" to avoid confusion.

Bug: 19582978
Change-Id: Id02c8fa4898cff3b913147f5ac1b4038e2e7cc24
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
62b65e4a8f058787eb49ec1630dfca2d9cd2b751 25-Feb-2015 Adrian Roos <roosa@google.com> Update immersive cling visuals

Also enables the swipe from top gesture for revealing
the navigation bar, even if the status bar is visible.

Bug: 19282730
Change-Id: I7b562c2f0f00ff3f05b8b1e44657efe79b45f9c7
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
37df39a93df04278b11a273aff17da164c5c6757 26-Feb-2015 Jeff Brown <jeffbrown@google.com> Add missing headers.

Change-Id: Ida86e14986e6391e6f65581ef0987ad8d16576f9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cfb3185a27efeb9312ddf71f52f3a7039c4694df 25-Feb-2015 Filip Gruszczynski <gruszczy@google.com> am 0fbcc708: am 1e74b5d6: Merge "Burn in protection." into lmp-mr1-modular-dev

* commit '0fbcc7086fe742e641915ed5f097119d01613cb5':
Burn in protection.
24bec7ce7adc3c0d693cfadcb4b28f5fc41555ae 04-Feb-2015 Jorim Jaggi <jjaggi@google.com> Implement nice transitions for light status bar

- When the flag changes, apply an animation from the current value
- When the flag change is caused by an app transition, synchronize
the status bar animation with the app transition animation.
PhoneWindowManager calculates the timings based on some heuristics
of the app transition animations and supplies these timings to
StatusBarService.

Bug: 19233606
Change-Id: I4f99afba8f1eebb3524699ed4d7fbafee5463a37
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
cd3884dfb246855c059e15db376f0935af68d949 18-Feb-2015 Adrian Roos <roosa@google.com> Set the light status flag based on right window

The flag needs to be set based on the top window that is either
reaching beneath the status bar or is dimming.

Bug: 19233606
Change-Id: I7b97f6869e3b7d5ae2b7030122b311ee9e13871f
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
73fef8df0059174df42e28acb77925cd747ccdca 16-Feb-2015 Jorim Jaggi <jjaggi@google.com> Keep light status bar flag when opening notification shade

Bug: 19233606
Change-Id: I20e50c7267b8c1cd035eafd54609537d493a5ea9
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
ae6688b09649447e57468b3e7935691bc09ec9b9 12-Feb-2015 Dianne Hackborn <hackbod@google.com> Update voice interaction layer for new UI design.

Can switch from a pure overlay at the top of the screen,
to interactive mode with the voice UI drawing at the bottom
and pushing its target activity up like an IME.

Add mechanism to get assist data to the voice interaction UI.

Add some basic visualization of the assist data, outlining
where on the screen we have text.

Add a test ACTION_ASSIST handler, which can propagate the
assist data it gets to the voice interaction session so
you can see what kind of data we are getting from different
apps.

Change-Id: I18312fe1601d7926d1fb96a817638d60f6263771
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
683914bfb13908bf380a25258cd45bcf43f13dc9 15-Jan-2015 Svetoslav <svetoslavganov@google.com> Rewrite of the settings provider.

This change modifies how global, secure, and system settings are
managed. In particular, we are moving away from the database to
an in-memory model where the settings are persisted asynchronously
to XML.

This simplifies evolution and improves performance, for example,
changing a setting is down from around 400 ms to 10 ms as we do not
hit the disk. The trade off is that we may lose data if the system
dies before persisting the change.

In practice this is not a problem because 1) this is very rare;
2) apps changing a setting use the setting itself to know if it
changed, so next time the app runs (after a reboot that lost data)
the app will be oblivious that data was lost.

When persisting the settings we delay the write a bit to batch
multiple changes. If a change occurs we reschedule the write
but when a maximal delay occurs after the first non-persisted
change we write to disk no matter what. This prevents a malicious
app poking the settings all the time to prevent them being persisted.

The settings are persisted in separate XML files for each type of
setting per user. Specifically, they are in the user's system
directory and the files are named: settings_type_of_settings.xml.

Data migration is performed after the data base is upgraded to its
last version after which the global, system, and secure tables are
dropped.

The global, secure, and system settings now have the same version
and are upgraded as a whole per user to allow migration of settings
between these them. The upgrade steps should be added to the
SettingsProvider.UpgradeController and not in the DatabaseHelper.

Setting states are mapped to an integer key derived from the user
id and the setting type. Therefore, all setting states are in
a lookup table which makes all opertions very fast.

The code is a complete rewrite aiming for improved clarity and
increased maintainability as opposed to using minor optimizations.
Now setting and getting the changed setting takes around 10 ms. We
can optimize later if needed.

Now the code path through the call API and the one through the
content provider APIs end up being the same which fixes bugs where
some enterprise cases were not implemented in the content provider
code path.

Note that we are keeping the call code path as it is a bit faster
than the provider APIs with about 2 ms for setting and getting
a setting. The front-end settings APIs use the call method.

Further, we are restricting apps writing to the system settings.
If the app is targeting API higher than Lollipop MR1 we do not
let them have their settings in the system ones. Otherwise, we
warn that this will become an error. System apps like GMS core
can change anything like the system or shell or root.

Since old apps can add their settings, this can increase the
system memory footprint with no limit. Therefore, we limit the
amount of settings data an app can write to the system settings
before starting to reject new data.

Another problem with the system settings was that an app with a
permission to write there can put invalid values for the settings.
We now have validators for these settings that ensure only valid
values are accepted.

Since apps can put their settings in the system table, when the
app is uninstalled this data is stale in the sytem table without
ever being used. Now we keep the package that last changed the
setting and when the package is removed all settings it touched
that are not in the ones defined in the APIs are dropped.

Keeping in memory settings means that we cannot handle arbitrary
SQL operations, rather the supported operations are on a single
setting by name and all settings (querying). This should not be
a problem in practice but we have to verify it. For that reason,
we log unsupported SQL operations to the event log to do some
crunching and see what if any cases we should additionally support.

There are also tests for the settings provider in this change.

Change-Id: I941dc6e567588d9812905b147dbe1a3191c8dd68
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
b10e33ff804a831c71be9303146cea892b9aeb5d 04-Feb-2015 Jorim Jaggi <jjaggi@google.com> Split up android.policy into framework.jar and services.jar 1/3

Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java