Commit Graph

3852 Commits

Author SHA1 Message Date
Pavel Grafov
eaed75d923 Merge "Make ENSURE_VERIFY_APPS global even when set by PO." 2017-01-18 11:15:28 +00:00
Xiaohui Chen
387c65f639 Add build flag for container builds
Test: lunch and build
Bug: 34350397
Change-Id: Ideb14200b5056449055ca17d868c615548445dc9
2017-01-17 15:12:26 -08:00
Lorenzo Colitti
e00c7dd3fc Merge "Delete dead code." am: cf59ff79c5 am: d305a7c894 am: 8cf7169564
am: bb79257dbf

Change-Id: I97102d587cfc8699fd36f18e4072a5baaa7e2d11
2017-01-17 07:01:18 +00:00
Tao Bao
877d099ab4 Merge "RecoverySystem: Fix the issue in installPackage()." am: 3b2fe9f7b9 am: 6bb3a9e6df am: 5c610492c8
am: 448716eec1

Change-Id: Ib36b7e990e7ae545f6b58f7a425c8f9aa19ad9aa
2017-01-17 06:55:46 +00:00
Martijn Coenen
c09025165a Merge "Add nullable parameter to readEmbeddedBuffer." am: c5e5442acd am: b529858c0b am: 714c8596ad
am: 098bbc455d

Change-Id: I44b1ed7a8561ee234d6a55a9ed02eb3876c4a7fc
2017-01-17 06:50:39 +00:00
Lorenzo Colitti
bb79257dbf Merge "Delete dead code." am: cf59ff79c5 am: d305a7c894
am: 8cf7169564

Change-Id: Ia662fd845fcfb4ade631d8aacf6bcff3c92a1543
2017-01-17 06:08:28 +00:00
Treehugger Robot
cf59ff79c5 Merge "Delete dead code." 2017-01-17 05:44:58 +00:00
Tao Bao
448716eec1 Merge "RecoverySystem: Fix the issue in installPackage()." am: 3b2fe9f7b9 am: 6bb3a9e6df
am: 5c610492c8

Change-Id: Ic9fa3bb8c7d4c04fa6e55b600cd7cccc9b186db1
2017-01-16 18:36:43 +00:00
Pavel Grafov
6a40f09083 Make ENSURE_VERIFY_APPS global even when set by PO.
Currently only device owner can set global user restrictions.
With this CL ENSURE_VERIFY_APPS will be global no matter who
enforces it, DO or PO.

To make it possible for system apps to check who enforces a
particular restriction in this case a new API method is added
to UserManager: getUserRestrictionSources which returns a list
of users who enforce the restriction.

Bug:31000521
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.UserRestrictionsTest (ag/1732744)
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/pm/UserRestrictionsUtilsTest.java
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
Test: installed M on a Nexus5x device, created a managed profile with some user restrictions, and checked that after upgrading M->O all restrictions are preserved and split correctly into base, global and local.
Change-Id: I543d3ec9ef0cf2b730da6f7406021c0bba43b785
2017-01-16 18:29:01 +00:00
Tao Bao
3b2fe9f7b9 Merge "RecoverySystem: Fix the issue in installPackage()." 2017-01-16 18:19:25 +00:00
Martijn Coenen
098bbc455d Merge "Add nullable parameter to readEmbeddedBuffer." am: c5e5442acd am: b529858c0b
am: 714c8596ad

Change-Id: I792c4ac6a20e4665b152a5ebea1227b549cca7ef
2017-01-16 15:06:01 +00:00
Jesse Hall
17ee3aac28 Create GraphicsEnvironment for communicating with driver loaders
The GraphicsEnvironment class is given information during application
start, and makes it available to EGL/GLES/Vulkan loaders that don't
have easy access to the VM or to the application Context. Currently
only the driver path is handled, but the existing support for setting
library paths (for Vulkan extensions) and cache directory information
should move here.

