Commit Graph

2448 Commits

Author SHA1 Message Date
Ruben Brunk
8f955f89c2 Merge "Add UI for camera + flashlight battery reporting." into mnc-dev 2015-06-06 00:04:24 +00:00
Ruben Brunk
5b1308f02d Add UI for camera + flashlight battery reporting.
Bug: 11694505
Change-Id: Ieefa78a1d641851f4141fe666dae7b9fde394f09
2015-06-04 16:41:11 -07:00
Tim Kilbourn
4bf27b53b9 DO NOT MERGE Fix DropBoxManager.Entry parcels with fds.
When the socketpair communication channel was added to
ParcelFileDescriptor, the CREATOR method for DropBoxManager.Entry was
not updated to read the extra fd from the Parcel. This was causing reads
to end too early.

Also removed comments referring to the now-deleted native methods in
the native Parcel implementation.

Change-Id: I49a9691da6ea927382ceb2fcbfdc7985a601111b
(cherry picked from commit ba953230f7)
2015-06-04 21:37:50 +00:00
Amith Yamasani
ff3b76d046 Merge "Temporarily whitelist an app for network during doze" into mnc-dev 2015-06-02 20:34:59 +00: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
Ruben Brunk
11df5b66ef Merge "Track camera and flashlight usage in battery stats." into mnc-dev 2015-06-02 01:48:27 +00:00
Ruben Brunk
6d2c363fd5 Track camera and flashlight usage in battery stats.
Bug: 15986092

Change-Id: Idf03981271721c44fd43327d5d90cf6f3fecfacb
2015-06-01 16:54:23 -07:00
Andres Morales
0fddb1a631 Merge "Revert "[partition checking] re-enable bootimage/bootloader, add recovery"" into mnc-dev 2015-06-01 17:50:58 +00:00
Andres Morales
c97b92e346 Revert "[partition checking] re-enable bootimage/bootloader, add recovery"
This reverts commit 831e01a89e.

Change-Id: I48bf74631b842178964d25906b2790f18632e32a
2015-06-01 17:50:43 +00:00
Stuart Scott
e3e314df4d Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I7c61a011d11e89513757f112abf320bb2a785edb
(cherry picked from commit 94b038bbb2)
2015-06-01 16:31:00 +00:00
Andres Morales
a5705a4ada Merge "[partition checking] re-enable bootimage/bootloader, add recovery" into mnc-dev 2015-05-28 23:41:04 +00:00
Tao Bao
165102f350 Merge "Wait for uncrypt to finish before rebooting" into mnc-dev 2015-05-28 21:48:29 +00:00
Adam Lesinski
8a179cab79 Merge "BatteryStats: Output per-app wifi controller distribution" into mnc-dev 2015-05-28 20:04:18 +00:00
Adam Lesinski
049c88b48a BatteryStats: Output per-app wifi controller distribution
Currently we only output this data on checkin, adding the output
to dumpsys as well.

Change-Id: I649474b576d7341bbf54ff95c0b0e6fed367bcb0
2015-05-28 12:51:19 -07:00
Paul Lawrence
3452d2d0db Merge "Honor password visible setting in CryptKeeper" into mnc-dev 2015-05-26 21:52:58 +00:00
Nicolas Prevot
5e0ef0d0e6 Merge "Say in the doc that DISALLOW_CONFIG_VPN now works." into mnc-dev 2015-05-26 20:39:28 +00:00
Nicolas Prevot
298f98fa23 Say in the doc that DISALLOW_CONFIG_VPN now works.
BUG:18902920
Change-Id: I761cba1f1e01fbe88f773887bf4e9233fc85cfef
2015-05-22 16:43:03 -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
Tao Bao
90237f7beb Wait for uncrypt to finish before rebooting
/system/bin/uncrypt needs to be triggered to prepare the OTA package
before rebooting into the recovery. For larger packages, uncrypt may be
killed before it finishes the work after the timeout. Change to monitor
the uncrypt status and show the progress to user.

Needs matching changes in bootable/recovery/uncrypt, system/core and
external/sepolicy.

