Commit Graph

5696 Commits

Author SHA1 Message Date
TreeHugger Robot
11f07dec94 Merge "Private DNS: Add user restriction" 2018-10-17 08:36:56 +00:00
Peiyong Lin
88c38eb6fe [GraphicsEnvironment] Add whitelist support.
This patch adds the ability to load whitelist from updatable graphcis driver
apk. Typically a whitelist is part of the graphics driver apk, and the name is
set by overwriting ro.gfx.driver.whitelist.0

BUG: 117241379
Test: Build, flash and boot, whitelist an app and verify.
Change-Id: Ie36ca0173a90a8e48acaca2979ab64bbf92eeaed
2018-10-16 12:54:38 -07:00
Cody Northrop
fba8e6342f Merge "Revert "Revert "Rootless GPU Debug for GLES""" 2018-10-16 18:54:42 +00:00
Cody Northrop
ebe6a56f80 Revert "Revert "Rootless GPU Debug for GLES""
This reverts commit 2653e624dc.

Exempt-From-Owner-Approval: This restores a commit that was already
approved and rolled back for unrelated reasons in frameworks/native.

Test: cts-tradefed run singleCommand cts -m CtsGpuToolsHostTestCases
Test: Chromium starts up
Test: CtsDeqpTestCases:include-filter:dEQP-EGL.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES2.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES3.*
Test: CtsDeqpTestCases:include-filter:dEQP-GLES31.*
Bug: 110883880
Bug: 117609555
Change-Id: Iab23a5d598986ba34c0ba62dc78299d022924cd9
2018-10-16 18:51:28 +00:00
Luke Huang
ca4d6f124c Merge "Network-related commands porting" am: 9b20115264 am: 923aa75d75
am: 11454a2163

Change-Id: I61fea40c9659f1eed1638cc196d309289393d6a5
2018-10-16 02:32:50 -07:00
Luke Huang
11454a2163 Merge "Network-related commands porting" am: 9b20115264
am: 923aa75d75

Change-Id: I957050b73afed3e6fde908883568b81198310622
2018-10-16 02:19:35 -07:00
Luke Huang
9b20115264 Merge "Network-related commands porting" 2018-10-16 07:44:37 +00:00
Philip P. Moltmann
54118289e5 Merge "Use public method in RestrictedLockUtils#isCurrentUserOrProfile" 2018-10-15 16:41:53 +00:00
Eran Messeri
09b122daac Private DNS: Add user restriction
Add a user restriction to prevent the user from changing the Private DNS
settings.

This would be used together with the new DevicePolicyManager API to set
the Private DNS settings by the Device Policy Client to enforce Private
DNS settings by the IT admin of the user.

Bug: 112982691
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
Test: Manual, using TestDPC
Change-Id: Ibec3cfcede7e4082db4068cbdd047ada3f6c227e
2018-10-15 07:52:26 +01:00
Cody Northrop
2653e624dc Revert "Rootless GPU Debug for GLES"
This reverts commit f41625936f.

Exempt-From-Owner-Approval: Reverting
Bug: 110883880
Test: Chrome no longer crashes
Change-Id: I70c9d4a0376b27059e7759e1b6283903c0cf168b
2018-10-12 21:34:15 +00:00
Nandana Dutt
d1773d6459 Merge "Add DumpstateOptions java implementation" am: 52502ef1a1 am: 8a9f23c8a1
am: 1d1184cf83

Change-Id: I556407ee455b92e3bae34dfa603e159b99f45080
2018-10-12 11:21:26 -07:00
Nandana Dutt
1d1184cf83 Merge "Add DumpstateOptions java implementation" am: 52502ef1a1
am: 8a9f23c8a1

Change-Id: I392c2c6bdb522efa708b82174debf3a18167c0bc
2018-10-12 11:07:59 -07:00
Marcin Oczeretko
4427272533 LooperStats - track time to message dispatch
Test: UT and manual
atest .../LooperStatsTest.java
Verified that adb shell cmd looper_stats dump produces data
with dispatch delay

Bug: 113651685

Change-Id: I44550f8c5d71848932733bd02016aa65ce7b75b3
2018-10-12 13:17:01 +01:00
Nandana Dutt
b3f7168136 Add DumpstateOptions java implementation
DumpstateOptions will be used to pass options to Dumpstate service
for specifying arguments for taking bugreports.

Test: m
Test: adb bugreport

Change-Id: I4dc9511f0be2f86239ea9094a3c527b6ce0d1d41
2018-10-11 17:05:35 +01:00
Anton Hansson
b32cb2a7d3 Merge "Tweak the getPartitions API" 2018-10-11 09:54:51 +00:00
Anton Hansson
81f76a0812 Tweak the getPartitions API
- Rename methods
- Annotate public APIs with @NonNull
- implement equals/hashcode