Bug: 33531483
Test: various apps w/ and w/o driver package installed
Change-Id: I5820d3d1301d5461e10706f551b268c54d4f8926
(cherry picked from commit b12249b671)
2017-01-15 05:55:46 +00:00
Jesse Hall
b12249b671 Create GraphicsEnvironment for communicating with driver loaders
The GraphicsEnvironment class is given information during application
start, and makes it available to EGL/GLES/Vulkan loaders that don't
have easy access to the VM or to the application Context. Currently
only the driver path is handled, but the existing support for setting
library paths (for Vulkan extensions) and cache directory information
should move here.

Bug: 33531483
Test: various apps w/ and w/o driver package installed
Change-Id: I5820d3d1301d5461e10706f551b268c54d4f8926
2017-01-14 17:31:56 -08:00
Tao Bao
9f7a0acd2d RecoverySystem: Fix the issue in installPackage().
Commit 794c8b0b3f fixed the race condition
when requesting data wipes via uncrypt. We have similar issue with
RecoverySystem.installPackage(). It first requests to set up the BCB,
then triggers a reboot. These two steps should finish atomically.

This CL switches to calling
RecoverySystemService.rebootRecoveryWithCommand(), which guards the two
steps with synchronized blocks.

Bug: 34239871
Test: Having two apps: one calls RecoverySystem.cancelScheduledUpdate()
      continuously, and the other calls RecoverySystem.installPackage()
      just once. The install request should not be cancelled by the
      other.

Change-Id: I5ec56fcaa70eae7c33e3cc8e6cfc7472b935ce4e
2017-01-13 09:59:38 -08:00
Martijn Coenen
14fae06b60 Add nullable parameter to readEmbeddedBuffer.
To support reading embedded buffers that can be
nullptr (currently only in empty hidl_vec).

Bug: 34255213
Test: hidl_test_java
Change-Id: I72028f580b7863b6bfeb31a5c0f43deed36dfd64
2017-01-13 14:17:12 +01:00
TreeHugger Robot
b237ddcb84 Merge "Remove PO support from HardwarePropertiesManager" 2017-01-12 14:01:26 +00:00
Santos Cordon
f85ab8306f Add Brightness setting for VR Mode.
am: d6a5660a2c

Change-Id: If371f485471eb1ab0a3e07964c197cb9b8ef1c9f
2017-01-11 03:12:05 +00:00
Santos Cordon
e89ba5222c Merge "Add Brightness setting for VR Mode." 2017-01-11 03:02:02 +00:00
Santos Cordon
3107d29c8f Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Test: runtests frameworks-core
Test: Turn vr mode on and change brightness (should remain separate from
normal brightness)

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-10 17:16:04 -08:00
Andrew Scull
54402aab14 Merge "Evict CE key on request and when work mode is turned off." 2017-01-10 13:20:49 +00:00
Santos Cordon
d6a5660a2c Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-09 17:33:14 -08:00
Alex Naidis
bede012069 Merge "StorageManager: Improve exception handling" am: cf3a4a68bd am: 545cf37844 am: edca8aa3a8
am: 32dfe8c611

Change-Id: I5faf99bd2b4425f1615419de43f247f78d74108b
2017-01-09 17:14:34 +00:00
Alex Naidis
32dfe8c611 Merge "StorageManager: Improve exception handling" am: cf3a4a68bd am: 545cf37844
am: edca8aa3a8

Change-Id: Idbd8b16f0825bdcf48d2013448c767d0966434fe
2017-01-09 17:09:31 +00:00
Alex Naidis
19d9c2d03c StorageManager: Improve exception handling
When "getPrimaryStorageSize" provides a path
to "readLong", the option that the path
doesn't exist is expected, since it tries
all paths from "INTERNAL_STORAGE_SIZE_PATHS"
until there is success.

This patch makes us catch the "FileNotFoundException"
and "NumberFormatException" seperately.

For the above reason a "FileNotFoundException"
is now treated as an information only.
The "NumberFormatException" and other exceptions
are now treated as error since those are not
expected to happen.

Change-Id: I5316f9c3108e36c31b27dc5df8bf8ac4d4257629
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-09 16:27:52 +00:00
Polina Bondarenko
8503fd51e5 Remove PO support from HardwarePropertiesManager
Removed broken profile owner support from HardwarePropertiesManager and
documentation.