Bug: 20012567
Bug: 20949086
Change-Id: I2348a98312c4dae81f618b45a2ee3b4cf6246ff5
2015-05-21 16:26:08 -07: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
Nicolas Prevot
5f645339e4 Merge "Allow creating a managed profile if there is only one user." into mnc-dev 2015-05-19 17:52:15 +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
Jeff Brown
d5538758af Merge "Rename file descriptor listener API." into mnc-dev 2015-05-18 22:47:47 +00:00
Paul Lawrence
d8fdb33891 Honor password visible setting in CryptKeeper
Bug: 20184626

Change-Id: Ida0f34299947a5d4067406cc6e029fb841077804
2015-05-18 15:13:21 -07:00
Jeff Sharkey
2177ed407b Merge changes from topic 'bench' into mnc-dev
* changes:
  Command to change force adoptable state.
  Initial pass at storage benchmarks.
2015-05-15 21:55:57 +00:00
Nicolas Prevot
72434b7088 Allow creating a managed profile if there is only one user.
BUG:21119929

Change-ID: Ice1cf25f8ae8199228f828d22118c94b9e11b567
2015-05-15 14:45:12 -07:00
Adam Lesinski
b99e6d69c3 Merge "Parse uid_cputime proc file" into mnc-dev 2015-05-15 21:23:09 +00:00
Jeff Sharkey
4c099d0c49 Command to change force adoptable state.
Since user builds can't setprop, add an explicit "sm" verb to change
the force adoptable state.

Bug: 21191915
Change-Id: I719d9b18c1a98c97442a5ddb1cc5512e8e4d3d3f
2015-05-15 14:15:35 -07:00
Jeff Sharkey
9756d75ec2 Initial pass at storage benchmarks.
Offer an interface for Settings to invoke benchmarks on various
attached volumes.

Bug: 21172095
Change-Id: I847ddc87c58285457d1324be87f70ce10507accb
2015-05-15 13:47:12 -07:00
Jeff Brown
3f6405259a Rename file descriptor listener API.
Bug: 21039493
Change-Id: I506c429e99528eb04dbda5b28da2ad000d10b467
2015-05-15 12:28:15 -07:00
Ruben Brunk
096c11dc37 Merge "camera2: Fix work-profile eviction handling." into mnc-dev 2015-05-15 01:45:19 +00:00
Ruben Brunk
7f75da2405 camera2: Fix work-profile eviction handling.
Bug: 20124384

Change-Id: I6fb82dbfd5f98746ed4befed81a583e3709bfee8
2015-05-14 18:39:50 -07:00
Alan Viverette
8d0cf8bc45 Merge "Add example for detectResourceMismatches()" into mnc-dev 2015-05-14 16:39:20 +00:00
Alan Viverette
39bf9a1916 Add example for detectResourceMismatches()
Bug: 21043958
Change-Id: Iff6811539f249cbc4fbeebf63e02f62c4a2b0c95
2015-05-13 17:22:34 -07:00
Jeff Sharkey
c968e21937 Merge "Determine if we have adoptable disks." into mnc-dev 2015-05-13 20:57:03 +00:00
Jeff Sharkey
0d838a0fad Determine if we have adoptable disks.
Bug: 19993667
Change-Id: I9b21b05736c22d34ca22f5ad6e1a6ebec440cfb6
2015-05-13 13:54:35 -07:00
Jeff Sharkey
4af455beb7 Merge "Rewriting should fail when any paths are null." into mnc-dev 2015-05-13 19:39:26 +00:00
Jeff Sharkey
41be35dd01 Rewriting should fail when any paths are null.
Bug: 21017105
Change-Id: I0c5e9c5bdf397d51e2799b06a52bc5bd0bdd09b0
2015-05-13 12:38:16 -07:00
Jeff Sharkey
44b4add4ce Merge "New "sm" shell tool to call StorageManager." into mnc-dev 2015-05-13 05:27:30 +00:00
Jeff Sharkey
7d2af54a98 New "sm" shell tool to call StorageManager.
Surface basic StorageManager commands through shell tool, like
simple listing of disks and volumes, and commands like mounting and
partitioning.

