Commit Graph

9534 Commits

Author SHA1 Message Date
Abodunrinwa Toki
8e7f8ad3ce Merge "FloatingActionMode.setOutsideTouchable" into pi-dev 2018-04-27 19:46:10 +00:00
Chia-I Wu
06c0c3a933 Merge "Add COLOR_MODE_AUTOMATIC" into pi-dev 2018-04-27 15:47:41 +00:00
Sudheer Shanka
a750da1960 Merge "Schedule external stats sync on battery level change with a delay" into pi-dev 2018-04-27 03:20:38 +00:00
Sudheer Shanka
0719c6af44 Schedule external stats sync on battery level change with a delay
and fix locking in scheduleCpuStatsSyncDueToWakelockChange().

Bug: 74146897
Test: atest cts/hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2891dfb8a0aedf429232f45e26deab93c738506e
2018-04-26 15:43:40 -07:00
TreeHugger Robot
abab4cbd25 Merge "Fix floating toolbar menu item spacing." into pi-dev 2018-04-25 20:13:37 +00:00
Chia-I Wu
1e0e7176bd Add COLOR_MODE_AUTOMATIC
COLOR_MODE_SATURATED disables color management and thus treat any
color space as panel color space.  COLOR_MODE_AUTOMATIC is similar
to COLOR_MODE_SATURATED in that it stretches color spaces to panel
color space, but the stretching is color space aware.

persist.sys.sf.native_mode is extended to be a integer, where

 0: use DisplayColorSetting::MANAGED
 1: use DisplayColorSetting::UNMANAGED
 2: use DisplayColorSetting::ENHANCED

Bug: 73824924
Test: manual
Change-Id: Ia356958d8e1fbae90f244ded7111de2e45aa4b3c
2018-04-25 11:35:36 -07:00
Makoto Onuki
778ce66697 DO NOT MERGE Make "Want to start battery saver?" dialog better.
- Don't line-break in "Battery" (only in English)
- Add "Learn more" link.

Bug: 78261259

Test: Manual test with:
- adb shell dumpsys battery unplug
- adb shell settings delete secure low_power_warning_acknowledged
- Enable battery saver
- Make sure the link is clickable if a link is set.
- Make sure there's no "learn more" link if the link is not set in strings.xml

Change-Id: I83364f628dd596a4d50bf2aca4db7cbfe7cf4909
2018-04-25 15:27:47 +00:00
Abodunrinwa Toki
49ec54250f Fix floating toolbar menu item spacing.
We mistakenly changed floating_toolbar_menu_button_side_padding in
I309c729eb842d9388066bfb43eb18f33dbfe10b8 where in fact what we
wanted to do was to just change the mIconTextSpacing.
This cl fixes that.

Change-Id: I1b940eb12d2948f8c167c3f37ed0eba105b9f5ce
Fixes: 74032743
Test: built, observed visual look
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
2018-04-25 15:46:54 +01:00
Abodunrinwa Toki
29cb76849c FloatingActionMode.setOutsideTouchable
Make floating toolbar outside-touchable for link action mode in
non-selectable TextView.
This allows the user to be able to dismiss the toolbar by tapping
outside of the toolbar.

Bug: 78099871
Bug: 73156794
Bug: 78298142
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsViewTestCases:android.view.cts.ActionModeTest
Change-Id: I8e3b460d0b1baee48d4f9cb3f92e73926eeee231
2018-04-24 14:54:33 +01:00
TreeHugger Robot
66b6d1c3bc Merge "Make password history hashing more secure" into pi-dev 2018-04-24 13:06:57 +00:00
Selim Cinek
53790c1c8f Merge changes from topic "notification_reply_action" into pi-dev
* changes:
  Cleaned up the paddings of the messaging layout and smart replies
  Changed the size of the largeIcon
  Moved the disabling from alpha to manual color blending
  Updated the color of the reply button to be more neutral
  Updated the reply icon
  Disabled reply action when pending intents are cancelled
  Split the reply icon permanently from the right icon
2018-04-24 09:10:38 +00:00
TreeHugger Robot
5f18904a00 Merge "Add spinner for smart replies." into pi-dev 2018-04-24 08:51:56 +00:00
Selim Cinek
1c72fa0249 Cleaned up the paddings of the messaging layout and smart replies
Refactored the code such that the reply icon's inset was substracted
from the overall paddings to make all of them consistent. This
will also help in the future as we don't have to update those
paddings manually anymore.

