Commit Graph

15064 Commits

Author SHA1 Message Date
Jeff DeCew
ddc2dcce49 Merge changes I6fd9aeec,I296e9d53
* changes:
  Minimize use of header in adjusting notification colors.
  Remove setExpanded from the NotificationHeaderView
2020-10-21 19:12:53 +00:00
TreeHugger Robot
c76708bc68 Merge "Moving alarm service dump to IndentingPrintWriter" 2020-10-21 15:53:43 +00:00
Jeff Sharkey
1992cdb4de Merge changes from topic "oct16c"
* changes:
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStringsChecker.
  Apply fixes for EfficientCollections.
  Trivial refactor for consistent naming.
  Expand formatSimple() to support widths.
  Refinement of EfficientStringsChecker.
2020-10-21 15:27:15 +00:00
Jeff DeCew
858ad2ac33 Minimize use of header in adjusting notification colors.
Also adds support for 'inverted' icons.

Test: atest SystemUITests
Test: manual testing of numerous notification configurations
Change-Id: I6fd9aeec9f5971495d514add2bbb30b50db7d3c1
2020-10-21 10:32:19 -04:00
Jeff DeCew
73e65d4291 Remove setExpanded from the NotificationHeaderView
Test: atest SystemUITests
Change-Id: I296e9d530d2c0ba581828dee0dc2026df0e38c3c
2020-10-21 09:57:07 -04:00
Jeff Sharkey
f18719bb73 Apply fixes for EfficientStrings.
Refactoring to avoid paying the cost of extra StringBuilder that are
quickly disposed.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Icd914a63cdadf8123c1e5a5073f85245f0791f0b
2020-10-20 22:00:18 -06:00
Jeff Sharkey
1c08f48253 Apply fixes for EfficientStringsChecker.
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.

Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
2020-10-20 22:00:16 -06:00
Jeff Sharkey
df8dc2b4a5 Apply fixes for EfficientCollections.
Drop-in replacements suggested for inefficient collections.  Also
annotate a handful of places where we're unable to update.

Bug: 155703208
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I48b600508df8160ac9b40fea7afca974b2c972f6
2020-10-20 21:57:00 -06:00
Suprabh Shukla
2511a5420f Moving alarm service dump to IndentingPrintWriter
IndentingPrintWriter provides more consistent formatting and syntax.
Removing any unused legacy methods.

Test: Build, flash and manually inspect the output of:
adb shell dumpsys alarm

Fixes: 171340137
Change-Id: I8adb9280ed3c8c835562c2c158e0bfb668f8b1cb
2020-10-20 20:11:56 -07:00
TreeHugger Robot
fac9815386 Merge changes from topic "window_context"
* changes:
  Use WindowContext in GlobalScreenshot
  scrollCapture: Avoid crash if host window doesn't exist
  Refactor names of internal scrollcapture interfaces
2020-10-20 20:42:08 +00:00
TreeHugger Robot
44fcf11175 Merge "Call DecorView.drawableChanged() in PhoneWindow.setBackgroungDrawable" into rvc-qpr-dev am: 7ce178e6cb am: bf26b5a9f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12685846

Change-Id: I6305948aea70c8283c2670caad61a1a6699b174c
2020-10-20 18:06:29 +00:00
TreeHugger Robot
bf26b5a9f4 Merge "Call DecorView.drawableChanged() in PhoneWindow.setBackgroungDrawable" into rvc-qpr-dev am: 7ce178e6cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12685846

Change-Id: I438591f2faa40c9ab80a8d774b48de7e7a1f9e1b
2020-10-20 17:44:47 +00:00
TreeHugger Robot
7ce178e6cb Merge "Call DecorView.drawableChanged() in PhoneWindow.setBackgroungDrawable" into rvc-qpr-dev 2020-10-20 17:24:35 +00:00
TreeHugger Robot
28a1dccf2e Merge "Increase BatteryStats delay" 2020-10-20 03:59:30 +00:00
Philip Cuadra
f8178cc6a2 Increase BatteryStats delay
Decrease the frequency with which BatteryStats collection is done
due to wakelocks in order to decrease the total CPU time used by
BatteryStats collection.