Bug: 32945942
Test: compile
Change-Id: Ie5a26a4c94c35f6d894eff57c996552406ddd723
2017-01-09 16:24:21 +01:00
Nick Kralevich
4429993d78 Merge "Dumps total size of primary storage." am: 55dc66dde4 am: 12b387dd87
am: a63462c794

Change-Id: I2a62442a581d89054421dd6c44c610fb7ee9a0c4
2017-01-08 15:09:21 +00:00
Felipe Leme
c0d3f0ed52 Dumps total size of primary storage.
BUG: 32069168
Test: manual verification

(cherry picked from commit 281389ac54)

Change-Id: If5dee52a99c03a00dada22736c09d953dc0b66d1
2017-01-08 03:51:37 +01:00
Adam Lesinski
6224a32197 Merge changes from topic 'learned_capacity'
* changes:
  BatteryStats: Report learned battery capacity as event
  Parcel/unparcel charge_full state from BatteryProperties
2017-01-07 01:51:07 +00:00
Narayan Kamath
3aea733059 Merge "PackageManagerService: Implement packageParser cache in ParallelPackageParser." 2017-01-06 09:14:03 +00:00
Steven Moreland
4d3caf3938 Merge "HwBinder: get/register checked exceptions." am: 9ec4fec5ca am: 3290ba072b
am: 94924f38fb

Change-Id: I3b871a941856fdeb0e989aeaadc5fdbc7732b681
2017-01-06 01:16:02 +00:00
Narayan Kamath
5c50e86301 PackageManagerService: Implement packageParser cache in ParallelPackageParser.
We save about 2800ms of cold startup time over baseline on a marlin,
and ~1200 ms over the parallel parsing case.

                   warm     cold
		   ---------------
Baseline         : 1700ms   4300ms
Parallel         : 1400ms   2700ms
Cache            : 1000ms   1600ms
Cache & parallel : 900ms    1500ms

Note that further changes will improve the speed of cache processing.

This change also includes support for :
- a flag that been flipped in code (currently set to false).
- disabling the cache via a system property.
- wiping the cache on system upgrades.
- cache versioning.

Bug: 30792387

Test: FrameworksServicesTests
Test: manual timing

Change-Id: I281710c110af5307901dd62ce93b515287c91918
2017-01-05 19:15:31 +00:00
Steven Moreland
20ca2f782b HwBinder: get/register checked exceptions.
Bug: 33673120
Test: hidl_test_java
Change-Id: Id19b61b252e756a032ae11f7b59bd8eed82edbe9
2017-01-05 09:22:03 -08:00
Steven Moreland
c0631d0bb7 HwBinder: get/register checked exceptions.
Bug: 33673120
Test: hidl_test_java
Change-Id: Id19b61b252e756a032ae11f7b59bd8eed82edbe9
2017-01-05 09:20:44 -08:00
Nicolas Prévot
b4413f694f Merge "Make disallow add/remove managed profile restriction not global." 2017-01-05 14:54:45 +00:00
Nicolas Prevot
2ea46fe658 Make disallow add/remove managed profile restriction not global.
Otherwise: if the DO sets remove managed profile user restriction:
the profile owner of a managed profile cannot remove this managed
profile.

BUG:33854430
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I90b2028ea627a2073298bf9ef3c07b4fdf8d13a1
2017-01-05 11:58:21 +00:00
Amith Yamasani
c9facc0a1f Merge "Track background sensor usage" 2017-01-05 00:32:10 +00:00
Amith Yamasani
ab9ad195d1 Track background sensor usage
Keep an additional counter for background access
of sensors. Increment the count when sensor is
accessed while process is in the background state.

Bug: 33553631
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsSensorTest.java
Change-Id: I87d7dbdaf4c34aa9dd9c7e13134d8f5f759f4e2b
2017-01-04 12:34:57 -08:00
Amith Yamasani
8a86825e7e Merge "Fix for race in writeToParcel and unparcel" 2017-01-04 18:23:38 +00:00
Steven Moreland
3b20d72697 Merge "Add checked exceptions to HwBinder transact." am: 6c5cc261f8 am: ca5d560090
am: d38478cb50

