Commit Graph

5889 Commits

Author SHA1 Message Date
Dianne Hackborn
ad15bee4ff am c60f010e: am 8b20cdb2: Merge "Add API to track usage time of apps." into mnc-dev
* commit 'c60f010edcb197451d087207b0c9527d74cff245':
  Add API to track usage time of apps.
2015-05-22 01:37:15 +00:00
Dianne Hackborn
8b20cdb27b Merge "Add API to track usage time of apps." into mnc-dev 2015-05-22 01:12:44 +00:00
Craig Mautner
f41e2e6391 am 4c20f59f: am 15dddf38: Merge "For getHomeActivity() only return current user." into mnc-dev
* commit '4c20f59f76fc6a7c5c4dc3d6e3087395cf5686de':
  For getHomeActivity() only return current user.
2015-05-22 00:00:15 +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
393c80cfdc am b39fb08b: am 084110bd: Merge "Allow DO/PO to go back to normal permission state." into mnc-dev
* commit 'b39fb08b6274559140617e1e1ed615cd18500476':
  Allow DO/PO to go back to normal permission state.
2015-05-20 20:34:10 +00: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
6e53d7ef75 am 2f99ca32: am 90ac386b: Merge "Deal more gracefully with null smallIcons." into mnc-dev
* commit '2f99ca32dbd29b3281b8464133f741c58f8ed05c':
  Deal more gracefully with null smallIcons.
2015-05-20 14:28:16 +00: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
Dianne Hackborn
98e454575c am f24a522c: am 2d9c6015: Merge "Fix issue #20679383: Add text style to assist.ViewNode..." into mnc-dev
* commit 'f24a522c79c7d3c7e6ffe6cf105da90bad95c511':
  Fix issue #20679383: Add text style to assist.ViewNode...
2015-05-19 22:51:03 +00:00
Paul Jensen
d6e54755dd am 06c48119: am c1a9436d: Merge "Query HTTP proxy for network via a new API to avoid permissions exceptions" into mnc-dev
* commit '06c48119ed1b0a6e32f3811f368dcece1baa75bf':
  Query HTTP proxy for network via a new API to avoid permissions exceptions
2015-05-19 22:50:30 +00:00
Dianne Hackborn
a7c407d7d4 am 1e338c0f: am 8e3f2954: Merge "Update power manager to track uid state like netstats." into mnc-dev
* commit '1e338c0f3ba6366bec3ec4bf9034cb2135f16a7d':
  Update power manager to track uid state like netstats.
2015-05-19 22:49:03 +00:00
Dianne Hackborn
2d9c6015b3 Merge "Fix issue #20679383: Add text style to assist.ViewNode..." into mnc-dev 2015-05-19 18:26:28 +00:00
Dianne Hackborn
02beb41c97 Fix issue #20679383: Add text style to assist.ViewNode...
...from text nodes in WebView

Add a new explicit API for setting the text style information associated
with a view structure.

Also, how about some documentation!

Change-Id: Ia948b2d66382b973d0d00a67172a281ad55ce592
2015-05-19 11:18:16 -07:00
Paul Jensen
c1a9436d27 Merge "Query HTTP proxy for network via a new API to avoid permissions exceptions" into mnc-dev 2015-05-19 17:58:11 +00:00
Dianne Hackborn
8e3f29540d Merge "Update power manager to track uid state like netstats." into mnc-dev 2015-05-19 16:44:12 +00:00
Dianne Hackborn
d23e0d6901 Update power manager to track uid state like netstats.
To follow the correct semantics for when restricts due to
device idle can be applied, power manager need to know about
uid process states like net policy so that it can allow
wake locks from apps that are in the foreground.

Since this is being added to a second place, I reworked things
so that the activity manager now keeps track of per-uid process
states and allows apps to register to listen to those, rather
than having to track lower-level process states and transform
them into an overall uid state.  Both net policy and power
manager use this new facility.

Change-Id: I77359164c40d0f36fe1ef296dd9f9c3062431148
2015-05-18 18:13:41 -07:00
Stefan Kuhne
332914448a am c1523029: am a2968ad5: Merge "Revert "Backup/restore recents task list"" into mnc-dev
* commit 'c15230299f9c9130af74712be5f866a50196f286':
  Revert "Backup/restore recents task list"
2015-05-19 00:05:15 +00:00
Stefan Kuhne
e88d1e5926 Revert "Backup/restore recents task list"
Reverts commits 92dd1abef4,
18795a2299, and
ac6a3a5e9d which make-up
changes required for backing-up and restoring recent
tasks from one device to another.

The implementation had too many unresolved issues including
the ordering of the restored recent tasks which was depending
on when the task package is installed on the new device that
puts the restored recents list out of order compared to the
old device.