Bug 168254386
Test: local build + boot

Change-Id: I508bbc10b1f3891252f0618b457b1fc0e653c868
2020-10-19 14:01:21 -07:00
Treehugger Robot
1673d15519 Merge changes I1d3e5e66,I86b869af,Iab4d3902,I645ee722 am: 72864d2930 am: 968582e45f am: cb2ebfc692 am: c59b81c978
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461087

Change-Id: Ib58c1acbb9629a6654eb8e1666872974f0c75944
2020-10-19 19:35:19 +00:00
Treehugger Robot
c59b81c978 Merge changes I1d3e5e66,I86b869af,Iab4d3902,I645ee722 am: 72864d2930 am: 968582e45f am: cb2ebfc692
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461087

Change-Id: I3a0abc3172b06e201535876bf01d37ed357853af
2020-10-19 19:21:50 +00:00
Zoran Jovanovic
5b23d15d37 OMS: Add config_signature policy handling am: 0f942f99ca am: 98f8388042 am: 1dd9fa3689
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453997

Change-Id: I6eb6791bc9ab2e8ee8b50404e5d2e9bb9eb77e9e
2020-10-19 19:21:41 +00:00
Mark Renouf
749b6360a1 Refactor names of internal scrollcapture interfaces
Renames to better align with use and existing naming patterns.
Using 'connection' to avoid confusion as to control flow or
roles. (A connection is direct from SystemUI --> App process)

IScrollCaptureClient -> IScrollCaptureConnection
IScrollCaptureController -> IScrollCaptureCallbacks

Test: atest FrameworksCoreTests:ScrollCaptureConnectionTest \
          FrameworksCoreTests:ScrollCaptureTargetResolverTest \
          ScrollCaptureTest

Change-Id: I9afd33109f6718b61d172ce3e4b3bb5d71a2897e
2020-10-19 14:48:32 -04:00
Treehugger Robot
968582e45f Merge changes I1d3e5e66,I86b869af,Iab4d3902,I645ee722 am: 72864d2930
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461087

Change-Id: I573b7ca2340c71afe3be78ab92e91f37a4266695
2020-10-19 18:39:10 +00:00
Zoran Jovanovic
98f8388042 OMS: Add config_signature policy handling am: 0f942f99ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453997

Change-Id: I779b6c73a37b0ccd42afa1b899a2b6e4a3c17f92
2020-10-19 18:28:24 +00:00
Treehugger Robot
89eed4d26d Merge "AutoBrightness: Remove handler's messages before send." am: b3230cd639 am: b5d7cf8e9e am: 8ba0cd74bf am: 4611a2da49
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456125

Change-Id: Iba3f08683af6a3cf18e0f9405bced0f05a6ccc95
2020-10-19 18:15:39 +00:00
Treehugger Robot
4611a2da49 Merge "AutoBrightness: Remove handler's messages before send." am: b3230cd639 am: b5d7cf8e9e am: 8ba0cd74bf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456125

Change-Id: I2961477c0d13707961906eaab49aff5444d63339
2020-10-19 18:02:37 +00:00
Treehugger Robot
72864d2930 Merge changes I1d3e5e66,I86b869af,Iab4d3902,I645ee722
* changes:
  Fix <overlay-config-signature> comments
  Fix non-inclusive OMS test language
  Remove malloc/free for inline overlay values
  OMS: Add config_signature policy handling
2020-10-19 17:57:33 +00:00
Wei Wang
d6eb7b3b7f Merge "SysUI: add a flag to control location indicators behavior." 2020-10-19 17:38:17 +00:00
Treehugger Robot
b5d7cf8e9e Merge "AutoBrightness: Remove handler's messages before send." am: b3230cd639
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456125

