Commit Graph

2416 Commits

Author SHA1 Message Date
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
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
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
Fyodor Kupolov
ef24909d84 Remove restrictions PIN functionality
Bug: 20852231
Change-Id: I5666ee28ff1341ead9b258bc0852d8ba6d313c5e
2015-05-06 13:36:03 -07:00
Prerepa Viswanadham
d1808401ca Merge changes from topic 'mwd-merge-050415' into mnc-dev
* changes:
  Merge commit 'b6f59f4' into master_merge
  Merge commit 'f6db0ce' into master_merge
  Merge commit '17455a3' into master_merge
  Merge commit 'b4d5b32' into master_merge
  Merge commit 'a1a2fa7' into master_merge
  Merge commit '8dfdb98' into master_merge
  Merge commit 'eba66c3' into master_merge
2015-05-05 01:06:38 +00:00
Jeff Sharkey
c840681dbd Avoid NPE when fsUuid is null.
Bug: 20822962
Change-Id: I6340b70dba5a4f94a0f08ddfbda0190db97746f1
2015-05-04 12:04:09 -07:00
Svet Ganov
b9d71a6f89 Add body sensors app op - framework base
Change-Id: Idd5cd573fab3405e5b2a6e51d2d9d115650826e9
2015-05-01 13:56:04 -07:00
Dan Sandler
9fc943d1a6 Merge "Icon: a clean, parcelable place for images." into mnc-dev 2015-05-01 17:57:14 +00:00
Dan Sandler
b9f7aac348 Icon: a clean, parcelable place for images.
Binder APIs which wish to consume Bitmaps *and* drawable
resources can now do so by using Icon, a kind of union type
that accommodates each of these. Icon also accepts byte
arrays holding compressed Bitmaps (PNG, JPEG, etc), which
saves clients the additional memory cost of decoding and
sending full uncompressed bitmaps through Binder interfaces.
Receiving clients can call loadDrawable{,Async} and then
getDrawable to start immediately using the image in an
ImageView or other Drawable-hosting container.

Bug: 19609468
Change-Id: Ic1343711c2ac0b15876b46f0b6008b0108a49470
2015-05-01 13:44:42 -04:00
Jeff Sharkey
a320505f3a Merge "Move both app code and data together." into mnc-dev 2015-05-01 16:22:46 +00:00
Jeff Sharkey
bd0e9e4958 Move both app code and data together.
Refactor app movement code into the normal install flow as a new
flavor of InstallArgs.  It copies both app code and data during the
copy step, and just updates paths during the rename step.

Measure free space before kicking off a move.  Spawn a thread to
derive a hacky progress estimate based on free disk space counting
down.

Remove checkFreeStorage() and getLegacyNativeLibraryPath() which
nobody was calling.  Fix deadlocks around package broadcasts, and fix
wrong lock ordering when loading packages.

Bug: 19993667, 20275578, 20370140
Change-Id: I7bbf14c924a724d6ebb8a41a02434750fa3302bc
2015-04-30 16:04:53 -07:00
Andreas Gampe
fcda22b1fe Merge "am b6d14a00: resolved conflicts for merge of c29791d5 to mnc-dev-plus-aosp" into mnc-dev 2015-04-30 17:53:51 +00:00
Jeff Sharkey
15cbbd5e4b am 21a30889: am 1df4dca2: am 9e98dce6: Merge "Returning to wizard, split move events." into mnc-dev
* commit '21a30889485020bf885ca20e209ed85c6e7d4ea5':
  Returning to wizard, split move events.
2015-04-30 01:21:08 +00:00
Jeff Sharkey
21a3088948 am 1df4dca2: am 9e98dce6: Merge "Returning to wizard, split move events." into mnc-dev
* commit '1df4dca2982acecb526495b30a605d97786df0de':
  Returning to wizard, split move events.
2015-04-30 01:01:48 +00:00
Jeff Sharkey
50a0545479 Returning to wizard, split move events.
Finish wiring up notifications to jump back into in-progress wizard
flow, using moveId as identifier.

Split move events back into separate creation and progress events,
and pass details as bundle to pass extra stuff like UUID.  Null
package still means moving primary storage.

Add explicit "volume forgotten" event for PackageManager to clean
up internal state with.

Plumb through internal path reported by vold, and bring back FUSE
bypass rewriting optimization.

Bug: 19993667
Change-Id: I0f43edbba36c58c5cd33550022c54c4eb9f01a48
2015-04-29 17:24:12 -07:00
Amith Yamasani
98322c8e88 am 278886d5: am 3184b286: am fa4eda44: Merge "Remove network access for idle apps" into mnc-dev
* commit '278886d50a66689529320f9bd735177c068e210d':
  Remove network access for idle apps
2015-04-29 23:04:50 +00:00
Amith Yamasani
278886d50a am 3184b286: am fa4eda44: Merge "Remove network access for idle apps" into mnc-dev
* commit '3184b28648a782a3a037de90bc76f64839b91560':
  Remove network access for idle apps
2015-04-29 22:52:08 +00:00
Amith Yamasani
15e47235c0 Remove network access for idle apps
Track apps going in and out of idle in the NetworkPolicyManagerService.
Apply DROP rules in firewall controller if app is to be blacklisted
for network access.

Firewall can now be in whitelist (old) or blacklist mode. When in
blacklist, it allows all by default and we can selectively DENY
some uids.

Track app idle in UsageStats and update periodically.
Track charging/discharging states.

TODO: Check for appidle temporary parole state

Bug: 20066058
Change-Id: Ia65d7544204b3bcb78a517310ef4adcc05aac6fb
2015-04-29 14:21:53 -07:00
Dianne Hackborn
c5cbdfcfe5 am 8756f9b3: am 599a4e0e: am 9ac2718e: Merge "Implement user-settable power save whitelist." into mnc-dev
* commit '8756f9b34dd04cabae7487bd1941008a6c98c4c6':
  Implement user-settable power save whitelist.
