Commit Graph

6861 Commits

Author SHA1 Message Date
Jorim Jaggi
fe89d122e5 Add infrastructure to track activitiy relaunches
As a preparation to start synchronizing task size
with activity relaunches, we need a infrastructure
so we know in AM/WM when an activity is relaunching
and when it's done relaunching.

Bug: 26311778
Bug: 25015474
Change-Id: Ied3795eddbcd112f6329494afbf13178ca49a799
2016-01-05 13:48:46 +01:00
Jorim Jaggi
dc249c4ae7 Change behavior when resizing docked stack
- Add an API resizeDockedStack to resize the docked stack
and supply temporary task bounds, which can be different from
the stack bounds.
- Use that API in SystemUI to only switch task bounds when
crossing thresholds, so we have less flickering and more
predictable resizing.

Bug: 25015474
Bug: 26311778
Change-Id: Id5c9277dd908ccc28f95dab023efc914757a50d0
2016-01-05 13:44:24 +01:00
Wale Ogunwale
03ce863860 Added support for notifying listeners when an activity is pinned.
Also, protected AMS#registerTaskStackListener call with
MANAGE_ACTIVITY_STACKS permission.

Bug: 26273032
Bug: 25928537
Change-Id: Ic5e663e373978e0429ecdcc6934a51a295c18268
2016-01-05 03:22:25 +00:00
Wale Ogunwale
854809c074 Added hidden API for specifying launch stack in ActivityOptions
Bug: 26273032
Change-Id: Ifb9c70e6783b0426613709693e11742d80ba2fc3
2016-01-04 23:58:18 +00:00
Chris Wren
29b7dd8d69 Merge "implement assistant service connection" 2016-01-04 21:07:24 +00:00
Alan Viverette
db8f4e56fd Merge "Clean up date picker, add simple constructors and setter for listener" 2016-01-04 18:47:55 +00:00
Chris Wren
51017d0e23 implement assistant service connection
Added a guest-mode to ManagedServices.
Like system services, the lifecycle of a guest is not managed.
Unlike system services, guests are not considered privledged.

The Assistant gets all the usual listener events.
Implemented adjustImportance.
Future work: enqueued, clicked, visibility, removed, annotations

Bug: 22455414
Change-Id: Ic41c0bf625b5e98cb577b49098bba23a539bb507
2016-01-04 11:22:37 -05:00
Adrian Roos
7213bdd104 Merge "Add reply text section to notifications" 2015-12-29 13:05:46 +00:00
Vladislav Kaznacheev
b23a757aa2 Bind DropPermissions life cycle to Activity
Move requestDropPermissions from DragEvent to Activity.
Permissions will be granted using UriPermissionOwner
 associated with this activity and revoked when the activity
 is destroyed (if DropPermissions.release is not called before that).

Change-Id: Ic8f8fc3f56f57e83b9bc34ae8c96d82c2c9c4e1d
2015-12-22 14:40:11 -08:00
Benjamin Franz
b6c0ce4ac9 Allow device and profile owner to modify accounts
The user restriction DISALLOW_MODIFY_ACCOUNTS and the policy
DPM.setAccountManagementDisabled can now be circumvented by a device
or profile owner. This allows the device or profile owner to add
accounts without briefly having to remove the policy.

Bug: 22030831
Change-Id: I2b59c4b3ad354287d7a00f21b2afef072d12517d
2015-12-22 15:50:30 +00:00
Calin Juravle
fda25dad28 Merge "Pass app\'s code paths to the runtime" am: db73912471
am: 7d7ab7ad3b

* commit '7d7ab7ad3b096d28b274024705b3171e42bebdcd':
  Pass app's code paths to the runtime
2015-12-21 01:57:12 -08:00
Calin Juravle
7d7ab7ad3b Merge "Pass app\'s code paths to the runtime"
am: db73912471

* commit 'db73912471df39aa527971f2884f37295616d3a9':
  Pass app's code paths to the runtime
2015-12-21 09:52:40 +00:00
Selim Cinek
3a2c4b9d52 Fixed the maximum number of lines for the bigtext view
Since the summary is now in the header, we can allow one
more line in bigtext. Also made it look nicer if the
bigtext was empty, in case we always want to use bigtext
by default.