Change-Id: I1619a994ebcffca22281aeaeb2347c0dabb240a7
2020-10-19 17:28:24 +00:00
Treehugger Robot
b3230cd639 Merge "AutoBrightness: Remove handler's messages before send." 2020-10-19 16:42:15 +00:00
Andrei-Valentin Onea
021aedcbf4 Merge "Add enabledSince support for compat changes" am: c90a797b8e am: 33edcd4dbc am: bcf00b61dd am: 6eb084ed32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450823

Change-Id: I597f9b8028c2af4d1e09a5e0d7db237e80fa3ca3
2020-10-19 15:53:58 +00:00
Andrei-Valentin Onea
6eb084ed32 Merge "Add enabledSince support for compat changes" am: c90a797b8e am: 33edcd4dbc am: bcf00b61dd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450823

Change-Id: Ia5d2e78398f907f45d0904927974a403f8476b22
2020-10-19 15:26:01 +00:00
Andrei-Valentin Onea
33edcd4dbc Merge "Add enabledSince support for compat changes" am: c90a797b8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450823

Change-Id: I9da4af4172ed8c13582c27e0e4394cbd3caa0d72
2020-10-19 14:37:29 +00:00
Andrei-Valentin Onea
c90a797b8e Merge "Add enabledSince support for compat changes" 2020-10-19 14:19:31 +00:00
Wei Wang
220f0234b5 SysUI: add a flag to control location indicators behavior.
Under the new flag, the location indicators will display when either
location indicators flag is enabled, or when permission hub feature is
enabled.

Bug: 171057373
Test: atest PrivacyItemControllerFlagsTest
Test: Manual
Change-Id: I628ced3108f4844444915e10a7e0bfbb0a9b8309
2020-10-16 16:51:36 -07:00
TreeHugger Robot
054d9526f5 Merge "Mute BatteryStatsImpl CPU uid readers log" 2020-10-16 23:01:17 +00:00
TreeHugger Robot
eac0321ff3 Merge changes from topic "oct16b"
* changes:
  Recommend efficient String operations.
  Simple alternative to String.format().
2020-10-16 22:27:50 +00:00
Mike Ma
fa64118058 Mute BatteryStatsImpl CPU uid readers log
As requested in b/170786671
These two print statements are happening 10s of times every 5s.

10-13 19:21:45.964 W BatteryStatsImpl: Got cluster times for an isolated
uid with no mapping: 1099185
10-13 19:21:51.445 D BatteryStatsImpl: Got freq readings for an isolated
uid with no mapping: 90001

Bug: 165017936
Test: n/a
Change-Id: Ib1e7bc097e4864ce16f3622b780675609776cb30
2020-10-16 14:13:37 -07:00
Jeff Sharkey
af7c5f95cb Simple alternative to String.format().
This purposefully supports only a small handful of substitutions to
improve execution speed.  Benchmarking reveals this optimized
alternative performs 6.5x faster for a typical format string.

Add Preconditions overloads that accept varargs to avoid string
formatting overhead in successful case.

Bug: 170978902
Test: atest FrameworksCoreTests:android.text.TextUtilsTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:android.text.TextUtilsPerfTest
Change-Id: I3fae4dc95cfc98a61c4a7f07ca0781c4a2ee3be9
2020-10-16 13:44:16 -06:00
Alison Cichowlas
6b4ba64a68 Merge "Sharesheet: maintain dialog fragment state." 2020-10-16 17:41:23 +00:00
Greg Kaiser
69475be847 Revert "[incremental/pm] LauncherApps APIs for loading state and progress"
This reverts commit 0173a44f3d.

Bug: 170959052
Test: Locally confirmed two reverts together fix app tray
Change-Id: I2f7b198f77b54be671c7f02bc2b67838bf99d28b
2020-10-16 07:34:43 -07:00
Alison Cichowlas
c6c0a8c5b8 Sharesheet: maintain dialog fragment state.
Test: ChooserActivityTests; manual repro of bug steps (change to dark
theme with dialog open).
Bug: 168436482

