Throw a SecurityException if it is not true for an activity launched
using ActivityContainer.startActivity().
Change-Id: Id1d70e630195a49a3eccdc64a0beccc420400332
Add a new enabled state for a managed profile.
Expose that as a new API on DevicePolicyManager.
Set the new state when enabling the profile.
Return only enabled profiles from the user manager.
Bug: 13755441
Bug: 13755091
Change-Id: I2907b182e19b3562592da688b3f68ef5f4088557
Part of a larger effort to reuse service management code. This is
mostly algebraic, simply move code related to listener management
into a new helper, and cut the backreference to NoMan. Put
user-profile code into reusable inner helper, and common uid-checking
code into a new static util helper.
Resist the urge to rewrite / reformat, but replace HashSet with
ArraySet.
Bug:13743109
Change-Id: I59e0131f632c3bbf555b5276dc5092422113cdc3
Activities were associating with existing tasks when their
components matched. This was causing them to be launched
into existing stacks rather than into their ActivityView. Adding
these flags forces the launches to be in unique tasks on their
ActivityView.
Fixes bug 14252286.
Change-Id: I9ba65a4a2da198435748c0a17396d3f7f8c75f5e
Currently this is gated on being a system or root app with the
MANAGE_USERS permission; third-party MDM apps set as device or profile
owner should have this ability as well.
Bug: 13585295
Change-Id: I61d21b13b9ec66fc0cb497ec2007ee732461d448
This change contains fixes to base from libcore change
I37de3e7d1a005a73821221e6156d10b95c595d7a
Bug: 13927110
Change-Id: I2d96e50307611c269dcf47886cd4d976854da8fc
Introduce new ACTION_PICK_DIRECTORY that allows users to grant access
to an entire document subtree. Instead of requiring grants for each
individual document, this leverages new prefix URI permission grants
by defining new "via"-style URIs:
content://com.example/via/12/document/24/
This references document 24 by using a prefix grant given for
document 12. Internally, we use isChildDocument() to enforce that
24 is actually a descendant (child, grandchild, etc) of 12. Since
this is an optional API, providers indicate support with
Root.FLAG_SUPPORTS_DIR_SELECTION.
Extend DocumentsUI to support picking directories. Expose
createDocument() API to work with returned directories.
Offer to canonicalize via-style URIs into direct URIs, generating
exact permission grants along the way. Override openAssetFile()
to pass through CancellationSignal. Move testing code into ApiDemos.
Bug: 10607375
Change-Id: Ifffc1cff878870f8152eb6ca0199c5d014b9cb07
Define new FLAG_GRANT_PREFIX_URI_PERMISSION which indicates that a
Uri permission grant should also apply to any other Uris that have
matching scheme, authority, and path segments. For example, a prefix
grant for /foo/ would allow /foo/bar/ but not /foo2/.
Allow persistable and prefix grants to be issued directly through
grantUriPermission(). Relaxing persistable is fine, since it still
requires the receiver to actively take the permission.
Since exact- and prefix-match grants for the same Uri can coexist,
we track them separately using a new UriGrant key. (Consider the
case where an app separately extends READ|PREFIX and WRITE for
the same Uri: we can't let that become READ|WRITE|PREFIX.)
Fix revoke to always take away persisted permissions. Move prefix
matching logic to Uri and add tests. Add new flags to "am" tool, and
various internal uses around Intent and Context. Switch some lagging
users to ArraySet.
Bug: 10607375
Change-Id: Ia8ce2b88421ff9f2fe5a979a27a026fc445d46f1
Load and store user configuration for do not disturb. Separate
out service-related aspects into new helper. Make config availble
over NoMan for settings.
Implement phone + message based filtering (package whitelist for now).
Implement automatic enter/exit zen mode overnight scheduler.
Bug:14211946
Change-Id: Ib28aab0e4c5c9a5fd0b950b2884b1ab618fdfeca
This service will ultimately be responsible for propagating scores
down to lower-level network subsystems. For now, it just keeps scores
in memory and exposes these for debugging purposes via "adb shell
dumpsys network_score".
This change also adds provisioning of a default scorer. When
NetworkScoreService is first initialized, it checks to see if it has
ever set a default scorer; if not, it reads a package name from a
build config property and attempts to set it as the default.
Also add autogenerated equals/hashCode methods to all parcelables.
Bug: 14111427
Bug: 13786258
Change-Id: I02271171653d42e12acd240b73b9e23950744f6b
Don't add the surface to the VirtualDisplay until the activity
has drawn. That will keep the TextureView from turning black.
Fixes bug 12821632.
Change-Id: Ia06e9f91be3e14ad724f735ae4e201ac798863a2
Major changes to maintain the VirtualDisplay across repeated
attach/detach cycles of an ActivityView. This keeps the activities
and VirtualDisplays in the ActivityView from getting into bad states.
Fixes bug 14107002.
Change-Id: Idc2aaf85ac496eab0eeb436736cb10a2020040e8
Two handlers are used to call a function, but the init was not forcing them on the
same looper/thread, so we could get synchronization problems as a result.
Moved to a single looper.
Also added finally clauses to clean up if a broadcast throws an uncaught exception.
bug:13399768
Change-Id: I0044e2442335ee45a15588f910064e848cf6ac55