32109 Commits

Author SHA1 Message Date
Jorim Jaggi
55387528d6 Don't animate when moving task to stack if not requested
resumeTopActivitiesLocked played an activity transition because
the top activity of the stack changed. We don't want this in
case animate=false in moveToStackLocked, so add it to the
mNoAnimActivities array so it suppresses the animation.

Change-Id: Ife15ca529da916b6bc97e2b3bd1e3c3e3009373b
2015-11-24 18:21:10 -08:00
Jorim Jaggi
ba54881231 Merge "Allow stacks to be placed outside of display" 2015-11-25 01:49:50 +00:00
Chong Zhang
b15758ab7a Support scrolling for non-resizeable tasks in side-by-side mode
Display toast when a non-resizeable task is put into side-by-side mode.

Scroll the task upon a two-finger scroll gesture.

bug: 25433902

Change-Id: I69967056a564cfe7773afb80aa7e7ea7167a791a
2015-11-24 17:38:33 -08:00
Jorim Jaggi
2fbe033f9d Allow stacks to be placed outside of display
When dismissing the docked stack, we animate the divider to position
-12dp, so the full-screen stack is exactly full-screen when the dismiss
animation is done. Previously, this was prevented by window manager.
Allow it to fix the animation.

Change-Id: Iee4505023dc3f6907d56851965b156235f9f97f2
2015-11-24 17:37:03 -08:00
Filip Gruszczynski
786e12d92f Merge "Destroy docked divider surface when it's hidden." 2015-11-25 01:10:59 +00:00
Filip Gruszczynski
cb5f57bc58 Destroy docked divider surface when it's hidden.
Also includes bunch of small refactorings:
* destroying surfaces is now fully contained within
WindowManagerServices and mDestroySurface can be privatized;
* WMS.isDockedStackResizingLocked can be removed;
* mScreenCaptureDisabled changes from being SparseArray<Boolean> to
SparseBooleanArray, which not only avoids boxing but also makes code
simpler (no need to check for null)

Bug: 25844096
Change-Id: I0e5462760ffbc947ce6dc52ef429fa270ffc6786
2015-11-24 16:48:26 -08:00
Makoto Onuki
3ab6f2e219 DA receiver should be protected with BIND_DEVICE_ADMIN.
- DPM.setActiveAdmin() will not accept DAs without BIND_DEVICE_ADMIN
when it's targeting NYC or above.

- DAs without BIND_DEVICE_ADMIN targeting MNC or below will still be
accepted. (with a logcat warning)

- DAs that are already set on a device without BIND_DEVICE_ADMIN
will still be accepted regardless of the target API level, even when
it's upgraded to a version targeting NYC.

Bug 24168653

Change-Id: I1914c2ec99135d9dd8cbac3f6914f9e43bafacc8
2015-11-24 16:14:21 -08:00
Makoto Onuki
a31ebbc439 Add DO API to get wifi mac address
Bug 25496044

Change-Id: Ib1f0ce4ca10951edcfaa0aa79ae5c2d142a74599
2015-11-24 15:38:16 -08:00
Jorim Jaggi
b0cab35c18 Merge changes Ieb3c8c73,If494fddf,Ia9415fa6
* changes:
  Add ability to supply initial bounds when docking task
  Make sure to clear pending spec
  Clear spec future when clearing transition
2015-11-24 23:11:34 +00:00
Jorim Jaggi
9ea2f7ba31 Add ability to supply initial bounds when docking task
Add an optional parameter in moveTaskToDockedStack to supply an
initial rect to be used when creating the dockeds tack. Pass in
the adjusted rect when dragging up from the navbar so it doesn't
flicker anymore.

Change-Id: Ieb3c8c73b9e2a769a2ec6270bd76a713201a2aed
2015-11-24 15:08:49 -08:00
Makoto Onuki
05d0d44034 Merge "DPM.isDeviceOwnerApp() and getDeviceOwner() now check calling user" 2015-11-24 23:03:46 +00:00
Makoto Onuki
c8a5a555f1 DPM.isDeviceOwnerApp() and getDeviceOwner() now check calling user
- Previously on MNC, they would return the same result regardless who
the calling user is.

- Now they properly take DO user-id into account.  Meaning, they'll
always return false and null respectively, if the calling user doesn't
run device owner.

- Note isDeviceOwnerApp() is a public API and getDeviceOwner() is
a system API.  Meaning we're changing the behavior or non-private
APIs.

- Also cleaned up hidden APIs, and gave them explicit suffixes
to avoid confusion.  Bundled code should prefer them for clarity.

Now we have:

* APIs that work cross-users: They all require MANAGE_USERS.
boolean isDeviceOwnerAppOnAnyUser(String packageName)
ComponentName getDeviceOwnerComponentOnAnyUser()

int getDeviceOwnerUserId()
boolean isDeviceOwnedByDeviceOwner()

String getDeviceOwnerNameOnAnyUser()

* APIs that work within user.  No permissions are required.

