Commit Graph

8421 Commits

Author SHA1 Message Date
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
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
TreeHugger Robot
07d0b93914 Merge "Fix broken window flag" into oc-mr1-dev 2017-09-11 18:31:47 +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
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
9555ed12e6 Merge "Make settings themed apps have light nav DO NOT MERGE" into oc-mr1-dev 2017-09-08 20:20:12 +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
6d6cf285ea Merge "Cat rescue." into oc-mr1-dev 2017-09-08 16:41:38 +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
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
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
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
Tarandeep Singh
4efdd567ea Revert "Make settings themed apps have light nav"
This reverts commit 4548420674.

The above change causes restart due to ClassCastException.

Test: Manually:
      1. Open the Dialer app.
      2. Focus into the edit field to show the IME.
      3. Open the notification shade.
      4. Tap the gear icon to show the system settings.
      5. Make sure the system no longer restarts due to
         ClassCastException.
Bug: 63630024
Fixes: 65413752
Change-Id: I4a17ba2f8d70f99009f091c2aaad5cd5f4e9b31c
2017-09-06 22:31:57 +00:00
Jason Monk
3a31bdede5 Merge "Fix shift in share sheet" into oc-mr1-dev 2017-09-06 17:50:36 +00:00
Jason Monk
4548420674 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-06 09:33:36 -04:00
Rubin Xu
7cf4509c31 Fix resetPasswordWithToken before user unlock
1. Fix system server crash when resetPasswordWithToken is called before use
   unlock, due to DPMS enforces user is unlocked when calculating password
   sufficiency.
2. Propogate new password metric from LockSettingsService to DPMS after a
   password reset with token, and fix a bug where stale quality was used.

Bug: 64923343
Bug: 64928518
Bug: 65286643
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testResetPasswordWithTokenBeforeUnlock
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: runtest frameworks-services -p com.android.server.locksettings
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceAdminHostSideTestApi24#testRunDeviceOwnerPasswordTest
Test: runtest frameworks-core -c android.app.admin.PasswordMetricsTest
Test: runtest frameworks-services -c com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ibb3736547b3b36da4a8a67af711e08a38427aa56
2017-09-05 14:49:00 +01:00
Tarandeep Singh
01b6ff0178 Merge "Add multi-display support to FloatingToolbar." into oc-mr1-dev 2017-08-31 20:45:48 +00:00
Julian Mancini
30175b958e Remove PDF Thumbnail functionality
Bug: 64225798
Test: Removing Functionality
Change-Id: Id02f1b50d161c6f2779c9f65c579383c18028b65
2017-08-31 14:26:10 -06:00
TreeHugger Robot
c1235a1ff2 Merge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults." into oc-mr1-dev 2017-08-31 19:47:42 +00:00
Jason Monk
a38fe85e75 Fix shift in share sheet
Was counting the padding twice, its included in height already.

Test: visual
Change-Id: I012c6db585eb5fac0d5cee87971d94740c520f07
Fixes: 63647502
2017-08-31 15:42:51 -04:00
Tarandeep Singh
c9c83a9ccb Add multi-display support to FloatingToolbar.
DecorView has no support for multi-display (bug 65172902).
Until that is done, the easy fix for displaying cut, copy, paste
on non-default display is to modify FloatingToolbar.
FloatingToolbar uses context of Default display. Changed it
to use context of the window (which makes it multi-display
compatible).

Fixes: 64837794
Test: Manual using AAe's KitchenSink test app
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I513f1aac1c0d22355c996247e3bf56c6d812348f
2017-08-31 17:51:50 +00:00
TreeHugger Robot
f10b0d000e Merge "Fixes NPE thrown in sort if new targets are added." into oc-mr1-dev 2017-08-31 00:34:57 +00:00
TreeHugger Robot
dcadf1934a Merge "Add static lock in PowerProfile" into oc-mr1-dev 2017-08-30 23:35:07 +00:00
Kang Li
0935f152c7 Fixes NPE thrown in sort if new targets are added.
Test: manually tested it to verify that it works as expected.

Bug: 65035399
Change-Id: Ie99b05c5324f47cbac66687d7301ef62a7c83e55
2017-08-30 21:32:08 +00:00
jackqdyulei
0e3504c0fa Add static lock in PowerProfile
Before this cl, there exists nullpointer crash in PowerProfile in
following part:

"sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0"

To my best knowledge, it is because in
PowerUsageSummary.SummaryProvider, we may create batterystats in
meantime:
1. setListening is invoked in worker thread, in which we will force
update the batterystats.
2. In setListening we will register receiver, which may update
batterystats through onReceive in UI thread.

This cl adds static lock in PowerProfile, making the init part can
only be accessed by an thread at a time.

Bug: 64209576
Test: Manual
Change-Id: I00bc094f44416669b4f0e11e647b0fae2ff61013
2017-08-29 15:30:42 -07:00
Ruchi Kandoi
65d76c1213 Do not call setAlwaysButtonEnabled if the activity doesn't support defaults.
13405c5529 introduced a bug where
activities using ResolverActivity without dafaults/always option get selected,
the ResolverActivity tries to set a default causing a crash.

