18589 Commits

Author SHA1 Message Date
Jason Monk
6e5a8f714c Merge "Don't include the example plugin in mk" 2016-11-07 22:41:55 +00:00
Adrian Roos
ff2c4563cd Doze: Refactor v1
Pulls appart UI, state, power, display and trigger management
into individual components controlled by a state machine.

Also adds tests.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I6ee7e79d58a5a3ebeb975775af44ad1e5aaccf93
2016-11-07 14:14:30 -08:00
Jason Monk
fe62a154af Don't include the example plugin in mk
It might accidentally get built by mm.

Test: manual
Change-Id: I1be30af36b3c392217cd5d723d19918b0adda22c
2016-11-04 15:31:11 -04:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07:00
Manu Cornet
906a3a8e80 Slightly better encapsulation for the set of recent activities
Bug: 32101881
Test: Locally on Ryu device
Change-Id: Ibf2f5af268ec00abc8caa6232fb517b60545ad46
2016-11-04 06:58:37 -07:00
Adrian Roos
803f33a109 Doze: Fix broken non-AoD
Fixes a bug where non-AoD doze mode
was broken.

Test: adb shell settings put secure doze_always_on 0 && echo "Test that double-tap / pickup gestures work"
Change-Id: If2720eea5081fb9f88bfe0346ec829b241532b29
2016-11-03 12:26:45 -07:00
Winson Chung
34f47747f7 Merge changes I0d6f2f0c,I278ab8c3
* changes:
  Experiment for snapping PIP to closest edge.
  Experiment with allowing tap to break through to interact with the PIP.
2016-11-03 17:48:12 +00:00
Jorim Jaggi
88dea2dd23 Merge "Fix that bouncer is not focusable if shown without notification shade" 2016-11-03 04:17:15 +00:00
Winson Chung
dff5c08bfd Experiment for snapping PIP to closest edge.
Test: Enable in SysUI tuner, drag PIP.  This is only experimental to help
      figure out what UX we want to keep.

Change-Id: I0d6f2f0c5909d6a76aae4a8fb84c5076f6996fdd
2016-11-02 18:25:29 -07:00
Jorim Jaggi
8a825e9076 Fix that bouncer is not focusable if shown without notification shade
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts.KeyguardLockedTests#testDismissKeyguard_fromShowWhenLocked
Change-Id: Ia300cea18b0ed7c9bfe04f3aa051d8a04a6eaedc
2016-11-02 18:12:01 -07:00
Winson Chung
15504af3f7 Experiment with allowing tap to break through to interact with the PIP.
Test: Enable SysUI tuner, tap once on PIP to interact with the activity.
      This is only experimental behaviour, and
      android.server.cts.ActivityManagerPinnedStackTests will be updated
      accordingly if we keep this behavior.

Change-Id: I278ab8c360c44718cfcac0fd761f476a875f9b15
2016-11-02 18:11:36 -07:00
Jorim Jaggi
56fd70cd8c The big Keyguard transition refactor (7/n)
There was some window animation jank because we ran a layout during
the animation, as the SysUI animations are slightly faster, so we
collapsed the window already during the animation which caused
a layout which caused window animation jank.

Bug: 32057734
Change-Id: I296f961be8cfc39b08859b7d3d41f1e81b2eaaa3
2016-11-02 23:07:06 +00:00
TreeHugger Robot
4cd3e8c0a9 Merge "Fixing issue with PIP while IME is showing." 2016-11-02 20:08:33 +00:00
Winson Chung
14fefc26d3 Fixing issue with PIP while IME is showing.
- Unifying logic to ensure that the PIP is moved consistently as its
  movement bounds are shifted.  This is done by adding a snap fraction
  which is a fraction relative to one set of movement bounds, and applied
  to a new movement bounds.  This is flexible to work with all of the
  current snap modes being tested.
- Fixing issue where you can drag out of bounds when touching the PIP
  before the IME shows.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackOffsetForIME
Change-Id: Ie68c1ca599f6196726b8224585974a0972b93701
Signed-off-by: Winson Chung <winsonc@google.com>
2016-11-02 11:24:11 -07:00
Wale Ogunwale
ac2561e820 Make window token add/remove APIs require displayId
Window tokens can now only be on one display, so we now require clients
that want to add/remove window tokens to specify the display they would
like the token to be created on. This simplifies the token handling code
in WM and will be useful moving forward for clients that want to add
windows to external displays.

Test: Existing tests pass
Change-Id: I6b2d8d58a913b3624f1a9a7bebbb99315613f103
2016-11-02 10:28:45 -07:00
Jorim Jaggi
5974b4df49 Merge changes from topic 'keyguard_refactor'
* changes:
  The big keyguard transition refactor (6/n)
  The big keyguard transition refactor (5/n)
  The big keyguard transition refactor (4/n)
  The big keyguard transition refactor (3/n)
  The big keyguard transition refactor (2/n)
  The big keyguard transition refactor (1/n)
