Commit Graph

7149 Commits

Author SHA1 Message Date
Suprabh Shukla
338c1d8607 Merge "Added an api to uninstall a packge with active DAs" into nyc-dev 2016-02-10 22:47:59 +00:00
Suprabh Shukla
a2ae2238e5 Added an api to uninstall a packge with active DAs
The api deactivates all the active admins in the package, then force
stops the package and starts the uninstall intent for the package. This
is intended to provide an easy way for a user to delete a misbehaving
Device Admin

Bug: b/22359208
cherrypick of Ic7ddd89ef6db53e7e76f805808d9e806100374db

Change-Id: I0d677839120c46f22231a7d6f9cf6630cb020227
2016-02-10 13:57:22 -08:00
Adrian Roos
9b123cf9bb Make actions extend over the whole action rail
Bug: 26767249
Change-Id: I3c67f1de40b218aa21f0a1f68bda1032c0804a14
2016-02-10 18:39:40 +00:00
Adrian Roos
691546e5b7 Isolate Keyguard from main thread badness
Adds a bindService variant to run the ServiceConnection callbacks
on a dedicated Handler.

Changes KeyguardService binding to use the foreground thread
instead of the main thread and changes state to the
KeyguardScrim on the UI thread.

Bug: 26954967
Change-Id: I9d7bd85382816cd0e23772b14ff6518266a9d232
2016-02-10 18:17:29 +00:00
Rubin Xu
1f3895b9d9 Merge "Require delegated cert installer and app restriction manager to exist" into nyc-dev 2016-02-10 16:29:35 +00:00
Rubin Xu
f03d0a6bfc Require delegated cert installer and app restriction manager to exist
Enforce that apps with delegated powers to exist on device before
empowering them. This is consistent with DevicePolicyManagerService's
internal logic to clear the delegation power once the package is removed.
For delegated cert installer, only enforce this new restriction on
device admins targeting N or later.

Bug: 26233778
Change-Id: Ia8f45dfd5290958cebb36991c4b6baa03e8c28ae
2016-02-10 16:29:01 +00:00
Julia Reynolds
146d931ece Merge "Allow apps to know what users think of their notifications." into nyc-dev 2016-02-10 14:10:24 +00:00
Svetoslav Ganov
e0feadcaac Merge "Add an API to query the package name of the services shared lib" into nyc-dev 2016-02-10 03:00:09 +00:00
Svet Ganov
d7b1f41109 Add an API to query the package name of the services shared lib
The servcies shared lib contains components apps can invoke such
as services to bind to, activities to start, UI choosers, etc.
This lib is built from AOSP code but an OEM may chage its
package name. For example, Google renames the package names for
GMS apps from android.foo.bar to com.google.android.foo.bar.
While we have more than one shared lib that are a part of the
platform (currently shared and services libs) the serivces lib
is the only one clients need to start components in, thus need
to know its package name. This change adds an API to query the
package name of the services shared lib. The API is hidden as
currently the only clients are a part of the system.

Change-Id: Ied48fa4819024522791764b22b3336d4f4b42cc3
2016-02-09 18:49:27 -08:00
Wale Ogunwale
0489c1459e Merge "Reduce jank during pinned stack animation" into nyc-dev 2016-02-10 00:11:11 +00:00
Jeff Sharkey
950b30426e Merge "More encryption-aware triaging." into nyc-dev 2016-02-09 23:00:55 +00:00
Jeff Sharkey
c7bacab20f More encryption-aware triaging.
Most of these callers are okay having results omitted when a package
is uninstalled or encryption unaware.  For example, jobs and
notifications can only be enqueued by already running apps.

When clearing zen rules, keep around rules inserted by apps on
ejected external storage devices.

Make ServiceWatcher stricter by requiring that the matching package
be in the system image.

Bug: 26471205, 27105254
Change-Id: Ie41ea8042ac1a54e9cbe0c35cec89e70521e9bed
2016-02-09 15:56:13 -07:00
Wale Ogunwale
480dca0d1b Reduce jank during pinned stack animation
- Don’t launch Pip overlay activities during pinned stack animation.
This causes extra CPU load and takes a way resources from the running
animation.
- Finish Pip overlay activities before starting pinned stack resize
animation. Reduces the amount of work the system needs to do to keep
the overlays in-sync with the other activities in the pinned stack.
- Use AM.resizeStack with null bounds to take Pip to fullscreen so that
we can animate the bounds changed.
- Also, fixed Activity.enterPictureInPicture API to animate the transition
if Pip is entered from the app instead of Pip manager.

Bug: 25672053
Change-Id: I82399c10f1b8c675ea3861ba973dc8ecfbfbe50f
2016-02-09 12:48:11 -08:00
Julia Reynolds
81afbcdbf9 Allow apps to know what users think of their notifications.
- App wide blocking
- Topic importance