Change-Id: I13679de084757ef174b3bf53e75837a4d95ddc99
2015-12-19 16:23:04 -08:00
Selim Cinek
860b6dac96 Measuring the notifications at wrap_content height now
The notifications are now measured at wrap_content such
that the layout still looks good even if the text
was ommited instead of arbitrarily making it bigger.
This also fixes some small rounding issues where the
expanded notification was just a pixel bigger than
the collapsed version.

Bug: 26185377
Change-Id: Ie3339ff75680ab512446605055304576e058f588
2015-12-19 16:22:52 -08:00
Selim Cinek
624c02db7f Fixed the public notifications views on the lockscreen
The views were based on a legacy systemUI notification.
We are now creating it in Notification.java in order to
always have the latest visuals and avoiding duplicate work.

Change-Id: I3f544cad069a8eab34d4464404d020e06d7f6626
2015-12-19 16:07:43 -08:00
Dimitry Ivanov
20e082c7dd Merge "Use shared namespace for bundled app classloader" 2015-12-19 00:49:08 +00:00
Julia Reynolds
e00da66cdc Merge "Differentiate between apps that use topics and those that don't." 2015-12-18 21:09:45 +00:00
Julia Reynolds
be8fdee532 Differentiate between apps that use topics and those that don't.
Bug: 22451710
Change-Id: Idb567a4fc511a03cb999179765cfa4cbeb63dcb7
2015-12-18 15:57:43 -05:00
Ruben Brunk
55bed95778 Merge "Add a framework service tracking VR mode state." 2015-12-18 19:50:24 +00:00
George Mount
69b495bdb8 Merge "Alt-up moves focus to the toolbar in action bar mode." 2015-12-18 15:46:31 +00:00
George Mount
5beb2617f9 Alt-up moves focus to the toolbar in action bar mode.
Bug 24811572

Change-Id: Ie065fa13ba76131e700e73984a99fc60a7aa513c
2015-12-18 07:44:50 -08:00
George Mount
7f55215afd Merge "Reset accessibility after Activity enter transition." 2015-12-18 15:29:52 +00:00
Winson Chung
0583d3d188 Hiding pinned stack tasks from overview
Bug: 25381158
Change-Id: Iad442b7f5dc49109529cb5dab2168b19837af6e3
2015-12-18 10:05:13 -05:00
Julia Reynolds
9d7381e28b Merge "Allow users to set app-wide Importance default" 2015-12-17 22:12:04 +00:00
Julia Reynolds
a07af88b95 Allow users to set app-wide Importance default
And the associated ui changes to the notification guts.

Bug: 22451710
Change-Id: I4e0b11e7b24d70b039a432c5e6cd76c9c7cc547c
2015-12-17 16:53:36 -05:00
Ruben Brunk
dd18a0b695 Add a framework service tracking VR mode state.
- Implement a "VR mode" that may be enabled by a focused Activity.
- Add a system service that tracks the current VR mode state and notifies
  other core framework services of mode changes.
- Extend NotificationListenerService to allow the bind/unbind lifecycle
  of specified listeners to be triggered by system events.

Bug: 22855417
Bug: 25479708

Change-Id: I1ac8692bbb5521bb6c7cfb9d2b56b98b720f8568
2015-12-17 10:09:17 -08:00
Filip Gruszczynski
3d0267143f Only add noDisplay activities to freeform source tasks.
We started adding noDisplay activities to source tasks to make the
resolver activity show up within the same task bounds as what caused it
to appear. However, in other cases it might cause to add a noDisplay
activity to a task in which we don't expect anything to appear, e.g.
home task when launching from home.

Bug: 26128908
Bug: 26023670
Change-Id: I2f64e82b3c3754cdbcb4cac3f907674344e67e04
2015-12-17 09:56:45 -08:00
Filip Gruszczynski
92e432c30e Refactor and improve window layering.
This CL moves layer calculation into a separate class, so the whole
logic can be encapsulated. It also extracts special cases from the
general loop and instead applies them at the end. This simplifies the
logic in the main algorithm and makes it clearer what needs to happen
for special cases.

Bug: 26144888