2015-04-29 21:02:36 +00:00
Dianne Hackborn
8756f9b34d am 599a4e0e: am 9ac2718e: Merge "Implement user-settable power save whitelist." into mnc-dev
* commit '599a4e0ea864769e6cd1d04bd766c472b16be4c7':
  Implement user-settable power save whitelist.
2015-04-29 20:51:04 +00:00
Svet Ganov
8baf2b6663 am 0dbaba6c: am 5e47c802: am 56867804: Merge "Respect the record audio app op - framework" into mnc-dev
* commit '0dbaba6c3a7ae0a45e2305a21b0ef5decbde59a4':
  Respect the record audio app op - framework
2015-04-29 20:09:09 +00:00
Svet Ganov
0dbaba6c3a am 5e47c802: am 56867804: Merge "Respect the record audio app op - framework" into mnc-dev
* commit '5e47c802ef1ac9437b012bc70701ffaf048cb399':
  Respect the record audio app op - framework
2015-04-29 19:55:31 +00:00
Dianne Hackborn
0b4daca9ba Implement user-settable power save whitelist.
The whitelist is now maintained by DeviceIdleController,
which is moving out into its own independent system service.
Network stats now queries it for the whitelist, instead of
collecting that itself.

Also did a few improvements in alarm manager -- made the
code for moving alarms out of the pending list more robust,
and fixed the debug output to always print the contents of
the pending list even if we aren't in a pending state.  (That
would have helped me identify the problem much earlier.)

Change-Id: I0f7119d4c553c3af4d77b2f71246fa6e2c13c561
2015-04-29 12:38:09 -07:00
Svet Ganov
5686780404 Merge "Respect the record audio app op - framework" into mnc-dev 2015-04-29 19:34:06 +00:00
Jeff Sharkey
d70088d811 am 572b1078: am 15c7f90c: am b42d6946: Method to wipe all adoptable disks.
* commit '572b1078962437d7495f395bda0bc8125c833465':
  Method to wipe all adoptable disks.
2015-04-29 06:04:37 +00:00
Jeff Sharkey
9f1a1bd82d am a149ba02: am aa4e35eb: am b36586a7: Split some VolumeInfo state into VolumeRecord.
* commit 'a149ba0255c5983b4e0b23b120b388b9236583e9':
  Split some VolumeInfo state into VolumeRecord.
2015-04-29 05:52:54 +00:00
Jeff Sharkey
572b107896 am 15c7f90c: am b42d6946: Method to wipe all adoptable disks.
* commit '15c7f90c8d84ce992659d0ec29bb0e60f1b603d1':
  Method to wipe all adoptable disks.
2015-04-29 05:52:35 +00:00
Jeff Sharkey
a149ba0255 am aa4e35eb: am b36586a7: Split some VolumeInfo state into VolumeRecord.
* commit 'aa4e35eb6540806958cb37c5c564c5d20dd7a978':
  Split some VolumeInfo state into VolumeRecord.
2015-04-29 05:41:33 +00:00
Jeff Sharkey
b42d694691 Method to wipe all adoptable disks.
Will be used by various classes doing factory reset.

Bug: 9433509
Change-Id: I0701abe00abc2fb9085ce1ffe6e28fb27c91ab51
2015-04-28 22:25:26 -07:00
Jeff Sharkey
b36586a7c9 Split some VolumeInfo state into VolumeRecord.
VolumeRecord is a historical record of a volume that we've seen in
the past.  It's now surfaced outside the framework for SystemUI to
drive the notifications that bug users to reinsert missing private
volumes.

Show progress notifications for both storage and package movement
operations.  Notify when an empty disk is inserted (no usable volumes)
which launches into the normal format flow.

Add API to forget volumes.

Bug: 20275424, 20275424
Change-Id: I75602c17fdcd4d1f1f62324e1a08c4a33093eefa
2015-04-28 22:02:36 -07:00
Svet Ganov
fa5ecdc4ac Respect the record audio app op - framework
Change-Id: I5696d2ef22738ccffaf8bd7a0ee68cbc3dea3bf1
2015-04-28 16:31:58 -07:00
Andreas Gampe
27c39f1ade am b6d14a00: resolved conflicts for merge of c29791d5 to mnc-dev-plus-aosp
* commit 'b6d14a009e43a4d61ae2a4f98f6e3b914148d0a9':
  Frameworks/base: Add debug.gencfi property

(cherry picked from commit a5b55a017a)
2015-04-28 13:46:00 -07:00
Narayan Kamath
b40b49577c am 7ecc6b72: am 71fa6862: Merge "Fix NPE in Bundle#hasFileDescriptor on null-valued SparseArray"
* commit '7ecc6b721e5da0cc3a52dc14bdfd8d1308db84bc':
  Fix NPE in Bundle#hasFileDescriptor on null-valued SparseArray
2015-04-28 10:00:25 +00:00
Narayan Kamath
498bf16ef0 am 90601a72: am b736868b: Merge "Fix NullPointerException in Bundle#hasFileDescriptors"
* commit '90601a724efea2a15769195b4c452d854607931e':
  Fix NullPointerException in Bundle#hasFileDescriptors
2015-04-28 10:00:15 +00:00
Narayan Kamath
7ecc6b721e am 71fa6862: Merge "Fix NPE in Bundle#hasFileDescriptor on null-valued SparseArray"
* commit '71fa6862f307796c659fd4e83a7724dd6851b69e':
  Fix NPE in Bundle#hasFileDescriptor on null-valued SparseArray
2015-04-28 09:48:24 +00:00