Change-Id: I9026e5c26c5dbcab1c86c385beede891f961933f
2016-02-09 14:54:08 -05:00
Phil Weaver
f564afa4cd Clean up UiAutomation working alongside a11y.
Fix two bugs: one where Instrumentation did not properly
handle destroyed UiAutomations, another where UiAutomation
did not properly disable running accessibility services.

Change-Id: I1773dbd373f4d5b0e7c9917ff18d8d9b1a0e07c7
(cherry picked from commit 846522cea0)
2016-02-09 00:08:59 +00:00
Paul Crowley
23b588c7b3 Merge "Password security for FBE disk encryption keys" into nyc-dev 2016-02-08 21:45:45 +00:00
Jeff Sharkey
95728a5db6 Merge "Move graphics and JIT caches to DE storage." into nyc-dev 2016-02-08 19:47:20 +00:00
Jeff Sharkey
e84bdd38ad Move graphics and JIT caches to DE storage.
We confirmed with the graphics and JIT teams that no sensitive
user data is written to these caches, so they're safe to point at DE
storage.

Since we don't have control over what is written by the app, we need
to keep the cache environment variable pointing at CE storage.

Fix ensurePrivateDirExists() to always return a path, instead of
returning null which can cause scary bugs.

Change packages.list to no longer canonicalize data paths, since
these fail when CE storage is still locked.

Bug: 27069522
Change-Id: Ifff64a036fa4aa1e61aa0dd98486bc711fbf8f4a
2016-02-08 12:24:05 -07:00
Adam Powell
44ba79e47d Permit setRetainInstance(true) on nested fragments, framework edition
Save arbitrarily nested fragments across config changes as
nonconfiguration objects. This permits the use of retain-instance
child fragments as arbitrary opaque dependencies within other
fragments.

Change-Id: Ia6640b76cfcf7ec28ba252628957a0c14863e957
(cherry picked from commit 7466be6626)
2016-02-08 19:10:44 +00:00
Adam Powell
8585ed66b9 FragmentTransaction.commitNow, framework edition
Offer commitNow and commitNowAllowingStateLoss methods on Fragment for
use by encapsulated components using fragments as implementation
details. This can help prevent unexpected ordering side effects at the
app level when a call to a library method wants to commit and
immediately initialize a fragment as an implementation detail.

Note that this change still does not permit reentrant FragmentManager
operations. It is still an error to add/remove/change fragments in the
same FragmentManager while a fragment transaction is being executed.

Have the commonly used ViewPager adapters use commitNow instead of
executePendingTransactions.

Change-Id: Ia37a871234a287423063f0c2c3e4c93d69116cad
(cherry picked from commit f6b30662f8)
2016-02-08 19:00:52 +00:00
Paul Crowley
faeb3eb0ba Password security for FBE disk encryption keys
Add the means to protect FBE keys with a combination of an auth token
from Gatekeeper, and a hash of the password. Both of these must be
passed to unlock_user_key. Keys are created unprotected, and
change_user_key changes the way they are protected.

Bug: 22950892
Change-Id: Ie13bc6f82059ce941b0e664a5b60355e52b45f30
2016-02-08 15:58:29 +00:00
Julia Reynolds
d560729ce3 Update DND visual interruption choices.
Change-Id: I7050264839c566dcef1dd01d155dda694a8d1ec0
2016-02-08 15:20:02 +00:00
Tamas Berghammer
25222f55f2 Merge "Add flag to "am start" to enable native debugging" 2016-02-06 13:18:58 +00:00
Amith Yamasani
046cc21b75 Merge "Rewrite app standby stats" 2016-02-05 19:41:04 +00:00
Amith Yamasani
a93542f9d3 Rewrite app standby stats
Don't mix up with usage stats. Keep a separate db and history
based on elapsed time and screen on time.

Unit tests for AppIdleHistory class.

Bug: 26989006
Change-Id: If343785b46da1db67f7c1c1263854c2732a232c6
2016-02-05 11:38:29 -08:00
Selim Cinek
2a7fc72ac4 Merge "Adapted the notification header colors to spec" 2016-02-05 19:22:01 +00:00
Selim Cinek
aef485a32a Adapted the notification header colors to spec
Change-Id: Ifa9483a5e71f32be2df14912982076d7bf2a6e9a
2016-02-05 10:43:00 -08:00
Alan Viverette
6486324d24 Merge "Ensure Bitmap.getDefaultDensity() matches DENSITY_DEVICE" 2016-02-05 15:30:28 +00:00
Shreyas Basarge
181a43103b Merge "Add more logging to JobScheduler" 2016-02-05 11:51:33 +00:00
Dimitry Ivanov
2343f8dfcd Merge "Workaround for apps loading foreign native libs" 2016-02-04 22:13:53 +00:00
Dimitry Ivanov
add74a4629 Workaround for apps loading foreign native libs
Bug: http://b/26954419
Change-Id: I4272d015213b386abc1b04c0349cf1b081288058
2016-02-04 14:11:58 -08:00
Alan Viverette
2ac46f1bda Ensure Bitmap.getDefaultDensity() matches DENSITY_DEVICE
Otherwise bitmaps constructed without a target display are incorrectly
scaled by a factor of (DENSITY_DEVICE / DENSITY_DEFAULT) when rendered
to a Canvas whose density has been specified correctly.