Change-Id: I87347bf0198bd0d3cd09e4231b4652ab979f2456
2015-12-17 08:55:50 -08:00
Alan Viverette
ad50da54f0 Clean up date picker, add simple constructors and setter for listener
Also adds annotations.

Change-Id: I8498277162176840d6d6de8ad03334366e350eaa
2015-12-17 11:41:05 -05:00
Esteban Talavera
f3378a29e9 Merge "Device or profile owner can let another app manage app restrictions" 2015-12-17 10:59:16 +00:00
Mahaver Chopra
699d537d1b Merge "Adding DPM.reboot" 2015-12-17 10:59:01 +00:00
Esteban Talavera
bf60f728cc Device or profile owner can let another app manage app restrictions
The device or profile owner can allow another
package to set app restrictions for any app in that user

Similar to the way it can give permission to access
CA certificate related APIs from M.

Bug: 22541936
Change-Id: I0c1b0804ad300dfa4fbdc1c7721c5d8653d77861
2015-12-17 10:57:09 +00:00
Calin Juravle
f19c9638dd Pass app's code paths to the runtime
The runtime needs the application's main code paths so it know for which
dex files to record the profile.

Bug:26080105
Change-Id: I5f2cb5c140aa6893ac78bc0d5897e33764569e5b
2015-12-17 12:38:27 +02:00
Adrian Roos
e458aa8dbd Add reply text section to notifications
Also fixes a potential NPE in the failed
inflation logging in SystemUI.

Bug: 22452379
Change-Id: I829c332f7f708de8374740f6d02a2bc10a33386b
2015-12-16 16:42:08 -08:00
George Mount
10d312b5da Reset accessibility after Activity enter transition.
Bug 25504648

Invisible views don't respond to accessibility. The transition
system uses a sneaky way to make an invisible view visible
with the GhostView, so the views becoming visible doesn't
trigger the accessibility system to recognize the newly-
visible views. This forces accessibility to rescan the contents
after the transition completes.

Change-Id: If57114b7e7ee304707d53dd235cd7795df8f509f
2015-12-16 14:00:35 -08:00
Wale Ogunwale
9c604c7c1d API for an Activity to enter picture-in-picture mode.
Bug: 25580820
Change-Id: I5c1bf17dd5dd92622458a61517bc9941e4ee5277
2015-12-16 11:01:46 -08:00
Andrei Stingaceanu
1e2839188f Wire call to suspend a package
Adds APIs in DevicePolicyManager and PackageManager for allowing
a device admin to suspend a package. PackageManagerService sets
or unsets a new PackageUserState 'suspended' setting. Terminal
command to suspend/unsuspend has been added via
PackageManagerShellCommand (as root).

Next steps:
* use the new 'suspended' setting for denying access to start app
(probably in ActivityStackSupervisor)
* broadcast a PACKAGE_(UN)SUSPENDED intent for launchers to pick up
* remove app from recents (go further and kill it if it is running)
* erase existing notifications for this app

Bug: 22776576
Change-Id: I718b3498f6a53cc0c6fdfb6d15031e53ddca4353
2015-12-16 18:14:14 +00:00
Mahaver Chopra
1ce53bc571 Adding DPM.reboot
Adding new policy in DPM to trigger reboot on the device.
Requirement: Device owner can reboot the device if it is stuck or is
not useable due to some unresponsive UI.

