26591 Commits

Author SHA1 Message Date
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
Selim Cinek
f98702eae0 Protecting against the correct flag for the input consumer
Also allow hiding the navbar if immersive or immersivesticky.

Bug: 21089476
Change-Id: I540e668746056a0e4bb077898792afd225e4e19e
2015-05-21 18:49:27 +00:00
Craig Mautner
4a3b824b23 Add debug for bug 21055376.
Change-Id: I1e93fb225f2639af031cdfa748a7898f31ad5a94
2015-05-21 11:12:51 -07:00
Narayan Kamath
6bd37924b6 Merge "Fix application moves." into mnc-dev 2015-05-21 17:23:17 +00:00
Eric Laurent
97de0c9a29 Merge "AudioService: indicate system ready to AudioFlinger" into mnc-dev 2015-05-21 16:13:04 +00:00
Narayan Kamath
cd251fa382 Fix application moves.
We don't dex2oat during application moves, so we must scan
the package again scanPackageDirtyLI to deduce its ABI.

This is unnecessary (since a move cannot change ABIs), but we
need some additional refactoring to avoid a second scan.

bug: 21337469

Change-Id: I3e9dfd5db1c928847f9d527dc15d29a05ff40e7d
2015-05-21 14:22:21 +01:00
Jae Seo
184016aac0 Merge "TIF: Build the list of available TV inputs as the current user" into mnc-dev 2015-05-21 05:27:09 +00:00
Jae Seo
76976fae6f TIF: Build the list of available TV inputs as the current user
Bug: 21313985
Change-Id: I8aa881570915d14d63e4ac0b8034044f8736443b
2015-05-20 21:52:28 -07:00
Christopher Tate
62d1e1ef7e Scan at boot time to detect newly-present full backup candidates
OTA or similar might have caused an app to appear without the usual
notifications being sent.  Make sure we pick up those apps as
appropriate for full-data backup.

Bug 19462310

Change-Id: Ic17bc72b14cc7599ae8ea540548fda932606b8f2
2015-05-21 01:32:39 +00:00
Jim Miller
0a17fb4e56 Merge "Move from native FingerprintService implementation to fingerprintd" into mnc-dev 2015-05-21 00:57:44 +00:00
Eric Laurent
0867bed9dd AudioService: indicate system ready to AudioFlinger
Indicate when JAVA services are ready to AudioFlinger so that
calls to power manager and scheduling service can be enabled.

Bug: 11520969.
Change-Id: Id977cab3208c34709011703d2dfdcf552e60371b
2015-05-20 17:39:21 -07:00
Amith Yamasani
4c02d38e97 Merge "Use screen-on time and wallclock time for idleness calc" into mnc-dev 2015-05-21 00:10:13 +00:00
Craig Mautner
116c9ed607 Merge "Avoid resuming activity before launch." into mnc-dev 2015-05-21 00:02:02 +00:00
Amith Yamasani
547116ea62 Use screen-on time and wallclock time for idleness calc
12 hours of screen-on time and 2 days of wallclock time
must elapse before considering an app idle.

Bug: 20066058
Change-Id: Ie7b584b40e644d868aa2708876723c3391fd432e
2015-05-20 15:40:37 -07:00
Craig Mautner
432f64ee96 Avoid resuming activity before launch.
The locktask logic would always bring a locked task to the front and
then resume it when locking. When a task is to be locked at launch that
would cause it to resume immediately before onLaunch was called. Which
would cause havoc because the token was not yet in
ActivityThread.mActivities. This lead to premature finish() calls and
looping restarts.

This change causes the resume to only be called when an app calls
startLockTask. Otherwise the resume call is skipped.

Plus additional locktask debug logging.

Fixes bug 21031298.

Change-Id: I756b0d607827d0ec7a123377db04d9377c41776d
2015-05-20 15:36:34 -07:00
Cedric Ho
d9b0c913f7 am 782def77: am 80cf2210: Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
* commit '782def772adacaf029d7d9850605923066665424':
  Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
2015-05-20 22:22:23 +00:00
Selim Cinek
d3f216d921 Merge "Fixed that touches where incorrectly consumed when fullscreen" into mnc-dev 2015-05-20 22:21:38 +00:00
Selim Cinek
f83e824216 Fixed that touches where incorrectly consumed when fullscreen
The fake window that was added when View.SYSTEM_UI_FULL_SCREEN was
set consumed all touches, even those going to the SystemUI and not
just those of windows below. The input consumer is now correctly
positioned in the window order to only capture the right touches.
Clicks to the volume panel and the heads up now correctly go to the
right place instead of just unhiding the SystemUI bars.