Bug: 26817900
Change-Id: I45edfc7c0cbdf84a267d5bedacb0548659ede301
2016-02-04 16:58:14 -05:00
Sudheer Shanka
57218cbbf7 Merge "Made changes to fix some policy transparency options." 2016-02-04 19:14:14 +00:00
Shreyas Basarge
d8bf6b9fed Add more logging to JobScheduler
Improves logging in perioidc job period clamping.
Added sourcePackage to dumpsys in JobScheduler.

Bug: 26874152
Change-Id: Iaccd6df3e70dfcae16e983893a708342fda637b3
2016-02-04 14:34:46 +00:00
Steven Ng
ee081d5bd0 Merge "Add new permission and action for managed provisioning (QR flow)" 2016-02-04 10:24:44 +00:00
Sudheer Shanka
569258689a Made changes to fix some policy transparency options.
Add isInputMethodPermittedByAdmin and
isAccessibilityServicePermittedByAdmin APIs in DevicePolicyManager.
And update utility methods in RestrictedLockUtils to use the correct
userId when checking if disabled by admin.

Bug: 26897250
Bug: 26767564
Bug: 26966213
Change-Id: I0b74b3e57904a82f8ce72d856769d35b5e8403e5
2016-02-04 01:12:44 +00:00
Antonio Cansado
1e3f04f090 Merge "Adding a callback to notify data usage." 2016-02-03 18:16:51 +00:00
Clara Bayarri
5b5bda42f0 Merge "Keyboard Shortcuts Helper: Use App name for default group" 2016-02-03 12:17:12 +00:00
Clara Bayarri
ada88b36af Keyboard Shortcuts Helper: Use App name for default group
Change-Id: I802dd6c9dcc838b9f06b29b99dc47dd93634d98b
2016-02-03 11:45:20 +00:00
Calin Juravle
e578f454c6 Merge "Enable profile support for apps with shared runtime" 2016-02-03 10:03:24 +00:00
Wale Ogunwale
e8c9238de1 Merge "Added onMultiWindowChanged and onPictureInPictureChanged methods to Fragement class" 2016-02-02 23:53:47 +00:00
Wale Ogunwale
7c796811c0 Added onMultiWindowChanged and onPictureInPictureChanged methods to Fragement class
Bug: 26688489
Change-Id: I611444b29199b4686c9f78dbdd33c9b71820aec4
2016-02-02 15:45:00 -08:00
Antonio Cansado
ba8288d238 Adding a callback to notify data usage.
Allow holders of android.Manifest.permission#PACKAGE_USAGE_STATS
to be notified when data usage has exceeded a given threshold.
This allows an app to update its data usage metrics without
polling.

Bug: 25812785
Change-Id: I3a4904a97f3c7fbaf8071b460f9ee6ca9c1ba4ed
2016-02-02 15:18:41 -08:00
Makoto Onuki
e3936dcf03 Merge "DO / PO Shouldn't be removed as active admin..." 2016-02-02 22:55:48 +00:00
Makoto Onuki
90b896533e DO / PO Shouldn't be removed as active admin...
even if they asked.

Also clear(Device|Profile)Owner should remove them as the active admin
too.

Also add some more unit tests.

Bug 26858840

Change-Id: I7b3ed92e1b4cbe803381ed6e3f64d8de17b2ebb0
2016-02-02 14:54:06 -08:00
Michael Lentine
a8a8545f1b Merge "Fix activity thread." 2016-02-02 21:57:20 +00:00
Julia Reynolds
4c0c202f51 Don't require apps to call showLights to use default lights.
Bug: 26810573
Change-Id: I431a1a18e32c616238e763b401b5f6b14131fd89
2016-02-02 15:11:59 -05:00
Julia Reynolds
dd3e86bcb0 Allowing querying for apps with blocked topics.
Bug: 26882239
Change-Id: If888cb18891a412067bcb28e575f502c6091f77a
2016-02-02 12:51:06 -05:00
Steven Ng
980a1b6fa8 Add new permission and action for managed provisioning (QR flow)
+ Instead of reusing NFC provisioning action, new action and permission
  are introduced for QR code provisioning

Bug: 26240297
Change-Id: Id2632d6c6b9e62bf3cad5bc141430d49df4a2c5d
2016-02-02 17:43:18 +00:00
Michael Lentine
2ba303fa9b Fix activity thread.
Fix activity thread to not call into the threaded renderer if it is
an isolated process.

Change-Id: I57035f5ff64d134866f9d2e19c60ab99657aea64
2016-02-01 20:44:37 -06:00