Bug: 25304994
Change-Id: I7a6d5c8ad611de9c1cf6619378e492a306b41626
2015-12-16 17:55:54 +00:00
Wale Ogunwale
2336f716c8 Merge "Only persist task bounds for freeform tasks." 2015-12-16 15:32:27 +00:00
Dimitry Ivanov
75b10ecccd Use shared namespace for bundled app classloader
Allow bundled apps to reference platform native libraries
located in subdirectories of the default library path
(/system/lib/hw/* for example).

In addition to this bundled apps need to share native
libraries with default namespace. Added parameter to
ApplicationLoaders.createClassLoader() to do just that.

Bug: 26165097
Bug: 26164393
Change-Id: I833b4f758c4df8f8958d72eafd5d47ef14079ce1
2015-12-15 22:20:34 -08:00
Christopher Tate
ffa6a88658 Add crop hint and backup-eligible info to wallpaper API
The OS will not distinguish between the physical underlying wallpaper
image and the target displayable subrect of that image.  This will enable
more pleasing conveyance of backed-up wallpaper imagery between dissimilar
devices.  The allow-backup hint is a way for wallpaper sources to ensure
that the OS doesn't back up imagery that should not be propagated across
devices.

(NB: the backing implementation isn't in place yet; this is just to
permit forward-looking work on client apps in the interim.)

Bug 25454501
Bug 25453848

Change-Id: Id014d552ae509f659992d57b915ef95c5d4b8d1a
2015-12-15 17:43:35 -08:00
Wale Ogunwale
807d8826b1 Only persist task bounds for freeform tasks.
Bug: 26216628
Change-Id: Ibe28d7f988675086e233da371baf526eb7254fa7
2015-12-15 17:05:09 -08:00
Jeff Davidson
40e2ce37d3 Merge "Relax permissions around NetworkStatsManager APIs." 2015-12-15 19:04:25 +00:00
Wale Ogunwale
eb6722c0bc Fixed bug with caption not showing for some apps that handle config changes
We currently decide when to show the decor caption onConfigurationChanged
However, if the app handles configuration changes or the threshold isn't
big enough for the configuration change to be reported to the app, we don't
display the caption in some cases when transitioning from fullscreen mode
to freeform mode.
We now also use the onMultiWindowModeChanged call to also determine if
the caption should be visible.

Change-Id: I237437f04ad90f904912ebac0253245f547b0e3e
2015-12-15 09:01:45 -08:00
Clara Bayarri
b3987bd7e9 Make ConfirmCredentials take user into account when creating intent
The existing implementation returned null if the device was not locked,
but when using ConfirmCredentials for the Work Profile we need to take into
account the user we want to confirm credentials for, given that the device
user might not have a lock but the work profile will.

Change-Id: Ifb5882846b0a62c73ac7cc04d90d1a4d9b103e63
2015-12-15 10:45:13 +00:00
Jeff Davidson
1efb133581 Relax permissions around NetworkStatsManager APIs.
Currently, access to network usage history and statistics requires a
signature|privileged permission, an AppOps bit (associated with the
PACKAGE_USAGE_STATS permission), or device/profile ownership. Once
access is granted via one of these mechanisms, it generally applies to
any UID running in the same user as the caller.

This CL expands access as follows:

-Any app can access its own usage history with no extra requirements.
-Carrier-privileged applications can access usage history for the
entire device.
-Device owners can access per-UID breakdowns for usage. Previously
they could access the summary for the whole device, but not the
individual breakdowns.

We simplify the permission model by defining three access levels -
DEFAULT (own app only), USER (all apps in the same user), and DEVICE
(all apps on the device), and propagate these levels throughout.

Finally, this CL fixes an apparent bug in
NetworkStatsSerice#hasAppOpsPermissions - if the AppOp bit was in
MODE_DEFAULT, hasAppOpsPermission would always return false instead of
falling back to the PackageManager permission check.

Bug: 25812859
Bug: 25813856
Change-Id: Ic96e0776e2a4215a400163872acea1ededfaced9
2015-12-14 17:16:37 -08:00
Wale Ogunwale
5144d154b5 Merge "Still save config on client side when not reporting to activity." 2015-12-15 00:06:02 +00:00
Wale Ogunwale
14e811f5d9 Still save config on client side when not reporting to activity.
On the client side we have additional protection not to save new
configuration reported by activity manager if the app isn't handling
any of the configuration change that occurred. This is done because
the activity is expected to relaunch for any configuration it doesn't
handle. However, with multi-window support the activity manager doesn't
relaunch an activity if the configuration change doesn't cross a resource
threshold.
We now save the configuration on the client side when activity manager
tells us not to report the changes to the app (i.e. configuration
changed, but wasn't big enough for relaunch)

Bug: 23904868
Change-Id: I54f65cad65c1b8ed5da1165a8b2816adbea41d4b
2015-12-14 15:04:22 -08:00
Jason Monk
ded2b10520 Merge "Support dnd condition in Settings" 2015-12-14 15:39:55 +00:00
Gustav Sennton
88b3b57341 Merge "Add functionality for changing WebView provider." 2015-12-14 14:33:56 +00:00