Test: test all sorts of combinations with Notify
Change-Id: I8c6c9951bc73c88d95cb443c8e618c7adca7ebd3
Fixes: 78441535
2018-04-24 14:33:29 +08:00
TreeHugger Robot
46c2b1451c Merge "Reset binder call stats along with batterystats" into pi-dev 2018-04-23 23:05:31 +00:00
Sudheer Shanka
6bc6e21be7 Merge "Rate limit battery external stats collection in takeUidSnapshot(s)." into pi-dev 2018-04-23 21:34:57 +00:00
Fyodor Kupolov
8aa51245e9 Reset binder call stats along with batterystats
Test: dumpsys batterystats --reset && dumpsys binder_calls_stats
Bug: 75318418
Change-Id: Ibdbd95468bba876b1f91357b86f7a8d45af2daed
2018-04-23 14:21:20 -07:00
Sudheer Shanka
e56013aa31 Rate limit battery external stats collection in takeUidSnapshot(s).
Bug: 74146897
Test: atest cts/tests/tests/os/src/android/os/health/cts/SystemHealthManagerTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2e01146718c3ce65d230308097622b958cb2897a
2018-04-23 11:38:36 -07:00
Kenny Guy
a0f6de8ab2 Add spinner for smart replies.
Add a spinner to MessagingGroup that is enabled
when the user has clicked on a smart reply.

Bug: 73607490
Test: atest SystemUiTests

Change-Id: I4d892c19b5df2b443761819929a83f016967e217
2018-04-23 18:58:19 +01:00
TreeHugger Robot
981d61ddf8 Merge "Enabled aggregated per-uid stats collection by default" into pi-dev 2018-04-23 17:49:06 +00:00
Selim Cinek
384804b42d Split the reply icon permanently from the right icon
Previously these would overlap, but they are now completely
separate.

Test: ensure that all notification styles still work with the new affordance.
Change-Id: I16f5f863b4afac27494a4a7615631bca240ca532
Fixes: 72750728
2018-04-23 16:19:21 +08:00
Rubin Xu
f01e90789e Make password history hashing more secure
Instead of hashing the password directly which makes it possible to bruteforce
the password offline, hash the password together with the synthetic password.
This means without knowledge of the synthetic password, the hash itself is
useless.

As a consequence of this change, saving and checking historical password would
now also require the current device password to be provided. Checking password
history also takes more time due to the need to unwrap synthetic password, at
around 100-200ms.

Bug: 32826058
Test: manual
Change-Id: Icb65171b8c8b703d8f0aa3a8cb2bf7ad96c1332d
2018-04-21 09:46:23 +01:00
Fyodor Kupolov
3f3af617ae Enabled aggregated per-uid stats collection by default
Enabled collection of number of calls per-uid. It has relatively small
overhead. Memory impact is minimal and cpu overhead is also small -
250 ns vs 1500 ns with detailed tracking

Detailed tracking is disabled by default. Controlled by
persist.sys.binder_calls_detailed_tracking

Added commands to reset and enable/disable detailed stats:
dumpsys binder_calls_stats --reset
dumpsys binder_calls_stats --enable-detailed-tracking
dumpsys binder_calls_stats --disable-detailed-tracking

Test: manual
Bug: 75318418
Change-Id: I7c1280c025001b6d2b46e4a37bad841712b6da2f
2018-04-20 16:12:41 -07:00
TreeHugger Robot
cbfe423122 Merge "No divider between floating toolbar item groups" into pi-dev 2018-04-20 16:53:31 +00:00
Mihai Popa
66d41f87ea No divider between floating toolbar item groups
The CL removes the vertical divider that used to exist between adjacent
menu item groups in the floating toolbar, as well as the extra padding
between these, in order to adapt to the new UX requirements. The CL also
centers the text view inside a button, when there is no icon shown at
the left of the text view. This is only relevant when the minimum size
of the button is larger than the text measured width, and we want the
text to be centered inside the button in this case.