2016-11-02 02:14:15 +00:00
Julia Reynolds
73481c8837 Merge "Some channel model updates" 2016-11-02 01:20:20 +00:00
Adrian Roos
6154da805a Merge "DozeService: Fixup nits from review" 2016-11-02 00:54:49 +00:00
Jorim Jaggi
8d78693157 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
2016-11-01 15:36:40 -07:00
Jorim Jaggi
fe762344f4 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
2016-11-01 13:53:32 -07:00
TreeHugger Robot
c557ede6fa Merge "Fixed typo." 2016-11-01 19:46:57 +00:00
Julia Reynolds
85769915e7 Some channel model updates
- Apps cannot update their channel settings after creation.
- Importance is required when creating a channel.
- Some method name changes.
- Ranker can't modify fields a user has changed.
- High and Max importance mean the same thing.
- The default channel adopts app wide settings on creation.
- The default channel is limited to importance low once target api is post n mr1
  unless the user changed it.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/notification

Change-Id: I73c449a6abe6d709046de79c5c54339cb2edf0b8
2016-11-01 19:31:34 +00:00
TreeHugger Robot
5579ff57aa Merge "Fixes header bar sizes when changing display sizes" 2016-11-01 17:31:44 +00:00
Jaewan Kim
03c8e3f771 Merge "PIP: Ignore TaskStackListener calls from another user" 2016-11-01 01:00:43 +00:00
Jaewan Kim
17ca4e33e0 PIP: Ignore TaskStackListener calls from another user
Bug: 32533254
Change-Id: I0987c69ebbd33000b4d3cadb64e28a4c321bd486
2016-11-01 09:38:22 +09:00
Matthew Ng
384e60e99d Fixes header bar sizes when changing display sizes
Fixed by capturing the correct task algorithm margin sizes and
conducting a re-inflate on the TaskStackHeader upon configuration changes.

Bug: 30370789
Fixes: 30370789
Test: manual - changed display sizes and toggled rencents
Change-Id: Ia1b823433ea1920293cdeca6b7e48ffe15f78b61
2016-10-31 16:54:32 -07:00
Adrian Roos
ccf4033aad Merge "AmbientDisplay: Add always on prototype" 2016-10-31 23:51:02 +00:00
Adrian Roos
ebea7a7e56 AmbientDisplay: Add always on prototype
Test: adb shell settings put secure doze_always_on 1
Change-Id: I3f293b3ef43847b7848af416b44f212fc40514d4
2016-10-31 14:49:52 -07:00
Winson Chung
655332c641 Creating PinnedStackController.
- Creating a PinnedStackController to keep track of the state of the PIP
  to prevent changes in the system (ie. IME showing) and user interaction
  from clobbering each other.
- Refactoring calls in AM into WM/controller

Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ie59dfd45d5c54764ba69a589b3b8148845e92cc3
Signed-off-by: Winson Chung <winsonc@google.com>
2016-10-31 13:21:55 -07:00
Felipe Leme
15f915c68f Fixed typo.
Test: none
Change-Id: I8587ec00a151cc207e56a44cf7b3d0f2e35856ad
2016-10-31 12:47:15 -07:00
Yorke Lee
fed503cb46 Merge "Add new methods to ITaskStackListener" 2016-10-31 19:05:03 +00:00
Yorke Lee
bd54c2aab6 Add new methods to ITaskStackListener
Refactor task change notification logic into a separate class
TaskChangeNotificationController.

Add ActivityManagerService.unregisterTaskStackChangedListener

Add a no-op implementation that clients can subclass to avoid
having to reimplement all new methods when they are added.

Add new methods:
onTaskAdded
onTaskRemoved
onTaskMovedToFront
onTaskDescriptionChanged
onActivityRequestedOrientationChanged
onTaskFinishing

Design doc:
https://docs.google.com/document/d/1IgWZ44rKe9k1CzkjP2Mohv12OgRD1FxH8oLAyzhvCY4/edit#heading=h.yhzl6os0dbo5

Cherry-picked from I8302d6d3baf1ac1ca928765fe203091b9fab4070

Bug: 32277482
Test: Verify that callbacks are called in dummy implementations

Change-Id: I2ac2b870147ef049f3ee05fc5916c99332334526
2016-10-28 14:58:19 -07:00
Jason Monk
6a652a4442 Make plugins have an application context
So things that use them don't crash.