Bug: 117146036
Bug: 112584519
Test: atest BuildVersionTest
Change-Id: I0b55e7f8e240948e674a981b280d8c8c94de6f8e
2018-10-11 07:52:41 +00:00
Tor Norbye
757cc2cded Merge "Fix incorrect javadoc links" am: 0d954557a1 am: cd1c75ae4c
am: f2183961a9

Change-Id: Icf157b65308e7de18b51aec837b8c29baa5a1918
2018-10-10 23:22:18 -07:00
Tor Norbye
f2183961a9 Merge "Fix incorrect javadoc links" am: 0d954557a1
am: cd1c75ae4c

Change-Id: I6d8c44be9d156ac2b6a20d3d13972371ee4d741e
2018-10-10 17:20:42 -07:00
Cody Northrop
616d4f5697 Merge "Rootless GPU Debug for GLES" 2018-10-10 23:20:18 +00:00
Sudheer Shanka
dcd0b0abde Merge "Delete package sandbox data when it is uninstalled." 2018-10-10 21:00:04 +00:00
Cody Northrop
f41625936f Rootless GPU Debug for GLES
This commit adds the ability to enable debug layers for OpenGL ES.

Similar to Rootless Debug for Vulkan, layers can be loaded from the
APK or base directory of selected debuggable applications.

Layers will only be loaded when developers opt-in via settings for a
target application.

A separate application can now be specified as an additional location
for layer discovery.

Example usage:

  adb shell settings put global enable_gpu_debug_layers 1
  adb shell settings put global gpu_debug_app <target_app>
  adb shell settings put global gpu_debug_layers layer1.so:layer2.so
  adb shell settings put global gpu_debug_layer_app <layer_app>

Test: cts-tradefed run singleCommand cts -m CtsGpuToolsHostTestCases
Bug: 110883880
Change-Id: I16df1951be0c06c80a445991e3e6d1636222b17b
2018-10-10 14:50:25 -06:00
Philip P. Moltmann
e5e217dac2 Merge "Change DevicePolicyManager APIs as requested" 2018-10-10 19:50:06 +00:00
Irina Dumitrescu
c6426b0e41 Merge "Fix incorrect javadoc links" 2018-10-10 19:07:59 +00:00
Michael Groover
a28ad42768 Merge "Protect Device Identifiers behind priv permission and DO/PO checks" 2018-10-10 18:05:23 +00:00
Philip P. Moltmann
54ff6b0138 Use public method in RestrictedLockUtils#isCurrentUserOrProfile
No need for new system API

Test: Built
Bug: 116798569
Change-Id: Iec6b29f8e47037854b36556a03e1f044dcaa5136
2018-10-09 15:58:50 -07:00
Cody Northrop
70687b7783 Merge "Add ANGLE_ENABLED_APP to CoreSettings" 2018-10-09 21:43:59 +00:00
Michael Groover
6d20d75e9e Protect Device Identifiers behind priv permission and DO/PO checks
Bug: 110099294
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases \
      -t com.android.cts.devicepolicy.DeviceOwnerTest.testDeviceOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases \
      -t com.android.cts.devicepolicy.ManagedProfileTest#testGetDeviceIdentifiers
Test: cts-tradefed run cts -m CtsTelephonyTestCases -t android.telephony.cts.TelephonyManagerTest
Test: cts-tradefed run cts -m CtsPermissionTestCases -t android.permission.cts.TelephonyManagerPermissionTest

Change-Id: I3c82c53ec89cd17b34a61166ccc9e9747388efac
2018-10-09 13:44:02 -07:00
Philip P. Moltmann
0ada0a6044 Change DevicePolicyManager APIs as requested
This requires RestrictedLockUtils to change which then causes further
changes.

I left the old APIs available for non-system-api customers.

Test: RunSettingsLibRoboTests
Bug: 116798569
Change-Id: Id5384ee074bb245e615012b7e0d5298b8bf27ba4
2018-10-09 12:38:23 -07:00
Sudheer Shanka
584b068125 Delete package sandbox data when it is uninstalled.
Bug: 111890351
Test: manual
Change-Id: Ic4347744e849e6d7dbc026ebc2e8656b3f2d2ed0
2018-10-09 11:12:44 -07:00
Luke Huang
8a462ecafd Network-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of network related function works
Change-Id: Id197d20c80b04378731b113ad74676672bd8b67e
2018-10-09 11:29:02 +08:00
Tor Norbye
33ca9122da Fix incorrect javadoc links
Test: make offline-sdk-docs
Bug: b/116163454
Change-Id: I579649fdef931f369f67d5208ee5a8fc92deb1b1
2018-10-08 21:58:58 +02:00
Tor Norbye
f8dc2d204c Fix incorrect javadoc links
Test: make offline-sdk-docs
Bug: b/116163454
Change-Id: I55de1f71d443713b033ee63fd191bd34b3a52fd2
2018-10-08 19:58:17 +00:00
Cody Northrop
deb432823c Add ANGLE_ENABLED_APP to CoreSettings
The way we were checking Settings was invoking a 2ms hit.