boolean isDeviceOwnerAppOnCallingUser(String packageName)
ComponentName getDeviceOwnerComponentOnCallingUser()

Bug 24676413

Change-Id: I751a907c7aaf7b019335d67065d183236effaa80
2015-11-24 14:54:48 -08:00
Filip Gruszczynski
a21136c347 Don't preserve the window on client side when pinning activity.
We were both enabling window replacement in WMS and window preserving on
the client side. This doesn't work together, because window replacement
depends on the fact that the client won't preserve the window (it needs
to receive remove and add window operations).

Bug: 25854235
Change-Id: I0625df6fbe4c29bf14f364d764de3bf63dc90961
2015-11-24 14:43:31 -08:00
Philip P. Moltmann
c9137615e4 Merge changes from topic 'AddPrinters'
* changes:
  Create PrintDiscoverySession for future print services
  Update printer availability when printSpooler is paused. This makes the window update syncronously when in multi-window mode.
2015-11-24 21:33:39 +00:00
Erik Wolsheimer
2242b4d2bd fix data race condition
BUG: 25819358

Change-Id: I9d9978c92d084e93ccb41ea1d0fe33ffe3e17e3d
2015-11-24 13:22:04 -08:00
Jorim Jaggi
65193999da Clear spec future when clearing transition
Sometimes I still see an old recents animation when the transition
failed before. I believe this is because we don't clear the future
when clearing the transition.

Change-Id: Ia9415fa68c8e472c15fabccaf788762186d2d35e
2015-11-24 13:12:58 -08:00
Makoto Onuki
cc99cced2d Merge "Fix "some user restrictions not working" issue" 2015-11-24 20:34:25 +00:00
Vladislav Kaznacheev
1cffc19661 Merge "Animate drag shadow when the drag is cancelled" 2015-11-24 19:27:31 +00:00
Vladislav Kaznacheev
ce2aef9f12 Animate drag shadow when the drag is cancelled
Added a placeholder animation (scale and alpha going down to 0).
Final UX spec is pending.

Change-Id: I324635d270cc4d7f865c9fe9ad2802b975d1e9ca
2015-11-24 19:26:48 +00:00
Julia Reynolds
ccec4f6d43 Merge "Be more resiliant to notifications that don't use a builder." 2015-11-24 19:25:08 +00:00
Sunny Goyal
6cbc2fec91 Using ParceledListSlice to get the list of activities in LauncherApps
Bug: 25430879
Change-Id: I3a93bb1abcbcc54bc467e57c51f592b5946850cf
2015-11-24 11:22:16 -08:00
Jean-Michel Trivi
695f3f7c82 Merge "AudioService: remove dead code" 2015-11-24 18:24:58 +00:00
Julia Reynolds
da30354438 Be more resiliant to notifications that don't use a builder.
Bug: 25772839
Change-Id: I526001a21f959f7229443f487439c51c8d84f1ea
2015-11-24 10:41:55 -05:00
Mahaver Chopra
15a46b07c5 Add method isManagedProfile and isSystemOnlyUser
Adding method isManagedProfile() and isSystemOnlyUser() for DPC to know
if running in a managed profile or system only user

Bug: 24464823
Change-Id: I79974fdfd60d2bfe52dee3b4c95becf47a5bf0b1
2015-11-24 15:00:18 +00:00
Lorenzo Colitti
1a3c1650cc Merge "Don't crash when canceling alarms if a direct listener is present" 2015-11-24 05:00:37 +00:00
Lorenzo Colitti
831204c651 Switch the DHCP client to the new AlarmManager callback interface
Bug: 24224067
Bug: 25823676
Change-Id: I456984a2f6243f92edb63b8599d861627e2de1cf
2015-11-24 13:47:15 +09:00
Lorenzo Colitti
e5f11cd6cc Refactor alarm setting code in preparation for switch to callback
Bug: 25823676
Change-Id: Id4d1031b5bd3a7f041c32ad4ac9384e045b385e8
2015-11-24 13:47:15 +09:00
Lorenzo Colitti
9b43ce0c98 Don't crash when canceling alarms if a direct listener is present
If a direct listener alarm attempts to match a regular
PendingIntent alarm, it will attempt to fetch the binder of the
regular alarm's direct listener, which is null, and crash the
system with an NPE.

Bug: 25823676
Change-Id: I85fb98b43436930a2513274dc5ab408f7d41d97f
2015-11-24 13:47:14 +09:00
Chong Zhang
95094d17cb Show all windows with FLAG_SHOW_WHEN_LOCKED over lock screen if
we're already showing some app over the lock screen.

bug: 25685940
Change-Id: Ib7869f58e2903199470a95dfb796d063bc8d0c51
2015-11-23 17:11:42 -08:00
Winson Chung
b3709400d1 Merge "Adding tuner params for paging and full screen thumbnails." 2015-11-24 00:41:54 +00:00
Vladislav Kaznacheev
6e1a022f32 Merge "Prevent animated drag shadow from being dragged." 2015-11-24 00:23:49 +00:00
Winson
8b1871d741 Adding tuner params for paging and full screen thumbnails.
- Adding “focused” stack state to support paging
- Changing the paging to match UX spec (only auto-page after the first
  tap)