Bug: 15986349
Bug: 19014377
Bug: 20763296

Change-Id: I06fd35a43036ef0b7260cf4db9c42890df63b95d
2015-05-18 16:00:15 -07:00
Paul Jensen
cee9b51c4b Query HTTP proxy for network via a new API to avoid permissions exceptions
Add @hidden ConnectivityManager.getProxyForNetwork() API.

Bug:20470604
Change-Id: I6a9bc4afc8273bc43b14cdeccfedbbf3ff66be40
2015-05-18 17:05:51 +00:00
George Mount
274d9951ec am e4ac47c6: am b1f12933: Merge "Remove hidden/deleted APIs." into mnc-dev
* commit 'e4ac47c69bb2eee54284a47af02536e3e0c6d41b':
  Remove hidden/deleted APIs.
2015-05-15 16:38:33 +00:00
Dan Sandler
2910f53aaa am 031339ba: am d63f9321: Icon support comes to Notification.
* commit '031339baea5c53a4e015a345261a94215c4894ba':
  Icon support comes to Notification.
2015-05-15 16:38:26 +00:00
George Mount
b1f1293355 Merge "Remove hidden/deleted APIs." into mnc-dev 2015-05-15 14:08:19 +00:00
Dan Sandler
d63f9321e6 Icon support comes to Notification.
And you may ask yourself: what is that beautiful icon?
  And you may ask yourself: where does that API go to?
  And you may ask yourself: is it a resource? is it a Bitmap?
  And you may say to yourself: my god, what have I done

(This patch fixes a number of bugs in the initial
implementation, but other than that, it's the same as it
ever was.)

Bug: 18568715
Bug: 21141842
Change-Id: I1d3f9427abd7f0bb57e533fcfac708851ff644b6
2015-05-15 12:35:21 +00:00
Christopher Tate
ea3c13d2aa am 53ec4a66: am 474bb82f: Merge "Clarify docs for BackupTransport.initializeDevice()" into mnc-dev
* commit '53ec4a66630ce14a4ad9e2976dd9863a12fe092c':
  Clarify docs for BackupTransport.initializeDevice()
2015-05-14 22:34:08 +00:00
Christopher Tate
474bb82fd5 Merge "Clarify docs for BackupTransport.initializeDevice()" into mnc-dev 2015-05-14 22:16:33 +00:00
George Mount
5aec62eae1 Remove hidden/deleted APIs.
Change-Id: Iabeaac2c9b485f1f25fb2fcc3193610b0d6478c4
2015-05-14 14:12:16 -07:00
Christopher Tate
56341e70a2 Clarify docs for BackupTransport.initializeDevice()
Explicitly call out that even if the backend is in an undefined state
(such as no authenticated account, so there is by definition no work
that can be done here), the transport should return TRANSPORT_OK in
response to initializeDevice().  Error returns from that method must
only be used to indicate that the initialize should be *retried*.

Bug 21136957

Change-Id: I41ad115b92c16092b4d931d9c554a44b77945359
2015-05-14 12:54:24 -07:00
Daniel Sandler
b5b114a3f0 am 15de90de: am 9cb90cbb: Merge "Revert "Icon support comes to Notification."" into mnc-dev
* commit '15de90de0e7f2da9e28d1b46644faeb21df13300':
  Revert "Icon support comes to Notification."
2015-05-14 19:29:55 +00:00
Alex Klyubin
ff5972b64d am 567936c9: am a1fb2cf6: Merge "Move Android Keystore impl to android.security.keystore." into mnc-dev
* commit '567936c9ab300884aeb54c68e6f0f90fe89a32b3':
  Move Android Keystore impl to android.security.keystore.
2015-05-14 19:29:13 +00:00
Zoltan Szatmary-Ban
dabd7d9015 am 392f8ff5: am 39b8c69a: Merge "Rename NetworkUsageStats -> NetworkStats" into mnc-dev
* commit '392f8ff51332395db515370f7093556f135f386e':
  Rename NetworkUsageStats -> NetworkStats
2015-05-14 19:28:59 +00:00
Dan Sandler
70479a3234 am 644d0318: am 5bcbf857: Merge "Fix icon-related crash." into mnc-dev
* commit '644d0318f59a8057e219be6469ea66ba6d2ce3c1':
  Fix icon-related crash.
2015-05-14 19:28:53 +00:00
Daniel Sandler
9cb90cbbf8 Merge "Revert "Icon support comes to Notification."" into mnc-dev 2015-05-14 16:34:53 +00:00
Daniel Sandler
09e51a739f Revert "Icon support comes to Notification."
This reverts commit 08a04c1524.
This also reverts commit 5bcbf857d1.