Bug: 74032743
Test: manual testing
Change-Id: I309c729eb842d9388066bfb43eb18f33dbfe10b8
2018-04-20 11:05:47 +00:00
Makoto Onuki
dbdf5df96e Merge "Split provider / service dumpsys into platform and non-platform" into pi-dev 2018-04-19 17:21:48 +00:00
Dieter Hsu
afc909d3ba Merge "Add rank & count event to notification clicks and dismisses" into pi-dev 2018-04-18 13:05:43 +00:00
Dieter Hsu
d39f0d52dc Add rank & count event to notification clicks and dismisses
For click/action click/dismiss, passing rank(0-based) and
count at the time of the actions to events.

Bug: 70724602
Test: runtest systemui-notification
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/notification
Change-Id: I07c440f84ccb745f744eb4e317881b72d2b41683
2018-04-18 03:28:48 +00:00
Makoto Onuki
0b575a3cdf Split provider / service dumpsys into platform and non-platform
Also extend the timeout to 60 seconds.
- Because each provider / service dump may time out, the total time should relatively be large.

Bug: 78017892
Fix: 78017892

Test: Manual test with the following dumpsys commands:
dumpsys activity provider all
dumpsys activity provider all-platform
dumpsys activity provider all-non-platform
dumpsys activity provider com.android.providers.contacts/com.android.providers.contacts.VoicemailContentProvider
dumpsys activity provider com.android.providers.contacts/.VoicemailContentProvider
dumpsys activity provider contacts
dumpsys activity provider voicemail
dumpsys activity provider 4d45a78

dumpsys activity service all
dumpsys activity service all-platform
dumpsys activity service all-non-platform
dumpsys activity service bluetooth

Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/DumpTest.java
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/ParseUtilsTest.java

Test: Manual test with "adb bugreport" with adding sleep(10s) to ProviderMap.dumpProvider()

Change-Id: I00bce0090b8dbb947d7f8b1e5d01bb8a70d84bd8
2018-04-17 10:41:40 -07:00
Julia Reynolds
aa96cf3460 Exclude system notifications from visual suppression
But silence them by saying them cannot bypass DND.

Test: atest SystemUITests
Bug: 77656914
Change-Id: I044696cfdcef0e4a14be21173949612480722236
2018-04-17 15:27:35 +00:00
TreeHugger Robot
5291268754 Merge "Remove implementation of deprecated RecoveryController methods." into pi-dev 2018-04-16 22:14:22 +00:00
Jeff Sharkey
d9311198e1 Revert "Revert "OP_GET_USAGE_STATS should be noted, not checked.""
This reverts commit bd2a9a2915.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I596d330d64942105f447bb613012bb11e281a805
Exempt-From-Owner-Approval: keep tests passing
2018-04-16 16:50:34 +00:00
Jeff Sharkey
bd2a9a2915 Revert "OP_GET_USAGE_STATS should be noted, not checked."
This reverts commit 5a8bcd9031.

Reason for revert: ijpedowitz@

Bug: 77662908
Change-Id: I5dd0ad5038df90ea8a80ba6f583ee46fb24600c2
Exempt-From-Owner-Approval: keep tests passing
2018-04-16 16:39:55 +00:00
Dmitry Dementyev
745d2c98f9 Remove implementation of deprecated RecoveryController methods.
Bug: 78021839
Test: manual
Change-Id: I8a8a23f1cc14e7b9ffe1e758b6f35906d1a5cf2f
2018-04-14 13:37:07 -07:00
Jeff Sharkey
5a8bcd9031 OP_GET_USAGE_STATS should be noted, not checked.
Per email feedback, we should be using "noteOp" instead of "checkOp"
when testing if caller holds OP_GET_USAGE_STATS, so that we record
that caller used the operation.

Bug: 77662908
Test: builds, boots
Exempt-From-Owner-Approval: keep tests passing
Change-Id: I3a60345d590534fdbc2c1248e0d30dc85a5d6772
2018-04-13 19:32:25 +00:00
TreeHugger Robot
beefded4c7 Merge "Fix measurement of list with single item" into pi-dev 2018-04-13 02:09:27 +00:00
Lucas Dupin
fc7036cb21 Fix measurement of list with single item
Change-Id: I2474410b7374155bbbe5de0c757e9017f52746e5
Fixes: 72656378
Test: visual
2018-04-12 17:45:29 -07:00
TreeHugger Robot
e0a25acf08 Merge "Changed the appearance of phone call notifications" into pi-dev 2018-04-12 21:01:16 +00:00
Selim Cinek
396cacaaa8 Changed the appearance of phone call notifications
The old design didn't work at all because of various
paddings. The new design adds more paddings and a
new button style

