Commit Graph

14162 Commits

Author SHA1 Message Date
Winson Chung
61e164d1e1 Merge "Workaround issue with pip overlay not hiding cleanly." into oc-dev am: 99a885b5d6
am: 7289c0a98e

Change-Id: I47bbb909d172c7d65034676076142ec02af8dbae
2017-05-18 23:42:55 +00:00
Winson Chung
f9ed24be5e Merge "Fixing issue with double tapping PiP." into oc-dev am: 39d9ae20a6
am: 6e566cda48

Change-Id: Iec63ad801044b22c017427b4d1e160432606e9b3
2017-05-18 23:40:27 +00:00
Winson Chung
99a885b5d6 Merge "Workaround issue with pip overlay not hiding cleanly." into oc-dev 2017-05-18 23:15:35 +00:00
Winson Chung
39d9ae20a6 Merge "Fixing issue with double tapping PiP." into oc-dev 2017-05-18 23:15:01 +00:00
Jorim Jaggi
7a52a58ffb Merge "Fix ordering of notifying dismiss callback" into oc-dev am: e85f8eb0ca
am: a55a662600

Change-Id: Ic24eaca241ddc2c84395a1d2bdaf6dd554b0e55b
2017-05-18 22:47:12 +00:00
Jorim Jaggi
e85f8eb0ca Merge "Fix ordering of notifying dismiss callback" into oc-dev 2017-05-18 22:25:51 +00:00
Winson Chung
265c183e70 Merge "Fix issue with deferred start of the background loader." into oc-dev am: 13bd634262
am: 8d7692c8cf

Change-Id: I7dc950c411efbd8e6c7fd6f2d3031ebd80d8ac72
2017-05-18 17:37:51 +00:00
Winson Chung
13bd634262 Merge "Fix issue with deferred start of the background loader." into oc-dev 2017-05-18 17:18:58 +00:00
Winson Chung
bb23376439 Fixing issue with double tapping PiP.
- If a user taps the PiP quickly multiple times, you can hit a case where
  you expand the PIP, which triggers the re-registration of the
  InputConsumer, but doesn't disable touches until the pinned stack
  animation starts.  If the user taps in between that time, it can trigger
  a resizing of the stack what aborts the expand animation
- Also adding additional debugging logs

Bug: 37657050
Test: Quickly tap the PiP

Change-Id: Ib0088a3aa8e917aca3214c289a0787bdf7e66199
2017-05-18 10:01:17 -07:00
Zachary Iqbal
dc05aa049b Added indication text stubs for changes to trust being managed.
Notes:
- Subclasses of KeyguardIndicationController can now provide indication text
to be displayed when a trust agent is managed.

Test: runtest sysui
Bug: 38397982
Change-Id: I1b7ee3041aceae94d12da25608f8e7b2e9ebbbe2
2017-05-17 19:19:10 -07:00
TreeHugger Robot
b114e4ff82 Merge "Optimize latency when unlocking phone" into oc-dev 2017-05-18 01:55:45 +00:00
Jorim Jaggi
5277deaa59 Fix ordering of notifying dismiss callback
Otherwise all unlocks will result in onDismissCancelled.

Also fixes a race condition bug where we call
reportKeyguardShowingChanged but we don't wait until the state is
updated. Then, we called onDismissSucceeded such that
KeyguardManager.isDeviceLocked would still return true. Fix this
by waiting for the message to be processed.

Note that delays shouldn't be a problem here as we are soon
calling reportKeyguardShowingChanged from the UiOffloadThread.

Test: KeyguardLockedTests
Change-Id: I0b312a5f02be3a3d1028d8bf0cd1b8e6a33476ce
Fixes: 38219395
2017-05-18 02:05:29 +02:00
Jorim Jaggi
e549a8d621 Optimize latency when unlocking phone
Latency when unlocking the phone regressed a bit for two reasons:
- For lockscreen -> app we now have to create a full starting
window containing the snapshot, while previously this was just
showing a surface.
- For lockscreen -> home, we can't use the saved surface anymore
because currently we don't support snapshotting translucent
activities. However, in the long term, we want home screen to be
more involved into transitions anyways, so we'll have to wait for
the first frame draw anyways.

However, crystal ball trainee developer Jorim added some
artificial latency in this transition 3 years ago, because he knew
that it is going to be an issue at some point so we have some
headroom to improve! Genius! On a more serious note, it was because
he didn't understand how to read systraces with binders involved (to
be fair, there was also no binder tracing).