Test: Test Application using TECH_DISCOVERED intent filter
Bug: 38358120
Change-Id: Id36635d84963bcf1dc7e55938e2370542ed291ab
2017-08-29 15:19:21 -07:00
TreeHugger Robot
10477217f5 Merge "Fix ListView can not be moved after rotation." into oc-mr1-dev 2017-08-29 20:09:56 +00:00
TreeHugger Robot
cc4f60fe4b Merge "Add shadow to adaptive icons to the shared sheet Test: manual Bug: 65015602" into oc-mr1-dev 2017-08-29 19:54:26 +00:00
TreeHugger Robot
6a1dad9194 Merge "Fix tooltips for views in a popup window" into oc-mr1-dev 2017-08-29 19:08:30 +00:00
Jiongxuan Gao
3365b16821 Fix ListView can not be moved after rotation.
Symptom:
"Share with" popup displayed incompletely, and cannot be slid after
rotated the screen twice.

Root cause:
Since ChooserActivity's configChanges attribute contains
"screenSize|orientation" , when user rotates device, Android will
not recreate ChooserActivity, its content view ResolverDrawerLayout
is also not recreated. In ResolverDrawerLayout's onMeasure, it will
call getHeightUsed to calculate the ListView's height. getHeightUsed
will check against the lowest child view plus padding and margin
instead of the actual measured height of the ListView. This lets the
ListView hang off the edge when all of the content would fit on-screen
. Because of ResolverDrawerLayout has not been drawn yet, we can not
get the actual showing items' count of ListView before it's drawn, the
result of getChildCount for ListView will return the value in landscape
mode. The heightUsed of ListView might be smaller. mCollapsibleHeight
will be 0. When received a move action, the mCollapseOffset and new
position might both be 0.

Solution:
When configuration changed, we should rebuild the list and refresh
adapter's data set. Just like onRestart does.

Bug: 34365764

Change-Id: I4be0f9afc68588fbb0d8d152c41509650d04c754
2017-08-29 10:26:39 -07:00
Sudheer Shanka
6b1396e8fe KernelUidCpuFreqTimeReader: Put logs under debug flag.
Bug: 63041570
Test: N/A
Change-Id: Ifdeacb227bb936de82af9c9505621b327de3a9d2
2017-08-28 23:06:38 -07:00
Hyunyoung Song
dadb9e1728 Add shadow to adaptive icons to the shared sheet
Test: manual
Bug: 65015602

Change-Id: I01de79edc0a13817680106b1ef46e3212487b62f
2017-08-28 12:22:42 -07:00
Fyodor Kupolov
30c565d399 Merge "Added tron metrics for shutdown time" into oc-mr1-dev 2017-08-28 18:41:52 +00:00
Fyodor Kupolov
291f63bb54 Added tron metrics for shutdown time
The metrics are persisted in /data/system/shutdown-metrics.txt file
property and logged after reboot. MetricsLogger API cannot be directly
used during shutdown since event log is cleared on reboot/power off.

Test: manual reboot/shutdown and verify that metrics are logged
Bug: 64815357
Change-Id: I7fa1af8be58a80a3d5bae26d55c1ed40bf98f4c0
2017-08-25 16:59:08 -07:00
TreeHugger Robot
02f8fa9603 Merge "Fixed that the status icons were showing in the camera" into oc-mr1-dev 2017-08-25 19:13:44 +00:00
Selim Cinek
3a49ba2e40 Fixed that the status icons were showing in the camera
When launching to quicksettings, the camera icons showed
above the camera, clashing with their UI

Test: launch camera (locked) and click on galery
Fixes: 64317909
Change-Id: I4ef68963af11f6d0be739c79cdf352ba35d9ece0
2017-08-25 09:44:14 -07:00
Sudheer Shanka
29091ec55f Merge "Change KernelUidCpuFreqTimeReader Slog.wtf to Slog.e" into oc-mr1-dev 2017-08-23 22:26:08 +00:00
Sudheer Shanka
8cde930d71 Change KernelUidCpuFreqTimeReader Slog.wtf to Slog.e
Bug: 63041570
Test: N/A
Change-Id: I2cb12f1b8f0333c4a000d601624dc95934cf9b90
2017-08-23 11:29:23 -07:00
Selim Cinek
87c3153dcd Transforming all texts of decorated media custom views
Since otherwise they would be illegible with the color
tranformation.

Change-Id: I5c1fa085fc3d6f682012c267d489a95fc7073f32
Fixes: 64810767
Test: manual, add decoratedMediaCustomView
2017-08-23 02:30:14 +00:00
Vladislav Kaznacheev
df6ee1ecbe Fix tooltips for views in a popup window
The current implementation is using the anchor view's getWindowToken to
construct the TooltipPopup instance. This does not work if the anchor
view is in a popup window.

Using getApplicationWindowToken fixes the problem.

Bug: 64595364
Test: android.view.cts.TooltipTest#testTooltipInPopup
Change-Id: I1a887c9ae6ac00f2412891f316367acfc56cef94
2017-08-22 15:34:22 -07:00
Julia Reynolds
4796cf6b43 Merge "Let the foreground service channel be blocked" into oc-dr1-dev
am: 6614a2e5d0

Change-Id: Ic155670df78a6e779174cbd705f07260c8d305b6
2017-08-17 23:13:29 +00:00
Julia Reynolds
c23a2e67ac Let the foreground service channel be blocked
And update the channel name

Change-Id: Ic4b909d31b38b9e1ee05f9b3e4e5c91efc6752b1
Fixes: 36891897
Test: manual
2017-08-17 14:11:45 -04:00