Move ANGLE_ENABLED_APP to CoreSettings, which are already
available to the ActivityThread, eliminating the hit.

Test: Verify developer option works as expected
Test: atest google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Bug: 117107368
Bug: 80239516
Change-Id: I3df4c3c43489a338b3631484a8811b38c4eff2e6
2018-10-04 23:05:26 +00:00
Chenjie Yu
e388e27e19 Merge "pull PowerProfile into statsd" 2018-10-03 23:28:10 +00:00
Jeff Sharkey
9bf8ba3c69 Merge "Improve docs for CE/DE usages." 2018-10-03 17:55:10 +00:00
Chenjie Yu
ab53020345 pull PowerProfile into statsd
pull constants from PowerProfile into statsd for power model
calculations. The data is mostly from power_profile.xml

power_profile {
  power_profile_proto {
    cpu_suspend: 5.734
    cpu_idle: 1.389
    cpu_active: 18.76
    wifi_controller_idle: 2.0
    wifi_controller_rx: 107.0
    wifi_controller_tx: 371.0
    wifi_controller_operating_voltage: 3700.0
    bluetooth_controller_idle: 0.01
    bluetooth_controller_rx: 8.0
    bluetooth_controller_tx: 7.0
    bluetooth_controller_operating_voltage: 3300.0
    modem_controller_idle: 105.0
    modem_controller_rx: 175.0
    modem_controller_tx: 176.0
    modem_controller_tx: 216.0
    modem_controller_tx: 300.0
    modem_controller_tx: 427.0
    modem_controller_tx: 604.0
    modem_controller_operating_voltage: 3700.0
    gps_signal_quality_based: 49.0
    gps_signal_quality_based: 11.0
    gps_operating_voltage: 3700.0
    screen_on: 178.708
    screen_full: 240.79
    audio: 75.6
    video: 50.93
    flashlight: 298.498
    camera: 1152.292
    battery_capacity: 3450.0
    cpu_cluster {
      cores: 2
      speed: 307200
      speed: 384000
      speed: 460800
      speed: 537600
      speed: 614400
      speed: 691200
      speed: 768000
      speed: 844800
      speed: 902600
      speed: 979200
      speed: 1056000
      speed: 1132800
      speed: 1209600
      speed: 1286400
      speed: 1363200
      speed: 1440000
      speed: 1516800
      speed: 1593600
      core_power: 11.272
      core_power: 14.842
      core_power: 18.497
      core_power: 22.518
      core_power: 25.967
      core_power: 31.694
      core_power: 37.673
      core_power: 42.859
      core_power: 46.872
      core_power: 57.92
      core_power: 67.561
      core_power: 76.303
      core_power: 87.613
      core_power: 97.045
      core_power: 109.544
      core_power: 122.054
      core_power: 136.345
      core_power: 154.435
    }
    cpu_cluster {
      id: 1
      cores: 2
      speed: 307200
      speed: 384000
      speed: 460800
      speed: 537600
      speed: 614400
      speed: 691200
      speed: 748800
      speed: 825600
      speed: 902400
      speed: 979200
      speed: 1056000
      speed: 1132800
      speed: 1209600
      speed: 1286400
      speed: 1363200
      speed: 1440000
      speed: 1516800
      speed: 1593600
      speed: 1670400
      speed: 1747200
      speed: 1824000
      speed: 1900800
      speed: 1977600
      speed: 2054400
      speed: 2150400
      core_power: 7.055
      core_power: 11.483
      core_power: 14.979
      core_power: 19.642
      core_power: 23.167
      core_power: 27.479
      core_power: 31.632
      core_power: 39.192
      core_power: 47.817
      core_power: 55.659
      core_power: 64.908
      core_power: 73.824
      core_power: 85.299
      core_power: 96.036
      core_power: 109.233
      core_power: 118.56
      core_power: 132.959
      core_power: 143.692
      core_power: 161.378
      core_power: 180.616
      core_power: 193.897
      core_power: 214.361
      core_power: 238.338
      core_power: 265.759
      core_power: 297.918
    }
  }
}