Change-Id: Ia0b0a5339d523581c877822a3a1feec97ae4b73d
2015-05-14 12:23:24 -04:00
Alex Klyubin
a1fb2cf6a6 Merge "Move Android Keystore impl to android.security.keystore." into mnc-dev 2015-05-14 15:51:01 +00:00
Zoltan Szatmary-Ban
39b8c69a23 Merge "Rename NetworkUsageStats -> NetworkStats" into mnc-dev 2015-05-14 15:13:34 +00:00
Dan Sandler
98b0290bbe Fix icon-related crash.
Bug: 21144636
Change-Id: Ib686e9a9a18ac6b9f1e249bcde74be9212e0f53b
2015-05-14 09:53:31 -04:00
Robin Lee
af1985b317 am f8bb8595: am 39087b1c: Replace String host:port/url args with Uri arg
* commit 'f8bb8595f8c653e3e9b693f9d6c35bc4f5be6cd6':
  Replace String host:port/url args with Uri arg
2015-05-14 06:51:55 +00:00
Dan Sandler
9349eb5640 am 6da734c6: am 08a04c15: Icon support comes to Notification.
* commit '6da734c6caf0952fd030273ee861cbcc14110047':
  Icon support comes to Notification.
2015-05-14 06:39:57 +00:00
Robin Lee
39087b1cec Replace String host:port/url args with Uri arg
Uri provides a stronger guarantee of well-formedness and lets apps do
nice extra things like specifying scheme etc. without twisting any
expectations.

Bug: 20820034
Change-Id: Ia6bbedb74765444920b667d643fb7e1eb6a7292b
2015-05-14 07:15:18 +01:00
Dan Sandler
08a04c1524 Icon support comes to Notification.
And you may ask yourself: what is that beautiful icon?
  And you may ask yourself: where does that API go to?
  And you may ask yourself: is it a resource? is it a Bitmap?
  And you may say to yourself: my god, what have I done

Bug: 18568715
Change-Id: I4377b311c538bd1cf36b3fba22326bae81af40c9
2015-05-13 23:50:43 -04:00
Amith Yamasani
3d6465fa97 am d1706063: am 3d32a1c0: Merge "Allow settings to change app inactive state" into mnc-dev
* commit 'd170606319e10d1140cb58d6f959efb91d162441':
  Allow settings to change app inactive state
2015-05-14 01:46:49 +00:00
Chris Tate
0ae8fa7502 am 7b566da5: Merge "AlarmClockInfo: fix redundant word in doc comment"
* commit '7b566da55afad480622c328d658f0e654019688d':
  AlarmClockInfo: fix redundant word in doc comment
2015-05-14 01:44:25 +00:00
Amith Yamasani
901e924392 Allow settings to change app inactive state
Change-Id: I57efb4b5fa69c9a268025fb1ef83de36c4cc83ca
2015-05-13 18:21:33 -07:00
Shuhrat Dehkanov
66729ff685 AlarmClockInfo: fix redundant word in doc comment
Removed one of unintentional double "intent"s.

Change-Id: I0ce4224964afae0587ce55b6b4775370eff89d26
Signed-off-by: Shuhrat Dehkanov <k@efir.uz>
2015-05-14 10:07:25 +09:00
Svet Ganov
67b7ec2887 Merge "Access mock location is no longer a runtime permission - framework" into mnc-dev 2015-05-13 23:45:23 +00:00
Dianne Hackborn
4f5e024875 Merge "Hide getPackageProcessState(), it is not ready yet." into mnc-dev 2015-05-13 23:29:30 +00:00
Alex Klyubin
dcdaf87ed0 Move Android Keystore impl to android.security.keystore.
This moves the non-public API classes backing Android Keystore from
android.security to android.security.keystore, a package specially
created for Android Keystore.

Bug: 18088752
Change-Id: Ibf04d6a26c54d310b0501fc5e34f37b1176324ad
2015-05-13 16:17:40 -07:00
Svet Ganov
f7e9cf4fb4 Access mock location is no longer a runtime permission - framework
The access mock location is no longer a runtime permission. It is a
signature protected one that apps cannot get but the fact they request
it means they want to inject location into the system. Now the user
gets to choose the current mock location app in developer options from
the apps that request the mock location permission. The access to mock
location is no longer guarded by the permisson but from a new app op
which is off by default and the settiings UI sets it to enabled only
for the currently selected mock location app.

bug:21078873

Change-Id: I19e3f9dc7c7de82eab46b30fec1abfbca54a0e59
2015-05-13 15:37:21 -07:00
Dianne Hackborn
b725894d05 Hide getPackageProcessState(), it is not ready yet.
Change-Id: I188c647573207e89510174e3ad56ca0c19e5ece3
2015-05-13 15:27:23 -07:00