- Removing old header focus animation

Change-Id: Id72825b8a1b1c0a2238ee184a6695b13c1d8cb1c
2015-11-23 15:55:52 -08:00
Suprabh Shukla
edcfc1873a Merge "Changing the message on user switching dialog." 2015-11-23 23:51:25 +00:00
Suprabh Shukla
4fe508b6d3 Changing the message on user switching dialog.
On systems where primary user is different from the system user,
the message "Switching to Owner..." is displayed while logging out
from any user. Changing it to "Logging out <username>".

Bug: b/25749937

Change-Id: Id519bbd444c6b3f951511d6e566c503d06c510a1
2015-11-23 15:33:01 -08:00
Jean-Michel Trivi
d4de20df2a AudioService: remove dead code
Remove dead code related to media button event receiver and
  remote control display, now handled by MediaSession*

Change-Id: I4bd621240ddddf4df079df8d551c72b232c3301d
2015-11-23 23:16:04 +00:00
Chong Zhang
95cdbd6f6d Merge "Fix black wallpaper when docking a non-resizeable task" 2015-11-23 19:42:49 +00:00
Makoto Onuki
28da2e3490 Fix "some user restrictions not working" issue
SettingsProvider used to prevent any changes to certain settings
when the corresponding user restriction is set, which isn't really what
these restrictions mean.
Even if a user restriction is set, it should still changing in the more
restricting direction.

Also stop setting "" to LOCATION_PROVIDERS_ALLOWED, which will simply
be ignored.

Bug 25614198

Change-Id: Ifa8edc2927e21e6c6174620c8c874c86c1dc0f75
2015-11-23 10:48:16 -08:00
Jorim Jaggi
1aaed1a162 Merge "Don't play animation when docking stack with affordance" 2015-11-23 18:43:38 +00:00
Makoto Onuki
42490c074d Merge "Remove UserManager.setSystemControlledUserRestriction()" 2015-11-23 18:42:55 +00:00
Makoto Onuki
ac65e1e1db Remove UserManager.setSystemControlledUserRestriction()
Now that we don't have UM.setUserRestriction*s*() that could remove
all existing restrictions, there's almost no point handling
DISALLOW_RECORD_AUDIO differently.

Now DISALLOW_RECORD_AUDIO is handled just like other restrictions,
except we don't persist it.

Bug 24954662

Change-Id: I27875b4a74dd95a3ce6bb774081eeaf718eaec15
2015-11-23 10:41:42 -08:00
Chong Zhang
0abb20f374 Fix black wallpaper when docking a non-resizeable task
Separate WindowState.isFullscreen into two methods, isFrameFullscreen()
that returns whether the window frame is fullscreen, and
isObscuringFullscreen(), which returns whether the window is actually
covering fullscreen.

In case of a docking task that's non-resizeable, the window frame is
fullscreen but since the stack is not fullscreen, the window is cropped
to stack bounds and is not obsuring the screen.

bug: 25433902

Change-Id: I7cd80381601fdc1fe87d04608b6a453806920590
2015-11-23 10:40:37 -08:00
Jorim Jaggi
030979c1e4 Don't play animation when docking stack with affordance
Change-Id: I1bb8ae4047e3de3a4ea159e7fad718914b9b5ba7
2015-11-23 18:35:02 +00:00
Alan Treadway
883f12ac5a Merge "Revert "Disable multiple user for corp-liable mode"" 2015-11-23 17:58:39 +00:00
Alan Treadway
86e5d6b868 Revert "Disable multiple user for corp-liable mode"
This reverts commit 1dc510eb5bc7f279002a3479f24761f08cc390f7.

Change-Id: I12ea8275369cbdc4e95b21c7f5d51b4f0e5da7b2
2015-11-23 17:40:54 +00:00
Ricky Wai
9aa233899f Merge "Add work contacts directory support in Quick Contacts API" 2015-11-23 14:50:06 +00:00
Ricky Wai
494b95d302 Add work contacts directory support in Quick Contacts API
Bug: 25764505

Change-Id: I61f9d13ea03352e3df1686ee4b3bcc43e9a9a760
2015-11-23 13:32:45 +00:00
Mahaver Chopra
71c84e515e Merge "Disable multiple user for corp-liable mode" 2015-11-23 10:07:43 +00:00
riddle_hsu
40b300fd80 Fix race condition when collecting op callback.
Other threads may change mOpModeWatchers, mPackageModeWatchers
by startWatchingMode, stopWatchingMode.

Change-Id: Id260172979ddfc2df9331880805d16ee13e183eb
2015-11-23 13:22:03 +08:00
Jinsuk Kim
179e858b78 Merge "CEC: Replace determistic mute commands" 2015-11-22 23:07:06 +00:00
Lorenzo Colitti
b85c7d5bc0 Merge "Add a test that checks the contents of DISCOVER packets." 2015-11-22 16:34:09 +00:00