The output is designed to be parsed by host-side testing tools,
instead of relying on fragile dumpsys parsing.

Bug: 19993667
Change-Id: I993e92ecf57996678965945f0ae648b392a77ea2
2015-05-12 15:52:43 -07:00
Adam Lesinski
06af1fac16 Parse uid_cputime proc file
Instead of using the ProcessCpuTracker as the source of truth, we
periodically poll the new uid_cputime kernel module for stats
on all UID cpu time.

TODO: Need to tell the kernel when to stop tracking UIDs (aka on package
uninstall).

Change-Id: Id1d251aae23ab53f7acc0aba3bca5118bc2c194a
2015-05-12 13:19:05 -07:00
Amith Yamasani
bb9d9278aa Merge "Idle timebase" into mnc-dev 2015-05-12 13:04:31 +00:00
Amith Yamasani
06bf824628 Idle timebase
Use screen on time as timebase for idling out apps
that have been inactive.

Store the time when an app was last active as an additional
package state in UsageStats. Compare it to screenOnTime to decide
if it's inactive.

Exclude device idle whitelist from apps that can go inactive.

Bug: 20066058

Change-Id: I709f9f31a9affa7ca6e1ae3e4c5729c5fb221669
2015-05-11 17:46:14 -07:00
Dianne Hackborn
9c8600e1af Merge "Implement device idle in power manager." into mnc-dev 2015-05-11 22:22:36 +00:00
Dianne Hackborn
8d66b3fbf5 Implement device idle in power manager.
When in device idle mode, we now prevent most apps
from being able to hold partial wake locks.  The
device idle controller now pushes its white list of
app uids into the power manager, so it can apply this
policy correctly to only apps that are not whitelisted.

The implementation adds a new "disabled" flag to a wake
lock which is set when we want to apply this policy.  When
set, we ensure that we tell battery stats that the wake lock
is not being held and ignore that wake lock when computing
the power state summary.

Also add new SDK APIs to schedule alarms that are allowed
to execute while in idle mode.

Finally add new dumpsys commands to the device idle controller
to completely disable and re-enable its operation, to use
for testing.

Change-Id: I1f16672c6ac06d03bb538f9854d5843db9aa6f27
2015-05-11 15:16:47 -07:00
Andres Morales
831e01a89e [partition checking] re-enable bootimage/bootloader, add recovery
Still don't have a consistent fingerprint for Radio, so can't
yet enable.

Change-Id: Ie876dc3f52a2df3c0bd67cc80eb24e22e3dcdbfb
2015-05-11 14:25:02 -07:00
Fyodor Kupolov
b501330a1b Disable multi-user background recording
On user switch, kill existing processes of the background user with
android.permission.RECORD_AUDIO permission. Home activity should not be
killed to avoid an expensive restart of the home launcher, when the
user switches back.

Introduced DISALLOW_RECORD_AUDIO user restriction, which is enabled for the
background user, and removed for the foreground user.

Introduced a concept of system controlled user restriction, which can only
be set by the system, rather than device administrator.

Bug: 20346194
Change-Id: Ic942fd565e80d14424230dae612965a8e229c4ef
2015-05-08 17:17:16 -07:00
Fyodor Kupolov
4f434a0470 Merge "Remove restrictions PIN functionality" into mnc-dev 2015-05-08 23:10:31 +00:00
Richard Uhler
c14b9cf628 Add 'App Summary' section to meminfo.
The 'App Summary' section is shown by default when other memory
details are shown. This adds a new meminfo flag '-s' to show only the
App Summary section.

Change-Id: I66913673cd3afca873a8b13e45abe071d4c57b82
2015-05-08 19:47:52 +00:00
Adam Powell
e960030f75 Add Build.VERSION.PREVIEW_SDK_INT
Add a constant to the SDK that apps may use to detect incremental API
changes across prerelease preview builds. APIs newer than the latest
official API level are not guaranteed to be stable or even present
across preview revisions.

Change-Id: I14341e55a3ebc3d872977970b9440c400e71f588
2015-05-06 18:13:09 -07:00