Now, we can completely fix the introduces latencies above by
removing this latency of 100ms, and we are 30-70ms better than
before! However, this requires a lot of discipline in SystemUI.
Currently, the callback to dismiss Keyguard takes around 30ms. By
moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.

Test: Take systrace, unlock phone...profit!

Fixes: 38294347
Change-Id: I481fe4ecf358ed09f7142dd9e7ecd290b53c500c
Merged-In: I3ea672bc2eca47221bc6c9f3d7c56b6899df207d
2017-05-17 23:47:15 +00:00
Jorim Jaggi
fabc743bcf Optimize latency when unlocking phone
Latency when unlocking the phone regressed a bit for two reasons:
- For lockscreen -> app we now have to create a full starting
window containing the snapshot, while previously this was just
showing a surface.
- For lockscreen -> home, we can't use the saved surface anymore
because currently we don't support snapshotting translucent
activities. However, in the long term, we want home screen to be
more involved into transitions anyways, so we'll have to wait for
the first frame draw anyways.

However, crystal ball trainee developer Jorim added some
artificial latency in this transition 3 years ago, because he knew
that it is going to be an issue at some point so we have some
headroom to improve! Genius! On a more serious note, it was because
he didn't understand how to read systraces with binders involved (to
be fair, there was also no binder tracing).

Now, we can completely fix the introduces latencies above by
removing this latency of 100ms, and we are 30-70ms better than
before! However, this requires a lot of discipline in SystemUI.
Currently, the callback to dismiss Keyguard takes around 30ms. By
moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.

Test: Take systrace, unlock phone...profit!

Change-Id: I3ea672bc2eca47221bc6c9f3d7c56b6899df207d
Fixes: 38294347
2017-05-18 00:06:34 +02:00
Winson Chung
39ba45c3d3 Merge "Fix call to get the current user id from a secondary SystemUI process." into oc-dev am: 2349481d62
am: 1539f47e44

Change-Id: Ieabaad68e518aa1b5a4c38058c1724d9d2ea6d63
2017-05-17 19:55:36 +00:00
Winson Chung
2349481d62 Merge "Fix call to get the current user id from a secondary SystemUI process." into oc-dev 2017-05-17 19:10:42 +00:00
Marc Hittinger
bbc06abe37 Merge "Update defaults for isHighEndGfx settings." 2017-05-17 18:52:01 +00:00
TreeHugger Robot
22f8290879 Merge "Optimize App -> Recents" into oc-dev 2017-05-17 18:15:41 +00:00
Winson Chung
d664269d58 Fix call to get the current user id from a secondary SystemUI process.
- The secondary SystemUI process's KeyguardUpdateMonitor is not updated
  so we can't rely on it to get the current user id.

Bug: 38372598
Test: Switch users, launch some tasks, and switch back. Ensure that original
      tasks still exist

Change-Id: I26a7c70b5f7032a106dc1342c8b366e4797e8fa0
2017-05-17 10:47:36 -07:00
Selim Cinek
ddb397be72 Merge changes I858017b8,Ife32b600 into oc-dev am: 63e8bfe1c5
am: 29260fd33b

Change-Id: Ida456542645ab7654705631dcba4d602669372e2
2017-05-17 16:18:22 +00:00
Selim Cinek
63e8bfe1c5 Merge changes I858017b8,Ife32b600 into oc-dev
* changes:
  Improved the media color extraction algorithm
  Fixed broken coretests
2017-05-17 15:59:07 +00:00
Jorim Jaggi
ef496ea80d Optimize App -> Recents
- Use same strategy to draw thumbnail bitmap by moving
startActivity off from the main thread and start caching the future
when AM is busy executing startActivity.
- Move some binder calls off the main thread.
- Add some trace points for better analysis in the future.
- Make toggleRecentApps asynchronous so we don't have to wait on
the next app-vsync - it's totally not needed.

Test: com.android.apptransition.tests.LatencyTests

Fixes: 32668632
Change-Id: Id6483e26e9d6c1e319bceaa8268da976cedfbca3
Merged-In: I15db41f2e821779972ab3b430033c70aa1dfd907
2017-05-17 14:16:57 +02:00
Jorim Jaggi
6b46038e6a Optimize App -> Recents
- Use same strategy to draw thumbnail bitmap by moving
startActivity off from the main thread and start caching the future
when AM is busy executing startActivity.
- Move some binder calls off the main thread.
- Add some trace points for better analysis in the future.
- Make toggleRecentApps asynchronous so we don't have to wait on
the next app-vsync - it's totally not needed.

