Commit Graph

4128 Commits

Author SHA1 Message Date
Tao Bao
a37881db3d Merge "RecoverySystem: Enable the package compatibility verification." into oc-dev am: a532f4d7f8
am: 9da2190238

Change-Id: Ic99e657d13ee7a6390aa1af57ce3b85925e953be
2017-04-19 16:44:24 +00:00
Tao Bao
9da2190238 Merge "RecoverySystem: Enable the package compatibility verification." into oc-dev
am: a532f4d7f8

Change-Id: Ia44184bcefda25a8cbf362d4b911713669bace32
2017-04-19 16:38:58 +00:00
Tao Bao
a532f4d7f8 Merge "RecoverySystem: Enable the package compatibility verification." into oc-dev 2017-04-19 16:30:28 +00:00
Tao Bao
5b7925d78d Merge "RecoverySystem: Verify the package compatibility." into oc-dev am: e3872a4fc9
am: a9fd199fdd

Change-Id: I65c9418a651dd66f274ab6e331185731be10e8ea
2017-04-19 16:10:20 +00:00
Tao Bao
a9fd199fdd Merge "RecoverySystem: Verify the package compatibility." into oc-dev
am: e3872a4fc9

Change-Id: I120d13b68e837c6ebb60baf8d3fe3aecb495159f
2017-04-19 16:05:25 +00:00
Tao Bao
e3872a4fc9 Merge "RecoverySystem: Verify the package compatibility." into oc-dev 2017-04-19 15:54:24 +00:00
Tao Bao
87daeb15fd RecoverySystem: Enable the package compatibility verification.
Hook up to android.os.VintfObject.verify().

Bug: 36592877
Test: Flash on marlin; verify with package that has and doesn't have
      compatibility.zip entry.
Change-Id: I4e73fa42f4e3fd2e1c5ffec2ffa6152538d62eee
2017-04-18 15:54:28 -07:00
Jeff Sharkey
498e095b6e Merge "Storage API polishing." into oc-dev am: 200d72d933
am: aead06b971

Change-Id: I13baad3e589cfe6b1ee257fa13742394cdee3c51
2017-04-17 23:57:40 +00:00
Jeff Sharkey
aead06b971 Merge "Storage API polishing." into oc-dev
am: 200d72d933

Change-Id: I1ad134599ee095628dcc7fe1da28bda40a1863f4
2017-04-17 22:39:20 +00:00
Tao Bao
e01b520dd4 RecoverySystem: Verify the package compatibility.
This CL extends the existing API RecoverySystem.verifyPackage() to
verify the compatibility entry in an OTA package. It returns true
directly if such an entry doesn't exist. Otherwise it reads and passes
the contents to VintfObject to perform the verification.

This CL also adds a new system API
RecoverySystem.verifyPackageCompatibility() to verify a given
compatibility zip file. It extracts all the entries and passes them to
VintfObject.verify() to verify the package compatibility. This API is
for streaming A/B OTAs only, where we don't download the full package
but only needed entries.

Bug: 36592877
Bug: 36596980
Test: RecoverySystem.verifyPackage() returns the same result for
      packages w/o a compatibility entry.
Change-Id: I038be672868a91820c045d1da100e8e33b23d442
2017-04-17 13:51:02 -07:00
Jeff Sharkey
789a8fc792 Storage API polishing.
Based on API council feedback, switch to using real UUID objects
instead of Strings.  Since UUID is a general-purpose utility class
that will be passed around quite a bit, add it to Parcel and Bundle.

Define well-known namespaced UUID values for "default" and "primary
physical" storage devices, which will let us annotate a bunch of
things with @NonNull.

Define new extras for MANAGE_STORAGE intent that apps can use to
signal where and how much space they'd like the user to free up.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37325923, 35812899, 35806020
Change-Id: I8421b126d680f69141a361c1e77223fe2bf4a325
2017-04-17 12:19:50 -06:00
Eugene Susla
1c6b5765bb Merge "API for notification listener for Companioon apps" into oc-dev am: 0d88904744
am: 0fb1104b25

Change-Id: I33326544bd1eef9abc900ea13cb2fdf32ad06cbe
2017-04-15 04:28:02 +00:00
Eugene Susla
0fb1104b25 Merge "API for notification listener for Companioon apps" into oc-dev
am: 0d88904744

Change-Id: Ie6093be3e7699481473eeb597bc4d604728330a2
2017-04-15 04:22:48 +00:00
Eugene Susla
cf00adebec API for notification listener for Companioon apps
Test: 1. Trigger the confitrmation dialog.
Ensure it looks exactly like the one from settings.
2. Call an API without associating the appa first
Ensure exception is thrown with a message mentioning the need to associate 1st
Change-Id: I94d4116e1988db869ed445ae3fd018c50590e3f4
2017-04-14 19:01:53 -07:00
Andrew Scull
1b67465918 Merge "Service for OEM lock management." into oc-dev am: e52a1bfede
am: d4be031c76

Change-Id: I9ab76546a140062940c128abdc2b8b4072d3b0f2
2017-04-14 18:01:24 +00:00
Yifan Hong
1ac3406335 Merge "Add Java API for libvintf." into oc-dev am: c223d70e64
am: 38bf613c0f