Bug: 113353350
Test: manual test on statsd
Change-Id: I1edd4db255c0440ddbff1d40e1515caaccbc73f8
2018-10-03 10:39:49 -07:00
Jeff Sharkey
3a6a61ef7e Improve docs for CE/DE usages.
Bug: 113343632
Test: none
Change-Id: Ia8bada986fdd69b20a574e2bf1e050f322ae56ec
2018-10-03 10:45:54 -06:00
Makoto Onuki
393253730a Merge "Clear calling identity before calling SysProp callbacks" 2018-10-03 15:50:01 +00:00
Makoto Onuki
f0cc59d695 Clear calling identity before calling SysProp callbacks
Test: boot, run any "setprop" on adb shell
Change-Id: I4aa16b60bfad9dfe3a64fa5a629caf83dce1c8bd
Fixes: 117105159
2018-10-02 16:00:56 -07:00
Salvador Martinez
bbd22043e0 Merge "Add new POWER_SAVER permission & update api" 2018-10-02 16:24:04 +00:00
TreeHugger Robot
e1251df8eb Merge "Device-wide unknown sources block option for DPC." 2018-10-02 13:07:25 +00:00
Irina Dumitrescu
4638edd79f Device-wide unknown sources block option for DPC.
This adds a new framework user restriction that can be used by the DPC
to block installs from unknown sources on all profiles of a device.

Test: Manual test, disallowing installs in TestDPC disables installing
unknown sources apps.
Bug: 111335021
Change-Id: Ib9fb672c5e5dea2ac63bf8cbd1b04484b12b4056
2018-10-01 21:45:00 +01:00
TreeHugger Robot
1ec3af056e Merge "Allow specifying ANGLE in manifest via meta-data" 2018-10-01 15:46:51 +00:00
Anton Hansson
acdc1133d6 Merge "Add per-partition build constants to Build class." 2018-10-01 15:42:55 +00:00
Courtney Goeltzenleuchter
f9151368ce Merge "Pass more ANGLE info from runtime" 2018-10-01 13:16:48 +00:00
Anton Hansson
91b54f17c6 Add per-partition build constants to Build class.
Expose the ro.<x>.build.fingerprint & time.utc constants.

Bug: 112584519
Test: manual test app calling getPartitions().
Test: atest BuildVersionTest
Change-Id: Ibec0012d5893e3eb325f46a04379718a11067fa1
2018-10-01 11:41:33 +01:00
Salvador Martinez
a80bbab54c Add new POWER_SAVER permission & update api
This CL adds a new privileged permission called POWER_SAVER that
will allow whitelisted packages to toggle battery saver on the
device. This can be done via PowerManager, where the API for
setting battery saver has been updated to accept calls from apps
with either DEVICE_POWER or the POWER_SAVER permission.
Additionally, we whitelist Turbo for the permission.

Test: Framework builds, Turbo can toggle EBS
Bug: 115524274
Change-Id: I49d9747b2d42f792a2f3ba90a15aa23c47e489b3
2018-09-28 14:25:25 -07:00
Sudheer Shanka
3bc4ab482b Merge "Bind mount pkg specific dirs in the zygote child namespaces." 2018-09-28 20:34:02 +00:00
Cody Northrop
841c3d9baa Allow specifying ANGLE in manifest via meta-data
This CL allows the application's manifest to specify whether
to use ANGLE or native drivers for GLES via meta-data.

To enable, place the following within <application> and it
will be detected by the platform:

    <meta-data
        android:name:"com.android.angle.GLES_MODE"
        android:value:"angle" />

The manifest can also specify "native" to opt-out of
ANGLE, but native will be the default for Q release.

This method is in service of the tech preview of
ANGLE for Android. For Q release, we should move this
to the Android API.

Test: Manual, verify ANGLE can be selected or rejected
Change-Id: I41af7fe02ca6237db042b5f8bdfbab3c9f76078a
(cherry picked from commit a2e5faf4b23bf0b8b84ffc1d67d545e3dd4f8c63)
2018-09-28 08:24:13 -06:00
Cody Northrop
eb0ca8e593 Pass more ANGLE info from runtime
In order to facilitate ANGLE selection logic in the backend, we need to
start sending more information from GraphicsEnvironment.  This includes
the application name, whether the developer opted in, and the list can
be expanded.  We also have to send the ANGLE namespace unconditionally
in case the application opts in programmatically.

Bug: 80239516
Test: Manual build, booted clean, ensured developer opt-in still works.
Change-Id: I3b8f99942999de6a3188d2e61355dcd244f9191e
(cherry picked from commit 261dfbd814bf62caaee11e6ebe4e2e61e28f4919)
2018-09-28 08:24:12 -06:00