Test: Plugin that uses getApplicationContext
Change-Id: I8673cb95544280f593479b014cd2620c2d02bf80
2016-10-28 10:14:20 -04:00
Jason Monk
d371f9828b Add system property to not disable plugins on crash
Should be used only during dev to avoid having to turn crashing
plugins back on constantly.

Test: Manual
Change-Id: I2f2a461bf7aef017781ed3b61fcb216d7e1cbae9
2016-10-28 10:14:19 -04:00
Jason Monk
4f70b9cfd4 Faster plugin updating from UI control
Send a broadcast back and forth to speed up the rate at which plugins
are enabled or disabled.

Also update make files to handle exclude tests better.

Test: Manual
Change-Id: Ic8f45c663c3a5e5fd4b3e9e2f79480e155845c14
2016-10-28 10:13:56 -04:00
Adrian Roos
d6ec131396 DozeService: Fixup nits from review
Change-Id: Idedfee4047af307238e863331af1ab690c7f3039
2016-10-27 11:51:24 -07:00
TreeHugger Robot
a5c859c080 Merge changes from topic 'always_on'
* changes:
  AmbientDisplay: Fixed threading
  AmbientDisplay: Factor out DozeSensors
2016-10-27 18:41:32 +00:00
TreeHugger Robot
ef2f13f25a Merge "Import translations. DO NOT MERGE" 2016-10-27 04:57:46 +00:00
TreeHugger Robot
60544d58fe Merge "Adding option to swipe to dismiss." 2016-10-27 02:48:10 +00:00
TreeHugger Robot
eb7af8b3cc Merge "No recents items can be dismissed by tap or swipe" 2016-10-26 23:45:22 +00:00
Bill Yi
4085c05414 Import translations. DO NOT MERGE
Change-Id: Id8fd7be4130e852b023392635da7fecc39ebfd74
Auto-generated-cl: translation import
2016-10-26 16:07:06 -07:00
Winson Chung
5cd26ff4d9 Adding option to swipe to dismiss.
- Adding tuner settings for PIP

Test: Manual, open PIP and swipe offscreen to dismiss

Change-Id: I62f8e4c4b96984b9f266dde5efc3c511cf37f7dd
2016-10-26 15:33:00 -07:00
Adrian Roos
79bacbbbdb AmbientDisplay: Fixed threading
Change-Id: Iee8d2b12145f3f1ab98099631539f6421e99f910
2016-10-26 15:28:53 -07:00
Adrian Roos
ea8d6aebaf AmbientDisplay: Factor out DozeSensors
Change-Id: Ia604e2f1e2ca7af5e514ef434f99b3f85ef0b789
2016-10-26 15:28:53 -07:00
TreeHugger Robot
199e3683d1 Merge changes I2d9f1a2d,I01fd8ba6
* changes:
  Ensure PIP retains bounds on device rotation.
  Fix wrong bounds being used in landscape.
2016-10-26 21:48:09 +00:00
Matthew Ng
3975de5f83 No recents items can be dismissed by tap or swipe
When there are no recents items shown, any tap or swipe will dismiss it
and go back to the launcher.

Bug: 31464845
Fixes: 31464845
Test: manual - overview with no recents and tap the screen to dismiss
Change-Id: I98987daf4d064e3f65141f790e68018fcf445c26
2016-10-26 14:25:23 -07:00
Winson Chung
cd1ff64683 Ensure PIP retains bounds on device rotation.
- When device rotates, ensure that the PIP continues to show in the
  same aspect ratio, snapped to the same logical snap point.
- Move common snapping code to policy so that it can be shared between
  SystemUI and the framework.

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

Change-Id: I2d9f1a2dc077a55c39acc1ccba982c255e2ff3a4
2016-10-26 12:53:01 -07:00
Winson Chung
303c6b78b6 Fix wrong bounds being used in landscape.
- Ensure we use the right display size when calculating PIP bounds.
- Also update interface to take the display id.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPinnedStackDefaultBounds
Test: #testPinnedStackMovementBounds

Change-Id: I01fd8ba6dee212c29a9a092673ee8f7843e41af6
2016-10-26 12:49:40 -07:00
TreeHugger Robot
6556aa93f2 Merge "Removed old stack member variable in RecentsView" 2016-10-26 17:38:39 +00:00
Victor Chan
ea277edcec Make car nav bar center it's children.
The linear layout that represents the buttons in the nav bar are added
programatically. Its xml layout values are overwritten, so set the
gravity to to center in its parent to ensure the buttons are always
centered.

Change-Id: Id4d380e8010e316907bc31f0ee6bc8d4624c6667
(cherry picked from commit 288c1c41d5784ba0f5912709b3101abcd8cd7e2a)
2016-10-26 00:29:20 +00:00