Test: com.android.apptransition.tests.LatencyTests

Change-Id: I15db41f2e821779972ab3b430033c70aa1dfd907
Fixes: 32668632
2017-05-17 14:11:56 +02:00
Winson Chung
9f69b78eb3 Workaround issue with pip overlay not hiding cleanly.
- We were just finishing the activity which was causing issues with the
  wrong app transition being applied.  We actually can just hide the menu
  activity first before finishing it like we do elsewhere.

Bug: 38222481
Test: Open PiP, launch to show assistant

Change-Id: I348f8a17f76006bcef46fe01c87deae0b89f6586
2017-05-16 17:00:36 -07:00
Winson Chung
d691cc14c8 Merge "Updating Overview to work with PiP" into oc-dev am: 0553cbcf36
am: fbdd98ef69

Change-Id: I54bac22c4c5963773d886e9f18da8f90b4aac2a6
2017-05-16 23:59:37 +00:00
Winson Chung
62674a2f40 Fix issue with deferred start of the background loader.
- Previously we were (incorrectly) assuming that the creation of the
  BackgroundTaskLoader would be followed synchronously by a call to start()
  the background loader itself.  However, now that we post the start of
  the loader, the run() call can be made before the start() call.

Bug: 38310660
Test: This is an intermittent bug, hard to repro.
Change-Id: I4dfd18b8c3c127429c790177e98ca41ec70f493d
2017-05-16 16:58:30 -07:00
Winson Chung
0553cbcf36 Merge "Updating Overview to work with PiP" into oc-dev 2017-05-16 23:41:17 +00:00
Anthony Chen
473b4a0880 Merge "Add ability to set a custom background for auto." 2017-05-16 17:25:34 +00:00
Jorim Jaggi
34795e3197 Optimize hot launching recents
Rearrange how we generate the transition specs, which involves
creating a thumbnail on the mainthread (about 10ms on large
devices): First, we put launching the activity onto a handler
thread (with default priority), to free up the main thread. Then,
we immediately start generating the thumbnail such that when the
future calls us we have the generated spec already handy.

For that we need to be able to supply a specs future into
ActivityOptions, to avoid race conditions. Furthermore we need to
make sure not to call into WM while creating specs, to avoid WM
lock contention.

Test: App -> Recents -> Same app, inspect app transition logs
Test: Double tap recents for quick switching

Bug: 32668632
Change-Id: I6001e29145f8e56deb9c4ead46c53c87c9191436
Merged-In: Ic6ec65c2560f67cade3b5ddde9f79ee13e9ba32c
2017-05-16 17:28:40 +02:00
Jorim Jaggi
cf4411df43 Optimize hot launching recents
Rearrange how we generate the transition specs, which involves
creating a thumbnail on the mainthread (about 10ms on large
devices): First, we put launching the activity onto a handler
thread (with default priority), to free up the main thread. Then,
we immediately start generating the thumbnail such that when the
future calls us we have the generated spec already handy.

For that we need to be able to supply a specs future into
ActivityOptions, to avoid race conditions. Furthermore we need to
make sure not to call into WM while creating specs, to avoid WM
lock contention.

Test: App -> Recents -> Same app, inspect app transition logs
Test: Double tap recents for quick switching

Bug: 32668632
Change-Id: Ic6ec65c2560f67cade3b5ddde9f79ee13e9ba32c
2017-05-16 17:26:54 +02:00
Selim Cinek
8aa5c556ab Improved the media color extraction algorithm
The color extraction algorithm is tuned further:
We're now regarding more colors as white when
it comes to the background selection.

For muted color swatches we also factor in the popuplation.
Finally, we also factor in the mostdominant color to overtake the text
color in case it is very dominant.

Test: runtest systemui
Bug: 38168152
Change-Id: I858017b83559255ead48c3ab6c3bc16ed110e57c
2017-05-16 01:14:54 +00:00
TreeHugger Robot
c0c9bd075a Merge "AOD: Fix time tick alarm registration" 2017-05-15 23:40:08 +00:00
Anthony Chen
e658cc212a Add ability to set a custom background for auto.
Also, clear heads-up entries when switching to notifications panel. Auto
does not want any notifications to be pinned to the top.

Test: booted up android auto headunit
Bug: 33210494
Change-Id: If722a887f4bc0d4a91ca37d4e7de5af94ca0f8dd
2017-05-15 15:55:34 -07:00
Evan Rosky
308b62b659 Merge "Post setSwitchingUser to main thread" into oc-dev am: 775699dc05
am: 6c16bc5711