Bug: 21089476
Change-Id: Ib53dfc0b33b70084ca607d0f044db30b6e6c91d6
2015-05-20 22:20:17 +00:00
Cedric Ho
782def772a am 80cf2210: Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
* commit '80cf2210226bc652181abafe606b69ebce63af78':
  Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
2015-05-20 21:56:27 +00:00
Jim Miller
be67542182 Move from native FingerprintService implementation to fingerprintd
This adds a new service, fingerprintd, that manages fingerprint
hardware from a separate process.  It provides a binder interface that
FingerprintManager uses to talk to the fingerprint HAL.

Change-Id: I84d8e407c1f1a7d1a396e246c382459ad38810ae
2015-05-20 14:56:06 -07:00
Cedric Ho
80cf221022 Add config_forceVoiceInteractionServicePackage to allow a device to config its VoiceInteractionService package and ignore the regular setting.
Change-Id: Ic40d90f1a7a9942f5e82080668552239bbed9b03
2015-05-20 13:50:22 -07:00
Ruben Brunk
f082bb2a7f Merge "camera: Add AIDL interface for CameraServiceProxy." into mnc-dev 2015-05-20 20:44:28 +00:00
Svet Ganov
084110bd39 Merge "Allow DO/PO to go back to normal permission state." into mnc-dev 2015-05-20 20:09:38 +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
Jeff Sharkey
4e2add3eb4 Merge "Write packages.list when adding/removing users." into mnc-dev 2015-05-20 19:09:50 +00:00
Jeff Sharkey
91edde24ff Write packages.list when adding/removing users.
FUSE daemons now rely on getting per-user GID information when
packages.list is written.  Normal secondary user adding/removing
usually has enough PackageManager traffic to trigger a side-effect
rewrite, but this change writes explicitly to handle guest users.

Also obtain the user list once, and exclude dying users.  During
user creation we manually splice in the user ID that we're bringing
online.

Bug: 19924661
Change-Id: Icc5b1b169300c9dc12099be12651acbf89d6bea9
2015-05-20 12:05:04 -07:00
Stefan Kuhne
242a500491 Merge "Don't exceed max. allowed recent document tasks for an app." into mnc-dev 2015-05-20 18:38:31 +00:00
Stefan Kuhne
510e554283 Don't exceed max. allowed recent document tasks for an app.
We were exceeding the maximum allowed recents document tasks entry
for an application package because the full Intent object was been
compared for equality which will be different for each task. Now
we are only comparing that the task components match which is
sufficient to determining that the task belongs to the same
application package.

Bug: 18642190
Change-Id: I831b0fcffb876d51e9439e7a7a4c75bb0881db7c
2015-05-20 10:54:09 -07:00
Eric Laurent
5aa384cdc8 Merge "AudioFormat: more compressed formats" into mnc-dev 2015-05-20 16:22:01 +00:00
Narayan Kamath
e46a5b31d6 Merge "Throw a checked exception on inconsistent installs." into mnc-dev 2015-05-20 15:54:49 +00:00
Paul Jensen
2e54f13b46 Merge "Report invalid network after one failed attempt." into mnc-dev 2015-05-20 12:56:25 +00:00
Narayan Kamath
c52ae28006 Throw a checked exception on inconsistent installs.
Allows us to proceed without crashing the system process. Also,
complete an incomplete error message. Follow up comments from
change b904863476991d8540d37d5.

bug: 21144503

Change-Id: Idb6a33f93b70b4e5e2bca95d2d3af0e2adaeedf3
2015-05-20 11:12:47 +01:00
Nitin Arora
11f83882f2 Bluetooth: Clear BLE always ON apps at Airplane mode
This patch clears the container managing the Ble Always On
apps while switching on, the airplane mode. The airplane mode
will completely turn Off the Bleutooth Adapter from any state
it is in.