Change-Id: I3d2d7c3db36395aa3fcfcbb2396619c46c353d05
2017-04-14 17:05:01 +00:00
Bookatz
c2c9363c7a Merge "Collect background stats: syncs" into oc-dev am: a8fc7bff5a
am: 53b7ff2014

Change-Id: I30744a569a8617369e52c06de9b897128521cbb4
2017-04-14 16:11:50 +00:00
Adam Lesinski
c96e4b0f76 Merge "BatteryStats: Remove reading of cpu power" into oc-dev am: af85d84050
am: 51d94c82af

Change-Id: I0bef2f7074a06f8336d727dd89c685c76262eca5
2017-04-14 16:04:32 +00:00
Andrew Scull
d4be031c76 Merge "Service for OEM lock management." into oc-dev
am: e52a1bfede

Change-Id: I074e29147417d6a358fd97e7e60cd4cfbed5c4df
2017-04-14 11:43:03 +00:00
Andrew Scull
e52a1bfede Merge "Service for OEM lock management." into oc-dev 2017-04-14 11:31:06 +00:00
Yifan Hong
38bf613c0f Merge "Add Java API for libvintf." into oc-dev
am: c223d70e64

Change-Id: I4401faccfb5c6be29635983ec07dedb32b7f8c74
2017-04-14 04:13:04 +00:00
TreeHugger Robot
c223d70e64 Merge "Add Java API for libvintf." into oc-dev 2017-04-14 02:02:08 +00:00
Yifan Hong
becc56d7ea Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:05 -07:00
Bookatz
53b7ff2014 Merge "Collect background stats: syncs" into oc-dev
am: a8fc7bff5a

Change-Id: Id3f2d7b2a77c74657416e492519f2205bc46218a
2017-04-13 21:31:05 +00:00
TreeHugger Robot
a8fc7bff5a Merge "Collect background stats: syncs" into oc-dev 2017-04-13 21:20:14 +00:00
Adam Lesinski
51d94c82af Merge "BatteryStats: Remove reading of cpu power" into oc-dev
am: af85d84050

Change-Id: I671a51d53c035d40cb1af1428f7c0f4093445aed
2017-04-13 20:22:19 +00:00
Adam Lesinski
af85d84050 Merge "BatteryStats: Remove reading of cpu power" into oc-dev 2017-04-13 20:09:51 +00:00
Bookatz
2bffb5bb3a Collect background stats: syncs
Added background times and counts for an app's sync usage.

Bug: 35669746
Test: runtest -x
frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java

Change-Id: I1c01c5044064277b97e8d330386454da3e8204da
2017-04-13 11:59:33 -07:00
Daichi Hirono
8bf30a7826 Merge "Address API review for ProxyFileDescriptorCallback" into oc-dev
am: 73b54bfd6d

Change-Id: I5969b9ec58b1d9d9baf3f9a9e4bd87678416e469
2017-04-13 18:21:18 +00:00
TreeHugger Robot
73b54bfd6d Merge "Address API review for ProxyFileDescriptorCallback" into oc-dev 2017-04-13 18:11:48 +00:00
Michael Wright
8f072af76d Merge "Catch exceptions in Vibrator to maintain compatibility" into oc-dev am: 07d60cce02
am: 49f1db32ef

Change-Id: If9510872fe549d06a4f2cdef6c96862f5dfd4127
2017-04-13 07:06:11 +00:00
Michael Wright
49f1db32ef Merge "Catch exceptions in Vibrator to maintain compatibility" into oc-dev
am: 07d60cce02

Change-Id: I84ee1eddc5a2ae67e1da6de5ad84721714bcd79f
2017-04-13 06:55:21 +00:00
TreeHugger Robot
07d60cce02 Merge "Catch exceptions in Vibrator to maintain compatibility" into oc-dev 2017-04-13 06:48:29 +00:00
Daichi Hirono
e200ae8157 Address API review for ProxyFileDescriptorCallback
The CL revise the documentation for ProxyFileDescriptorCallback.

 * Added explanation to onFsync.
 * Added explanation about offset.
 * Mentioned ErrnoException should contain E constants in OsConstants.

Bug: 35813046
Test: Build succeed
Change-Id: Ied2490b1913445ea8240eb3aaf7c12170ae4e42d
(cherry picked from commit 9555e30288)
2017-04-13 03:40:08 +00:00
TreeHugger Robot
63e9903f3d Merge "Address API review for ProxyFileDescriptorCallback" 2017-04-13 02:30:14 +00:00
Adam Lesinski
d4abd1eeb0 BatteryStats: Remove reading of cpu power
The cpu power reported by the uid_cputime kernel is inaccurate
and has only ever been recorded for dumping to batterystats.
The values have never been used in power blame calculations.

This change removes these power values which just cause noisy
data.

Bug: 36002715
Change-Id: I61bea9992aabb84d099689360fd9377b44b36e2f
Test: run `adb shell dumpsys batterystats`
Test: should not show `p=` for `Total cpu time:` line
2017-04-12 12:25:21 -07:00
Dianne Hackborn
24f3cd4ead Merge "Add new "work queue" feature to JobScheduler." into oc-dev am: 0a0a63c8b1
am: cba1893400