Change-Id: I64f475cb6716f4b97197ef193072503701e0267e
2020-10-15 13:55:07 -04:00
Robert Chou
14063a76bb Merge "Unregistering PackageMonitor only when has registered it" am: 132f17ca3e am: 69d78722b5 am: ea9615522a am: 9f2f1e6dcb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456123

Change-Id: Ib1dce6c544944dcd2e7ab83fad78494e5a4e8f53
2020-10-15 14:20:20 +00:00
Songchun Fan
8306129ffc Merge "[incremental/pm] LauncherApps APIs for loading state and progress" 2020-10-15 14:03:24 +00:00
Robert Chou
9f2f1e6dcb Merge "Unregistering PackageMonitor only when has registered it" am: 132f17ca3e am: 69d78722b5 am: ea9615522a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456123

Change-Id: I7c75f05b97286054dd25c92a20b5ab97162c40c7
2020-10-15 13:49:44 +00:00
Robert Chou
69d78722b5 Merge "Unregistering PackageMonitor only when has registered it" am: 132f17ca3e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456123

Change-Id: I6fdb78c24cf3c09433a2b183dd74c25fd991ec4f
2020-10-15 12:50:05 +00:00
Marcin Oczeretko
ad6cc0a7e7 Add a flag to enable/disable/configure LatencyTracker
Test: manual - flashed the phone and verified the logging and statsd sampling with default settings
Bug: 131859447, 162927074
Change-Id: I2637100b4945732f7bd792831749ca2614971c5e
2020-10-15 11:48:51 +01:00
TreeHugger Robot
bcfbdd28e5 Merge "Launch Panic gesture from SysUI" 2020-10-14 22:15:15 +00:00
Ryan Mitchell
70e02d4285 Fix <overlay-config-signature> comments
Fix comments that refer to <overlay-config-signature> as
<config-signature>.

Bug: none
Test: build
Change-Id: I1d3e5e66ec3da993082f3441997b0d243d61520b
2020-10-14 14:53:01 -07:00
Zoran Jovanovic
0f942f99ca OMS: Add config_signature policy handling
Alongside SIGNATURE and ACTOR_SIGNATURE policies, add CONFIG_SIGNATURE
policy to overlayable that overlay fulfills if it is signed with the
same certificate as the reference package whose package name is
declared in 'config-signature' tag of SystemConfig and is vetted by
OMS that it's a system pre-installed package.

BUG: 158726924
TEST: regular aapt2, idmap2, OMS tests

Merged-In: I645ee72271496008742886274be0d63a2985201b
Change-Id: I645ee72271496008742886274be0d63a2985201b
2020-10-14 14:52:46 -07:00
Matthew Fritze
9394bd84bd Launch Panic gesture from SysUI
- Add StatusBar interface for launching panic gesture
- Add basic method to launch the panic gesture in sysui
- Swap call to launch telephony to launching eshare intent

Tested in Pixel 3a using the Settings Panel intent (since it resolves)
and found that it does indeed launch ontop of the camera (see
screenshot) and turns off the screen. These can be fixed in a later CL.

Screenshot: https://screenshot.googleplex.com/8KKEEXbyBLkJssy

Test: atest StatusBarTest GestureLauncherServiceTest CommandQueueTest
Bug: 169087010
Change-Id: I9efccffd06edbf37c15ea92ef5935ab7091a7f80
2020-10-14 12:33:43 -07:00
Hall Liu
5b161c752d Merge "Update and expose ModemActivityInfo" 2020-10-14 18:31:15 +00:00
Hall Liu
0eca33ec91 Update and expose ModemActivityInfo
Update ModemActivityInfo to present a nicer API surface and expose it as
a SystemApi. Also change clients in BatteryStats to match the new
surface.

This is part 1. Part 2 will modify the methods in TelephonyManager to
use a more up-to-standards threading model.

Bug: 170427831
Test: atest ModemActivityInfoTest
Change-Id: I762ed949342861c75d94eafce88335e7bd8c9139
2020-10-14 11:22:11 -07:00