Fixes: 72814598
Test: runtest systemui
Change-Id: I4b4ac0790afe45db97f912740446c6da09620be3
2018-04-12 11:09:23 -07:00
TreeHugger Robot
a26e755900 Merge "Add stats logging to ServiceManager and NPMS" into pi-dev 2018-04-12 01:13:07 +00:00
TreeHugger Robot
3e5b5076a2 Merge "Updating strings for activity interceptor dialog" into pi-dev 2018-04-11 23:39:46 +00:00
Makoto Onuki
49392d335a Add stats logging to ServiceManager and NPMS
ServiceManager:
- Do an event log every N getService() calls with total time spent
in getService().
where N = 100 for core UIDs and 200 for other apps.

- Do an event log if getService() takes longer than N ms.
where N = 10 for core UIDs and 50 for other apps.

... with some extra throttling.

NPMS:
- Do the basic "stats logger" log for updateNetworkEnabledNL() and
isUidNetworkingBlocked()

This CL also enhances StatsLogegr so it now can show the slowest call
and the max # of calls per-second.

Bug: 77853238
Test: Manual test:
- Insert a SIM card
- Set data limit
- toggle airplane mode
- toggle wifi
- toggle mobile data

Then
- "dumpsys netpolicy" and "dumpsys activity processes" and check the stats
- also check "adb logcat -b all | grep ' service_manager'"

Change-Id: I5789541063f95d0eac501189816c8604a4571ba0
2018-04-11 16:37:57 -07:00
Mihai Popa
6afcf2fb4d Merge "Fix ripple effect for floating toolbar menu items" into pi-dev 2018-04-11 22:14:51 +00:00
Mathew Inwood
fb55bd8706 Merge "Configurable sampling rate for hidden API access log events." into pi-dev 2018-04-11 16:45:19 +00:00
Kenny Guy
23991105bd Add logging for smart replies in notifications.
Log the first time a notification with smart
replies is visible.
Log each click on a smart reply.

Test: atest SystemUITests
Bug: 72153458
Change-Id: I6dc498871000dbb9af978567db3d258b20978781
2018-04-11 10:09:03 +01:00
Suprabh Shukla
c401f155f0 Updating strings for activity interceptor dialog
Updated to more descriptive title and button text.
The default message dialog will also show the suspending app name.

Test: atest \
com.android.server.pm.SuspendPackagesTest#testInterceptorActivity

Bug: 75332201
Change-Id: Ica77fb04874a8e32fe0d82ac27a9babd3b186f8d
2018-04-10 21:54:02 -07:00
Mathew Inwood
04194fef78 Configurable sampling rate for hidden API access log events.
To reduce log spam, we do not log all hidden API accesses. This CL allows
configuration of the sampling rate of the log events so it can be tweaked
later if necessary.

Test: m
Test: $ adb shell settings put global hidden_api_access_log_sampling_rate 65536
Bug: 64382372
Bug: 77517571
Change-Id: I659c22bd504564da58d972f94b774a9af4039386
2018-04-10 16:57:07 +01:00
Mihai Popa
17f91d5413 Fix ripple effect for floating toolbar menu items
A corner radius was set for the floating toolbar in
Ifcf4cff1f38fd18b7dbb4c1802390e3beb92cd3c. This produced a bug, where
the ripple effect set on the floating toolbar menu items was expanding
outside the corners when these were pressed.

This CL sets the menu items container to clip to outline, such that the
ripple effect of the menu items will be clipped.

Bug: 77547543
Test: manual testing
Change-Id: Ib43a6c719aab1403273f47e559433c9856b4f8b4
2018-04-10 16:10:16 +01:00
Mike Ma
a15aa6e2fd Merge "Fix ambient display time unit error" into pi-dev 2018-04-06 19:32:20 +00:00
TreeHugger Robot
bcccb1aff5 Merge "Switch to Saturated color mode when Accessibility transforms are active" into pi-dev 2018-04-06 17:12:01 +00:00
Mike Ma
e074da1804 Fix ambient display time unit error
Treated return value from mStats.getScreenDozeTime as ms, but indeed it
is us.
Fixes: 77655868
Test: manual

Change-Id: Ic9838a2fca3f49a6f5a669bd1970dcc7560fb5e2
2018-04-05 17:29:42 -07:00