Change-Id: Ic0c6eb87c57aca798ff167a71929f1a0e3132a75
2017-01-04 05:11:06 +00:00
Steven Moreland
e62b1f32f3 Add checked exceptions to HwBinder transact.
Bug: 33673120
Test: hidl_test_java
Merged-In: I7b62eb6b066fc24c44ef7e46aaa2a3208c053d11

Change-Id: I7b62eb6b066fc24c44ef7e46aaa2a3208c053d11
2017-01-04 01:13:16 +00:00
Steven Moreland
27538df549 Add checked exceptions to HwBinder transact.
Bug: 33673120
Test: hidl_test_java

Change-Id: I7b62eb6b066fc24c44ef7e46aaa2a3208c053d11
2017-01-03 16:41:34 -08:00
Jeff Sharkey
dbc2ef417b Merge "Offer to measure disk stats using quotas." am: f8720b95be am: 4b80a4a372 am: 1e1cdbead1
am: 7664e61885

Change-Id: I91c0810aad2ec530650855bcd2f1d25c309717a1
2017-01-03 19:56:07 +00:00
Jeff Sharkey
7664e61885 Merge "Offer to measure disk stats using quotas." am: f8720b95be am: 4b80a4a372
am: 1e1cdbead1

Change-Id: Ic00acfb0efb6188a15357322528075d41467310b
2017-01-03 19:48:36 +00:00
Jeff Sharkey
5eb3eb58ac Offer to measure disk stats using quotas.
Now we're getting somewhere!  This CL starts measuring disk usage
using quotactl(), which is almost instant and has much lower impact
on flash memory lifetime.

We now grant the per-app cache GID to every launched app, and the
ContextImpl logic that creates cache directories matches the logic
down in installd.

Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: Ie269a2958ce0e1c17cb74dbfecc791a5c12922cf
2017-01-03 10:22:39 -07:00
Martijn Coenen
872a5c0cdf Merge "Add (un)linkToDeath support to HwBinder." am: 7705363166 am: 010d0be575 am: 1f8c96ca7f
am: c052e6c67f

Change-Id: I5b515db7eaeac33a9072e6046f4c5bb948d5aa39
2016-12-29 09:27:24 +00:00
Martijn Coenen
c052e6c67f Merge "Add (un)linkToDeath support to HwBinder." am: 7705363166 am: 010d0be575
am: 1f8c96ca7f

Change-Id: Ic195a1f3ab2a9d318fe667ac3be0ce166119dc66
2016-12-29 09:19:55 +00:00
Martijn Coenen
727f7bf84f Add (un)linkToDeath support to HwBinder.
This is mostly copied over from binder's existing
death recipient support. The implementation keeps
a list of registered recipients, both for being
able to map a native recipient back to the corresponding
Java recipient, as well as being able to unregister
recipients correctly.

Test: mma, hidl_test_java
Bug: 31632518
Change-Id: Id313fd248be6925056c4ade8298fe5fb04e007cc
2016-12-29 04:22:30 +00:00
Selim Cinek
7e5cff0167 DO NOT MERGE Revert "Add Brightness setting for VR Mode."
am: 966045d070

Change-Id: Ib1be78a47f5947f4fcc6eabc2f6af76523690ed9
2016-12-27 19:22:04 +00:00
Selim Cinek
966045d070 DO NOT MERGE Revert "Add Brightness setting for VR Mode."
This reverts commit 84980c7a93.

Bug: 33895226
Bug: 30984614
Change-Id: I2652e77512bc870190e2172a629abac9341b2c4f
2016-12-27 18:28:40 +00:00
Ian Pedowitz
7e96654f1b Revert "Add Brightness setting for VR Mode."
This reverts commit c7e853f511.

Bug: 33895226
Bug: 30984614
Change-Id: Icca320e02651b7dd7b8db84ab414f41edee32760
2016-12-27 18:28:36 +00:00