Commit Graph

8619 Commits

Author SHA1 Message Date
Adam Bookatz
b0cfa7649f Merge "Merge "Throttle fetching RPM stats" into oc-mr1-dev am: 8ddb77a3df" into oc-mr1-dev-plus-aosp
am: 1fceacc297

Change-Id: Ib95911358e18867e6e238009f0f4b4b9d01e631e
2017-09-15 07:17:17 +00:00
Adam Bookatz
c69e138213 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev am: e332629667
am: 065f4b7ea7

Change-Id: I27a13ed75f663e1d1478667cf02aa8f754201326
2017-09-15 07:09:27 +00:00
Jiyong Park
b16d32bc78 Merge "vendor apk is unbundled" into oc-mr1-dev am: a26750e757
am: 6cc659cd9e

Change-Id: If89b2e232e78b78e2b33dd2d529e2718903b8c22
2017-09-15 00:13:49 +00:00
Andreas Gampe
14e3e529f8 Merge "resolve merge conflicts of eb8a4ef5d3 to oc-mr1-dev-plus-aosp" into oc-mr1-dev-plus-aosp
am: b840785100

Change-Id: I5547c135edda0ba51869c7131d83dd221aa7d740
2017-09-14 22:46:53 +00:00
Svet Ganov
087dce20e3 Add new OEM permission flavor
The new OEM permission flavor of signature protected perissions
can be granted only to apps on the OEM partition if they are:

 1. Signed as the one declaring the permission

 2. The requesting app is on OEM partition of the system image and
    declares the permission used and the OEM explicitly granted this
    permission by adding an entry in /oem/permission/*.xml
    with the following format:

    <permissions>
        <oem-permissions package="foo.bar.baz">
            <permission name="android.permission.ACCESS_FOO" granted="true"/>
        </oem-permissions>
    </permissions>

All OEM permissions requested by any app on the OEM partition
must be declared granted or not to force the OEM making a well
though out explicit choice. If that condidtion is not met the
system server restarts - this prevents shipping a device with
OEM permissions for which no opition was explicitly expressed.

Normal apps requesting an OEM permission has no effect, i.e the
permission is only granted on a signature match.

Change-Id: I345bb0b56368ee03e4bd768faab540ee4e0571ae
Bug: 65497745
Test: Manual
2017-09-14 11:48:45 -07:00
Adam Bookatz
024a096e22 Merge "Throttle fetching RPM stats" into oc-mr1-dev
am: 8ddb77a3df

Change-Id: I97868b6f4327125f201384e0d6dc1a597ddfa6d9
2017-09-14 18:39:35 +00:00
Adam Bookatz
065f4b7ea7 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev
am: e332629667

Change-Id: Ib522e060c7a77b0e0ae0ecf3c9d84c331890d3e9
2017-09-14 18:33:47 +00:00
Adam Bookatz
8ddb77a3df Merge "Throttle fetching RPM stats" into oc-mr1-dev 2017-09-14 18:23:36 +00:00
Adam Bookatz
e332629667 Merge changes I54d54f24,I0c384eb3 into oc-mr1-dev
* changes:
  Disable screen-off RPM timing in BatteryStats
  Added resource power manager stats to batterystats
2017-09-14 18:22:34 +00:00
Jiyong Park
6cc659cd9e Merge "vendor apk is unbundled" into oc-mr1-dev
am: a26750e757

Change-Id: I218a52a0fff924ca139c96c35df5b3ad0c917216
2017-09-14 14:51:57 +00:00
Andreas Gampe
8f4eab2fcc resolve merge conflicts of eb8a4ef5d3 to oc-mr1-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia29e31d704982985264b40a78578a4c93d11bf3a
2017-09-13 19:20:34 -07:00
TreeHugger Robot
a26750e757 Merge "vendor apk is unbundled" into oc-mr1-dev 2017-09-14 01:35:42 +00:00
Bookatz
82b34117ee Disable screen-off RPM timing in BatteryStats
RPM = resource power manager.
Fetching the rpm stats (specifically, the subsystem low power stats) is
slow... too slow to reasonably do each time the screen state changes.
Therefore, it is disabled until fetching this information can be done
more quickly. Consequently, the screen-off RPM values will be incorrect
until it is re-enabled; they are therefore not printed.

Bug: 65164435
Bug: 62549421
Test: manual
Change-Id: I54d54f244c69ee372f22ecd99f32570db4aeb222
2017-09-13 22:24:25 +00:00
Bookatz
0b8a050853 Throttle fetching RPM stats
RPM stats are expensive to fetch. However, updateRpmStatsLocked can
get called over and over again. E.g. if
BatteryStatsService.getStatistics is called multiple times in quick
succession, the RPM stats would be fetched repeatedly. Because it is
expensive, if therefore makes sense to throttle it to ensure that the
fetching is not done too frequently.

The data last fetched is cached. When asked to update, it will only
actually do so if it is sufficiently old.

Bug: 62549421
Bug: 65629008
Test: manual
Change-Id: I6b7530d203deb9ad5bfb3415336a0de6a55bd89b
2017-09-13 14:31:14 -07:00
Bookatz
50df711a51 Added resource power manager stats to batterystats
Currently Resource Power Management (e.g. VMIN time) is reported in the
batterystats history each time the battery level changes. We need this
information in the batterystats checkin, and need to be able to
differentiate time spent in each power state/voter, total as well as
when the screen is off.
The RPM information is obtained via a JNI call to the appropriate HALs.

Batterystats report version is increased to 26.

Bug: 62549421
Test: manual
Change-Id: I0c384eb3950714d8a0aa1353a4bf965330ebc8c1
2017-09-13 10:54:54 -07:00
Nicolas Geoffray
8dbb5e51c8 resolve merge conflicts of e017dae587 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7008986501028ec9bee0505d41aae3ff27872b50
2017-09-13 11:08:36 +01:00
Nicolas Geoffray
81edac4037 Rename debugFlags to runtimeFlags.
Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.

bug: 30972906
bug: 63920015

Test: builds

Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a
2017-09-12 15:54:23 +01:00
Chad Brubaker
e7454950f6 Merge "Expand and expose Lockdown global action" 2017-09-11 22:04:07 +00:00
Jason Monk
77c8295721 Merge "Fix broken window flag" into oc-mr1-dev am: 07d0b93914
am: e9c5d8aad6

Change-Id: Ifb11ae36366fee42a2eed731584351c93d438d7c
2017-09-11 19:28:04 +00:00
Jason Monk
e9c5d8aad6 Merge "Fix broken window flag" into oc-mr1-dev
am: 07d0b93914

Change-Id: I4d9079422e05b117b3d25ac1a0d9fa884eadee23
2017-09-11 19:03:07 +00:00
TreeHugger Robot
07d0b93914 Merge "Fix broken window flag" into oc-mr1-dev 2017-09-11 18:31:47 +00:00
Dianne Hackborn
3949afe787 Merge "Work around issue #65333586: Took phone out of pocket..." into oc-mr1-dev am: f04b643ca8
am: 9b64717baa

Change-Id: If72b69832ce407b85a826fb6d00ffd93b17116a1
2017-09-11 18:00:28 +00:00
Jason Monk
d7acd16921 Fix broken window flag
It got lost in reverts and un-reverts.

Test: open settings
Change-Id: I243209a8d2b63ef57829abfdd3f14c00dfdf25ea
Fixes: 65495538
2017-09-11 08:54:12 -07:00
Dianne Hackborn
9b64717baa Merge "Work around issue #65333586: Took phone out of pocket..." into oc-mr1-dev
am: f04b643ca8

Change-Id: Ib788a6ced4e7463f2696ac31362274f88192793d
2017-09-11 14:50:53 +00:00
TreeHugger Robot
f04b643ca8 Merge "Work around issue #65333586: Took phone out of pocket..." into oc-mr1-dev 2017-09-11 14:40:02 +00:00
Dianne Hackborn
0a65077e9b Work around issue #65333586: Took phone out of pocket...
...and screen was flickering badly

Don't crash if we get a bad pointer ID, just log a wtf
for us to find in APR.

Bug: 65333586
Test: manual

Change-Id: I6f522e05735a64b672c011012c3e3514d454dd8f
2017-09-08 17:56:20 -07:00
TreeHugger Robot
709f160e4c Merge "Make settings themed apps have light nav" 2017-09-08 23:31:57 +00:00
Jeff Sharkey
ee6523014e Merge "Move "volume" commands over to Binder." 2017-09-08 21:55:51 +00:00
Jason Monk
ea506c67ec Make settings themed apps have light nav
This is needed to help with differential aging.

The nav needs to be white with a 1dp divider on it, so add support
for the divider and add hidden attribute to set the nav buttons
inverted.

Test: Open settings
Bug: 63630024
Change-Id: Iec6046baeb86fb554df73346df8652fee8b2736a
2017-09-08 21:29:40 +00:00
Jason Monk
d6af052a35 Merge "Make settings themed apps have light nav DO NOT MERGE" into oc-mr1-dev
am: 9555ed12e6

Change-Id: I7658ab52ff09923b991da2f9aaac239ceb9e805d
2017-09-08 20:35:52 +00:00
TreeHugger Robot
9555ed12e6 Merge "Make settings themed apps have light nav DO NOT MERGE" into oc-mr1-dev 2017-09-08 20:20:12 +00:00
Daniel Sandler
560a6b8bff Merge "Cat rescue." into oc-mr1-dev am: 6d6cf285ea
am: 9cb9e4526d

Change-Id: I7da6305aec8b81668e19dd1a89747aa3d51ba744
2017-09-08 17:12:36 +00:00
Jason Monk
a750e99c0f Make settings themed apps have light nav DO NOT MERGE
This is needed to help with differential aging.

The nav needs to be white with a 1dp divider on it, so add support
for the divider and add hidden attribute to set the nav buttons
inverted.

Change-Id: I4a5329f7486a6774ca4de8362caebbe8ba421aad
Test: Open settings
Bug: 63630024
2017-09-08 13:09:55 -04:00
Daniel Sandler
9cb9e4526d Merge "Cat rescue." into oc-mr1-dev
am: 6d6cf285ea

Change-Id: I316ee0123d12cef760177cb0853cb446cd3e91d6
2017-09-08 16:54:42 +00:00
Daniel Sandler
6d6cf285ea Merge "Cat rescue." into oc-mr1-dev 2017-09-08 16:41:38 +00:00
Matthew Ng
8fe8b86d55 Merge "Always enable nav and status bar opaque/translucency" into oc-mr1-dev am: 8823588e36
am: 204b740fb1

Change-Id: Ifb744f93e5c29ac613b3391af31e571813302f21
2017-09-08 03:09:58 +00:00
Matthew Ng
204b740fb1 Merge "Always enable nav and status bar opaque/translucency" into oc-mr1-dev
am: 8823588e36

Change-Id: I3e9656a16b3e82ce64ca91e64f214e08f12aec00
2017-09-08 02:55:15 +00:00
TreeHugger Robot
8823588e36 Merge "Always enable nav and status bar opaque/translucency" into oc-mr1-dev 2017-09-08 02:38:59 +00:00
Selim Cinek
ecfd5a064a Merge "Changed the accessibility experience for notifications" into oc-mr1-dev am: b41e47f55d
am: e5b610ec35

Change-Id: I7dfba344aa82b1141e934f121c527068fcb8b5a2
2017-09-08 02:21:32 +00:00
Selim Cinek
e5b610ec35 Merge "Changed the accessibility experience for notifications" into oc-mr1-dev
am: b41e47f55d

Change-Id: I09e3d6d35ebc266bfda75705ce2c0d968c529496
2017-09-08 02:09:02 +00:00
Selim Cinek
b41e47f55d Merge "Changed the accessibility experience for notifications" into oc-mr1-dev 2017-09-08 01:56:49 +00:00
Matthew Ng
e6b393b1a9 Always enable nav and status bar opaque/translucency
Removed the logic to enable or disable translucency and have it fully
enable all the time. Having it on has very or no impact on RAM.

Test: boot device and look at nav and status bar
Change-Id: Id9e613abc689ab8c1b53424aa92e864f75f8ed02
Fixes: 65286386
2017-09-07 23:42:16 +00:00
Jiyong Park
fcad69682a vendor apk is unbundled
Vendor apks has been regarded as bundled apps and thus provided with all
internal libraries under /system/lib and /vendor/lib. However, in new
devices where Treble is fully enabled, system and vendor partitions are
no longer bundled together; system partition can be updated
independently from the vendor partition.

In that case, the apks in vendor partition are considered as unbundled
so that access to /system/lib is limited.

In addition, when the linker namespace is created for apks, information
on whether the apk is in vendor partition or not is given to the
libnativeloader library. The information is used to conditionally
configure the linker namespace for vendors. For examle, vendor apks are
allowed to access /vendor/lib even though they are considered as
unbundled; because vendor apks and vendor libs are still bundled
together in the same vendor partition.

Bug: 63553457
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: Iadd34af2878c507d4d6ec50153abef4e65604ac9
2017-09-08 08:32:41 +09:00
Chad Brubaker
4f28f0de37 Expand and expose Lockdown global action
This action puts the phone into the state where it can only be unlocked
via the user's primary knowledge factor. In the future this can also
evict keys and otherwise secure the device beyond the norm in a sketchy
situation.

This is currently controlled Settings.Secure.LOCKDOWN_IN_POWER_MENU, it
can be enabled for testing via
`adb shell settings put secure lockdown_in_power_menu 1`

Bug: 37221346
Test: Manual
Change-Id: I6197fadf655e5298cab1ab95153c316b87f3b718
2017-09-07 16:14:46 -07:00
Selim Cinek
ecd0e1b2b1 Changed the accessibility experience for notifications
The expand button is now not labeling the notification
anymore since it was too wordy.

Change-Id: I14374b1a97389b8441fdf44eb4993954e765e89f
Fixes: 65123834
Test: use talkback and navigate to expand button, verify not speaking notification anymore
2017-09-07 15:45:27 -07:00
Jeff Sharkey
ace874b15b Move "volume" commands over to Binder.
Keep the old socket-based commands intact for awhile so we can
rapidly disable this change using the ENABLE_BINDER feature flag.

Define constants in AIDL to keep Java and C++ in sync.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.ExternalStorageHostTest
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 13758960
Change-Id: Ie0d917c921b0b826e6bdf55a5d678b247ef352a6
2017-09-07 15:33:17 -06:00
Tarandeep Singh
66f4e1c3b5 resolve merge conflicts of 9a0d4240dd to master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I0c20323087f1a2d8eb1ead6cfc60a69e42d2d51b
2017-09-07 11:28:01 -07:00
Tarandeep Singh
9a0d4240dd Merge "Revert "Make settings themed apps have light nav"" into oc-mr1-dev
am: 0fbca56f1b

Change-Id: Idfd4900e068242b42c4cfc249697bd88aec7e057
2017-09-07 16:23:12 +00:00
Tarandeep Singh
0fbca56f1b Merge "Revert "Make settings themed apps have light nav"" into oc-mr1-dev 2017-09-07 00:59:05 +00:00
Dan Sandler
7bcd6aa4f7 Cat rescue.
Change-Id: Ibeea21e14f52b018e9c130df17560c4d39f23ed3
Bug: 64305456
Fixes: 37926266
Fixes: 38349532
Test: adb shell am start -n com.android.egg/.neko.NekoActivationActivity ; \
      adb shell am start -n com.android.egg/.neko.NekoLockedActivity ; \
      echo "pick a dessert then press enter" ; read foo ; \
      adb shell cmd jobscheduler run -f com.android.egg 42 ; \
      adb shell am start -n com.android.egg/.neko.NekoLand ; \
      echo "longpress your new cat and touch the share icon"
2017-09-07 00:23:04 +00:00