Change-Id: I67e7438a5563192391366683695c7fc4514a5bd6
2017-04-12 18:14:58 +00:00
Dianne Hackborn
cba1893400 Merge "Add new "work queue" feature to JobScheduler." into oc-dev
am: 0a0a63c8b1

Change-Id: I646a3a144833650f9ee7b9727f73ee78c7c82532
2017-04-12 18:02:53 +00:00
Dianne Hackborn
0a0a63c8b1 Merge "Add new "work queue" feature to JobScheduler." into oc-dev 2017-04-12 17:55:56 +00:00
Pavel Grafov
103f797a4c Merge "Introduce DISALLOW_BLUETOOTH_SHARING." 2017-04-12 10:17:19 +00:00
Dianne Hackborn
7da13d7c3e Add new "work queue" feature to JobScheduler.
This gives semantics similar to the start command
queue of services.

The implementation is currently lacking in URI permission
grant handling of the work intents; that will be coming
in a follow-up change.

This includes a first step of adjusting/fixing locking
within JobSchedulerService.  The JobServiceContext class
has a bunch of stuff it does that assumes it doesn't need
locking because it schedules the work on a handler.  However,
to be able to correctly implement the work finish flow (that
takes care of stopping the job when there is no more work),
we can't dispatch these asynchronously so need to get rid of
that and just do explicit locking.

The switch to explicit locking is half-way there (again the
remaining part will be a follow-on CL).  Right now we have
the locking, but still also the handler.  But it turns out
there were a number of things we were doing without a lock
held where we actually should have been holding a lock, so
this is better anyway.

Test: new tests added

Change-Id: Iebd098046209b28e60fd2f4d855d7f91cd3a8b03
2017-04-11 13:57:15 -07:00
Makoto Onuki
538a42da3a Merge "Expose UserHandle.getIdentifier() to CTS." into oc-dev
am: a2ea59c9bb

Change-Id: Ic9eebe67290f7dcd7ff59bb40c81d39bf2a8d82d
2017-04-11 18:11:20 +00:00
Makoto Onuki
cb8936eae9 Expose UserHandle.getIdentifier() to CTS.
This allows CTS to pass user IDs returned by APIs as UserHandle to various
ADB commands.

Test: Exposing as TestApi only; m -j
Change-Id: Iedba6d83b717baacf9e7cf97f1d32f93c191a5ca
2017-04-11 08:42:57 -07:00
Pavel Grafov
7f4ad75218 Introduce DISALLOW_BLUETOOTH_SHARING.
When this restriction is enforced Bluetooth sharing option should not be
present when the user tries to share something. Previously this was handled
by explicitly disabling bluetooth sharing activity during managed
provisioning, now this code is to be removed (see topic CLs) and the same
behavior should be achieved by setting this restriction for profile owners
by default.

In Bluetooth:
1) Don't check restrictions on boot, it is invoked anyway through the
  listener during boot.
2) Ignore when the restriction is "changed" from true to true - i think
  it was the initial intent in that condition.
3) Disable the component for a particular user and not always the
  system user. This is something that has to be fixed in O I think since
  currently in secondary user the bluetooth itself gets disabled but the
  sharing thing still shows up.

In DPMS:
1) Now ActiveAdmin for PO also contains a set of restrictions applied by
  default.
2) Now all ActiveAdmins for POs are loaded quite early. That shouldn't
  have huge impact though.

Bug: 36249732
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testBluetoothSharingRestriction
Test: run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java
Change-Id: I78c4ffbd503c4a10138e8c0862a9f206f24c5631
2017-04-11 12:22:09 +01:00
Amith Yamasani
d0709eca29 Merge "Log excessive remote callbacks" into oc-dev
am: 6c171f35be

Change-Id: I9c1703a6c9cff68ee5262c91380c4647a2a79812
2017-04-07 03:06:50 +00:00
TreeHugger Robot
6c171f35be Merge "Log excessive remote callbacks" into oc-dev 2017-04-07 02:58:53 +00:00
Chad Brubaker
49b607a61e Merge "Add UPDATE_TZDATA to config updater intents" into oc-dev
am: c56d782e13

Change-Id: I14d241e63ead50651ca21aa1d28bce3ba019b5fc
2017-04-07 02:37:36 +00:00
TreeHugger Robot
c56d782e13 Merge "Add UPDATE_TZDATA to config updater intents" into oc-dev 2017-04-07 02:28:23 +00:00
Amith Yamasani
18a23f2fd8 Log excessive remote callbacks
Bug: 36778087
Test: N/A
Change-Id: Ifb02fe09e3c0869f7f6c741f886421064e5c1b8a
2017-04-06 16:38:25 -07:00
Joel Fernandes
86c305163d Merge "Set android.display thread to top-app cpusets and schedtune group" into oc-dev
am: 5362f10dad

Change-Id: I4993d49f7bcf9606e7676b17f7dacbc0e457e061
2017-04-06 22:57:31 +00:00