Change-Id: Ib28d39d85efe3aac37e3a53a4fb892099568c702
2015-05-19 22:38:46 -07:00
Svetoslav
f357c96273 Merge "Prevent modification of system fixed permissions" into mnc-dev 2015-05-20 01:57:44 +00:00
Simranjit Singh Kohli
bdf2d1fa38 Merge "[Fix Potential for error]:" into mnc-dev 2015-05-20 01:04:57 +00:00
Simranjit Singh Kohli
6a184878f8 [Fix Potential for error]:
Init for accounts maybe called when non-system app asks for accounts.
That might lead to deletion of accounts and broadcast from the user,
which requires permission. Hence, we should clear calling identity
before requesting it.

Bug: 21140169

Change-Id: I057ac6778ea53d3f96b3e5c42fe3a2fe60c3cf28
2015-05-19 17:38:10 -07:00
Ruben Brunk
6664aee15a camera: Add AIDL interface for CameraServiceProxy.
- Adds an AIDL interface to allow the proxy camera service
  running in system server to accept RPCs from the camera
  service running in mediaserver.
- Request an update to the valid user set from the proxy
  camera service when mediaserver restarts to initialize
  properly + avoid DOS after a crash.

Bug: 21267484
Change-Id: Ib821582794ddd1e3574b5dc6c79f7cb197b57f10
2015-05-19 17:20:24 -07:00
Christopher Tate
f7a9aaa12e Merge "Rebind backup transports only when clearly needed" into mnc-dev 2015-05-20 00:07:12 +00:00
Christopher Tate
1a78d8c2b8 Rebind backup transports only when clearly needed
Significantly narrow the circumstances under which transports
will be re-bound.  In particular, we now do not unbind + rebind
whenever any component in a bound transport's host package changes;
rather, we do so only when the transport component itself has
changed state, or when there is a state change that might cause
a new transport to become available.

Bug 19775237

Change-Id: Ib386875df19ffe9f2d3eb9f9788187338360644a
2015-05-19 17:05:22 -07:00
Svetoslav
6503e69d1d Prevent modification of system fixed permissions
Change-Id: I061b993df305f27e52f08dad54f1bdbf162de4d9
2015-05-19 16:49:53 -07:00
Eric Laurent
cae3466333 AudioFormat: more compressed formats
Add MP3 and AAC as valid AudioFormat encodings.
Only @hide for now to allow system components to manage
audio patches with those formats.

Bug: 18649264.
Change-Id: I5ef5f151783308e31d8ac5b29454589077ef62ea
2015-05-19 16:46:52 -07:00
Svetoslav
6d9a53abbc Merge "Handle downgrading a runtime permission to an install one" into mnc-dev 2015-05-19 23:30:48 +00:00
Svetoslav
a1d0f3031f Handle downgrading a runtime permission to an install one
bug:21300531

Change-Id: I5c020c0faae3e727bbe898441c58116e2ab892b8
2015-05-19 16:27:00 -07:00
Jeff Sharkey
891230b59e Merge "Push initial disk state, handle empty media." into mnc-dev 2015-05-19 22:04:54 +00:00
Fabrice Di Meglio
b3793d7201 Merge "Add IntentFilter auto verification - part 12" into mnc-dev 2015-05-19 22:02:40 +00:00
Jeff Sharkey
f5a6bd7538 Push initial disk state, handle empty media.
Stash volume count from last scan, and use it to push initial storage
notifications state when listener is first attached.

Also omit disks with invalid size, which usually means they're an
empty slot with no media.

Bug: 20503551
Change-Id: I75097035aebaad70ba32437179a863f6a0910aa5
2015-05-19 14:57:22 -07:00
Fabrice Di Meglio
f2fec45280 Add IntentFilter auto verification - part 12
- again tune Intent resolution candidates filtering: first add always list
  if not empty, other wise add undefined and browsers. If the list is still
  empty at the end, then add all the initial candidates.

See bug 

Change-Id: I21f5313daf7bec1049c1e7c08275c825855d2935
2015-05-19 14:50:54 -07:00
Svet Ganov
db6dab359c Merge "Clear binder identity before dispatching ap op mode changes." into mnc-dev 2015-05-19 19:51:28 +00:00
Svet Ganov
3853611f77 Clear binder identity before dispatching ap op mode changes.
bug:21078841

Change-Id: I409b739bbda10542142c8aac1522ad49882f5ec5
2015-05-19 12:45:56 -07:00
John Reck
0bb478b7ff Merge "Don't recreate the surface unnecessarily" into mnc-dev 2015-05-19 19:31:58 +00:00