Change-Id: Ib1cd87d2c8b23eb620aa06bf2a64d65be3206891
2017-05-15 21:29:50 +00:00
Evan Rosky
775699dc05 Merge "Post setSwitchingUser to main thread" into oc-dev 2017-05-15 20:52:45 +00:00
TreeHugger Robot
4be9b2ca3e Merge "Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing" into oc-dev 2017-05-15 20:52:28 +00:00
Adrian Roos
540b528f35 AOD: Fix time tick alarm registration
Fixes an issue where canceling the time tick
alarm was not done properly, which then prevented
the alarm from being scheduled again.

Change-Id: I233f6227eabc65ea1cd13e7c53930573fb552126
Fixes: 36506772
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
2017-05-15 13:29:49 -07:00
Winson Chung
863b7fea83 Merge "Ensure that we check against the pending state while suspended." into oc-dev am: 70a8e86918
am: 1b7f4b3ce2

Change-Id: I85d75bbefaa02ec5b36741c4c5d9dba49fd5a483
2017-05-15 19:50:24 +00:00
Winson Chung
70a8e86918 Merge "Ensure that we check against the pending state while suspended." into oc-dev 2017-05-15 19:31:13 +00:00
Kevin Chyn
6db7d5fc84 Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing
There's a race condition if user unlocks from bouncer and an app underneath
uses FP does onResume()

If a user has an application that's authenticating via FP underneath
keyguard and the user dismisses keyguard via bouncer, the app underneath
will get kicked out since onKeyguardVisibilityChanged(false) calls
shouldListenForFingerprint() during this race.

Keyguard shouldn't listen to FP if bouncer is showing but keyguard is
dismissing

Fixes: 37967985
Test: 1) open FP settings
2) enter keyguard and go to bouncer
3) unlock keyguard via pin/pattern/password (NON FP method)
4) tap any finger on sensor (should vibrate)

Merged-In: Ie38d55e6a1ec9b49f9df0c7520d0bc451315c161
Change-Id: Ie38d55e6a1ec9b49f9df0c7520d0bc451315c161
2017-05-15 18:11:23 +00:00
TreeHugger Robot
ef66f19128 Merge "Keyguard shouldn't listen to FP if bouncer showing and keyguard dismissing" 2017-05-15 18:10:07 +00:00
Evan Rosky
4e44fcedad Post setSwitchingUser to main thread
touching view hierarchy should only occur on UI thread

Bug: 37167272
Test: keyguard still works, used Log to see that switching
      still gets called
Change-Id: I45ed9894a8f08c38da40de44f84e99cddb683014
2017-05-15 10:21:15 -07:00
Jonathan Solnit
91d199a391 Merge "Add camera lift trigger to GestureLauncherService" 2017-05-15 16:20:42 +00:00
Geoffrey Pitsch
9f71f5b407 Merge "Fix number of channels in inline notification settings" into oc-dev am: 1ab1da3f25
am: 04f57e2d50

Change-Id: Icdd4c0c75cda5c290f035ea52ff175b9e2c9e6e7
2017-05-15 14:29:57 +00:00
TreeHugger Robot
1ab1da3f25 Merge "Fix number of channels in inline notification settings" into oc-dev 2017-05-15 14:18:22 +00:00
Jason Monk
780ae3595c Merge "Fix the status icon colors in QS" into oc-dev am: d472349229
am: e093068eb1

Change-Id: I2bbe4b8dc4f0e9173d00129e8b25a4ccb3977188
2017-05-13 13:22:13 +00:00
Jorim Jaggi
56cf9ad1b0 Merge changes I7b5504d0,I10c263dc into oc-dev am: 8902bbe4e3
am: ae8e0149cf

Change-Id: Ibb220dc05fcf2713943bdd1287e46b896f4d2df6
2017-05-13 13:12:22 +00:00
Jason Monk
d472349229 Merge "Fix the status icon colors in QS" into oc-dev 2017-05-13 13:10:58 +00:00
TreeHugger Robot
8902bbe4e3 Merge changes I7b5504d0,I10c263dc into oc-dev
* changes:
  Get rid of a lot of binder calls
  Fix recents entry delay
2017-05-13 12:57:23 +00:00
Jorim Jaggi
ddb449efd9 Get rid of a lot of binder calls
Lead to delays when entering recents.

Test: Open recents
Bug: 32668632
Change-Id: I7b5504d0c11208d9c4d55de2eace6407d186f25c
2017-05-13 12:34:25 +02:00