Commit Graph

5922 Commits

Author SHA1 Message Date
Adam Skory
e76e7014c7 Don't forget to parcel mIsAppProvidedIntent
If you forget to parcel it like I did, it's
not going to do you much good.

Change-Id: I85191594e7ffab2c36aeed317932b126da288bdf
2015-06-05 19:08:01 -06:00
Adam Skory
a28863e769 Merge "Record provision of custom Intents in AssistContent" into mnc-dev 2015-06-06 01:01:00 +00:00
Adam Skory
cd70c64f50 Record provision of custom Intents in AssistContent
Simplifies behavior wrt automatically setting the
web URI for ACTION_VIEW Intents, by not doing so
for custom Intents.

Adds a boolean isAppProvidedIntent() as a signal for
recepients of the AssistContent that a custom Intent
was provided. Custom Intents are more likely to be
relevant.

Change-Id: Ibe4bfa040eba904411b9820ab4ddfcf509413829
2015-06-05 18:55:29 -06:00
James Cook
74f3d39671 Merge "Allow different visual and voice assist prompts" into mnc-dev 2015-06-05 23:49:59 +00:00
Stefan Kuhne
5c6c06bf18 Merge "Adding am send-trim-memory command" into mnc-dev 2015-06-05 23:37:15 +00:00
James Cook
6cf397508e Allow different visual and voice assist prompts
* Introduce VoiceInteractor.Prompt, holding multiple voice prompts
("What genre?", "What genre of music?", "What genre of music, for
example classical?") as well as a different visual prompt to show
on screen ("Choose genre").
* Migrate framework voice interactor code from a CharSequence prompt
to Prompt.

Bug: 21024958
Change-Id: Ib595fbdb2801cc558085e9b8366d619ff1d4d656
2015-06-05 16:36:22 -07:00
Stefan Kuhne
16045c24fe Adding am send-trim-memory command
This patch adds a send-trim-memory command to the ActivityManager to allow
for better debugging&testing.

The command is
adb shell am send-trim-memory [--user <USER_ID>] <PROCESS> <LEVEL>
whereas LEVEL can be one of the following:
[HIDDEN|RUNNING_MODERATE|BACKGROUND|RUNNING_LOW|MODERATE|
 RUNNING_CRITICAL|COMPLETE]

Bug: 21633189
Change-Id: I7a41ce02c3c9043ffd3e5aaa791f7b7306a9de49
2015-06-05 16:30:29 -07:00
Zoltan Szatmary-Ban
c92550e4b4 Merge "Replace renamed reference to NetworkStats in javadoc" into mnc-dev 2015-06-05 09:59:02 +00:00
Filip Gruszczynski
43c4cd1c82 am 93634166: am d88e4d50: Merge "ActivityView: set surface on a background thread." into cw-d-mr1-dev
* commit '93634166c8c78bdeccf045c62a0f601dceed74e3':
  ActivityView: set surface on a background thread.
2015-06-05 02:18:35 +00:00
Wale Ogunwale
733f147401 Merge "Always have a handler for PendingIntents sent in the system process" into mnc-dev 2015-06-05 00:23:28 +00:00
George Mount
e50b091df9 Merge "Clean up the enter transition even if there is not entering fragment." into mnc-dev 2015-06-04 17:32:53 +00:00
George Mount
ec3364cc32 Clean up the enter transition even if there is not entering fragment.
Bug 21618103

Change-Id: Id670465afd0b743f964d24d7d36d49706b459ac8
2015-06-04 10:28:54 -07:00
Dianne Hackborn
b0a5e78fc0 Merge "More API changes." into mnc-dev 2015-06-04 16:56:52 +00:00
Wale Ogunwale
9a6ef1e94c Always have a handler for PendingIntents sent in the system process
It is possible for deadlocks to occur when sending/processing
PendingIntents due to components like AMS holding global service
locks when dispatching the broadcast without specifying an
handler and the receiver calling back into AMS.

We now set a default handler to process the broadcast on if we
are in the system process and a handler wasn't specified.

Bug: 19502993
Change-Id: Iccde32c6c1df997784155bc41ef39e52ee0f7243
2015-06-04 07:58:24 -07:00
Zoltan Szatmary-Ban
df70dcee68 Replace renamed reference to NetworkStats in javadoc
Bug: 21572680
Change-Id: Iad43af4d8a6d178f3396f23a74f1568e6faed311
2015-06-04 14:15:47 +01:00
Svetoslav
a2011d232b Adding missing permission API to fragment
Change-Id: I90309a23a08a82f0ab93eb4f6185db09e035aac1
2015-06-03 15:43:59 -07:00
Svetoslav
f559546d8c Merge "Add annotations to a new API" into mnc-dev 2015-06-03 01:01:41 +00:00
Svetoslav
9ce9a15f62 Add annotations to a new API
Change-Id: I41a87a0ba81b1123e06096db510a02a1d9e6531d
2015-06-02 17:59:31 -07:00
Dianne Hackborn
69c6adc96e More API changes.
Start moving Assist* stuff to android.app.assist.

Clean up some more of the VoiceInteractionSession APIs.

Clearly document that finish() is not the same as hide(),
always call hide() instead, and fix the finish() path to
also always do a hide to make sure everything is cleaned
up correctly.

Change-Id: I962d4069fcb34fe89547a95d395ae1b9fa3b4148
2015-06-02 16:56:41 -07:00
Filip Gruszczynski
93634166c8 am d88e4d50: Merge "ActivityView: set surface on a background thread." into cw-d-mr1-dev
* commit 'd88e4d50d6198233883a69313fdee2c1a6fff7ca':
  ActivityView: set surface on a background thread.
2015-06-02 22:36:42 +00:00
Nicolas Prevot
db6ac0e912 Merge "Make ACTION_PROVISION_MANAGED_DEVICE public." into mnc-dev 2015-06-02 22:11:11 +00:00
Svetoslav
3aa3f5f892 Merge "Fix java doc" into mnc-dev 2015-06-02 22:09:18 +00:00
Svetoslav
aa048b6242 Fix java doc
Change-Id: I927a1766e1e4cac99d0d7999fef568b82af769af
2015-06-02 15:08:48 -07:00
Svetoslav
c5ff0020a2 Merge "Add API to hint whether to show on-board UI before a permission request." into mnc-dev 2015-06-02 21:53:20 +00:00
Svetoslav
20770ddbd4 Add API to hint whether to show on-board UI before a permission request.
bug:21511988

Change-Id: I9d1d7adf34b68074e65510f53b6e642cf784cf6b
2015-06-02 14:48:38 -07:00
Nicolas Prevot
64bf7b2870 Make ACTION_PROVISION_MANAGED_DEVICE public.
Also remove the doc saying that factory reset is impossible if there
is a device owner: the device owner may not set the user restriciton
DISALLOW_FACTORY_RESET.

BUG:19889110

Change-Id: Iadc084a38e541061c0b0c95bfc95da73d48842d7
2015-06-02 14:04:41 -07:00
Amith Yamasani
ff3b76d046 Merge "Temporarily whitelist an app for network during doze" into mnc-dev 2015-06-02 20:34:59 +00:00
Robin Lee
25e264507c Device policy: consistent javadoc and annotations
Annotated all uses of the ComponentName parameter to methods in
DevicePolicyManager to indicate whether null is acceptable.

Deleted/fixed some inconsistent or poorly-worded documentation.

Bug: 21422939
Change-Id: Iadfa78c5170bf4899a9daaf93c3d4e9d8b170a45
2015-06-02 11:55:21 -07:00
Amith Yamasani
af575b9f8e Temporarily whitelist an app for network during doze
API to allow an app to be whitelisted for network and wakelock
access for a short period. So even if the device is in idle
mode, such apps can be given a chance to download the payload
related to a high priority cloud-to-device message.

This API is meant for system apps only.

A new permission CHANGE_DEVICE_IDLE_TEMP_WHITELIST is required
to make this call.

Bug: 21525864
Change-Id: Id7a761a664f21af5d7ff55aa56e8df98d15511ca
2015-06-02 11:05:03 -07:00
Dianne Hackborn
9ed0c4109d Merge "Update VoiceInteractionService from API review." into mnc-dev 2015-06-01 22:28:45 +00:00
Filip Gruszczynski
2df62bf0dd ActivityView: set surface on a background thread.
ActivityView shouldn't set the surface on the main thread, because it's
a binder call and causes jank. Instead it should delegate the call to a
background thread and let it do the work there.

Bug: 15752100

Change-Id: I6f2764c93dfb8f3e00d79f0e97d4a6688b6fdd8f
2015-06-01 13:24:12 -07:00
Dianne Hackborn
2ee5c368f8 Update VoiceInteractionService from API review.
This may even manage to retain compatibility with existing
binaries!  (For now.)

Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
2015-06-01 11:42:04 -07:00
Barnaby James
6fad7e7f42 Merge "Minor VoiceInteractor documentation fixes." into mnc-dev 2015-05-30 21:57:48 +00:00
James Cook
63b6320af4 Merge "assist: Fix reported colors/styles for TextView/Switch" into mnc-dev 2015-05-29 17:30:23 +00:00
James Cook
5cfaae4aae assist: Fix reported colors/styles for TextView/Switch
Changes to the data provided to AssistStructure:
* Text foreground color is correct even if the view has not yet been
painted.
* Text background color is now always 1 (TEXT_COLOR_UNDEFINED) for a
TextView, as it has no separate concept of background color.
* Switch now reports the text size/color/style of the label text
(usually user visible) rather than the on/off text on the button
itself (usually hidden in Material, and not usually revelant when
visible).

Bug: 21080375
Change-Id: I7e15f68d89510a76cab76031c2c8ca6ca3f32435
2015-05-28 15:52:44 -07:00
Dianne Hackborn
4573dddcce Merge "Add new API to set URI on AssistContent." into mnc-dev 2015-05-28 21:35:41 +00:00
Dianne Hackborn
09d57fe9b3 Add new API to set URI on AssistContent.
Also rework how we transfer AssistContent and AssistStructure
to the assistant, so they are delivered as completely separate
objects rather than the kludgy bundling them in the assist
data thing.

Change-Id: Ib40cc3b152bafeb358fd3adec564a7dda3a0dd1d
2015-05-28 11:44:58 -07:00
Doris Liu
36e3997451 Merge "Set a HW layer for Fragment alpha animation" into mnc-dev 2015-05-28 01:05:06 +00:00
Fyodor Kupolov
12e5fec238 Merge "Fixed indentation in setProfileName method" into mnc-dev 2015-05-27 23:56:06 +00:00
Fyodor Kupolov
78f1314a69 Fixed indentation in setProfileName method
Change-Id: I819bfd509b184b7952d8f9c466c9418353f890cb
2015-05-27 16:52:45 -07:00
Barnaby James
b47c9e1a17 Minor VoiceInteractor documentation fixes.
BUG: 21393267
Change-Id: I4369693a92d312e8b744df09829f7d114c300be0
2015-05-24 12:10:47 -07:00
Amith Yamasani
7870550a1b Merge "Add getPermissionGrantState method in device policy" into mnc-dev 2015-05-23 00:05:47 +00:00
Doris Liu
de9284de88 Set a HW layer for Fragment alpha animation
Bug: 8554227
Change-Id: I58035001fe8f37a02dfe84e7ecd5074ab033129a
2015-05-22 16:45:02 -07:00
Amith Yamasani
184b3753de Add getPermissionGrantState method in device policy
This is to have a way to query what permission state was set by
the profile owner.

Bug: 21356830
Change-Id: Ie396e946b4285267c1d95f82b9d9765b43697d3c
2015-05-22 13:55:57 -07:00
Dianne Hackborn
e5c4262109 Improve reporting to apps of transaction too large failures.
If the app tried to do various things with too much data --
starting an activity, starting a service, sending a broadcast --
this would fairly silently fail with little indication of what
was going on.  Fix this in two ways:

- Now when the native code generates a TransactionTooLargeException,
  it may include an additional message in it telling you how much
  data was in the parcel being sent, to help you understand why
  this happening.

- In all the framework code paths where we call to the system and
  may fail, convert these failures into a a runtime exception and
  rethrow them back to the app so that it will clearly get the
  above message.

Change-Id: I745159b97d3edb6fca86aa09cbc40c1f15a7d128
2015-05-21 18:19:50 -07:00
Dianne Hackborn
8b20cdb27b Merge "Add API to track usage time of apps." into mnc-dev 2015-05-22 01:12:44 +00:00
Dianne Hackborn
b5a380d409 Add API to track usage time of apps.
This adds a new ActivityOption for the caller to ask the
system to track the time the user is in the app it launches,
delivering the result when they are done.

The time interval tracked is from when the app launches the
activity until the user leaves that app's flow.  They are
considered to stay in the flow as long as new activities
are being launched or returned to from the original flow,
even if they cross package or task boundaries.  For example,
if the originator starts an activity to view an image, and
while there the user selects to share, which launches gmail
in a new task, and they complete the share, the time during
that entire operation will be included.

The user is considered to complete the operation once they
switch to another activity that is not part of the tracked
flow.  For example, use the notification shade, launcher, or
recents to launch or switch to another app.  Simply going
in to these navigation elements does not break the flow
(although the launcher and recents stops time tracking of
the session), it is the act of going somewhere else that
completes the tracking.

The data is delivered to the app through a PendingIntent,
which includes the total time the app was in the flow along
with a time break-down by app package.

Change-Id: If1cf8892d422c52ec5042eba0e15a8e7e8f83abf
2015-05-21 16:45:29 -07:00
Craig Mautner
db49fec8aa For getHomeActivity() only return current user.
Previously getHomeActivity() returned the topmost home activity
independent of which user was currently running. That defeated the
purpose of the method. This fix returns the home activity of the
current user or null if one has not yet been created.

Also remove some cruft that accumulated.

Fixes bug 21055376.

Change-Id: Ic1d58129aedbe3624f8a9d12c05c84674687b0a4
2015-05-21 15:33:30 -07:00
Svet Ganov
d8ecc5aee4 Allow DO/PO to go back to normal permission state.
We have APIs for a DO/PO to fix a permission in a granted or
denied state in which the user cannot manage this permission
through the UI. However, there is no way to go back to the
default state in which the user gets to choose the permission
grant state.

Change-Id: I2562a1d8b1385cd740b44812844ef14c895c2902
2015-05-20 13:08:58 -07:00
Dan Sandler
3936e7a6fb Deal more gracefully with null smallIcons.
First, when parceling a notification with no small icon:
Well, you shouldn't attempt to do this anyway, since NoMan
will reject a notification without a valid smallIcon.  But
setServiceForeground parcels up the Notification on its own
before handing it off to NoMan, so it will crash on an
invalid small icon. (In general, parceling code should never
ever crash, even if the object is in an undesirable state.)

And when build()ing a notification: Same thing---don't build
a notification with no icon; you're going to have a bad
time. But maybe you're going to fix it before you hand it
off to NoMan. Or maybe it's just one page of a wearable
notification, so it doesn't really need its own icon. Either
way, Notification shouldn't crash.

Bug: 21286186
Bug: 21298403
Change-Id: Ie482cde0a3afe3aaabf07be0536551b8e4bceba0
2015-05-20 10:00:54 -04:00