Commit Graph

17547 Commits

Author SHA1 Message Date
Issei Suzuki
36709edf70 Merge "Keep FLAG_SHOW_WALLPAPER flag on NotificationShade." 2021-10-12 15:19:47 +00:00
Fabian Kozynski
189b0feb1c Merge changes from topics "199770909", "199829900"
* changes:
  Add extra security checks for TileService API
  Make API one-way
2021-10-11 19:57:11 +00:00
Issei Suzuki
5e48aeeadd Keep FLAG_SHOW_WALLPAPER flag on NotificationShade.
Before this change, we controlled wallpaper visibility on the Lockscreen
by combination of visibility of NotificationShade window and
setting/resetting FLAG_SHOW_WALLPAPER flag on its window. When the flag
was removed while NotificationShade was still visible (e.g. OCCLUDE
transition starts on the Lockscreen), the wallpaper became immediately
invisible and caused a flicker.

With this change, we keep the FLAG_SHOW_WALLPAPER on NotificationShade,
and only rely on its visibility weather the wallpaper should be visible
or not on the Lockscreen.

Bug: 191438572
Test: existing tests + manual (open GPay app from the lockscreen)
Change-Id: Id13ffbbd2c965e0dcc97effd3faf46fd7a8bb1a5
2021-10-11 17:29:28 +02:00
TreeHugger Robot
8b7ffb6725 Merge changes from topic "multiDisplayPowerProfile" into sc-v2-dev am: 71f8cf24e2 am: d3b973ce7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15856347

Change-Id: I9916d9b3ed9ed839f45a228a01ec9d4477e7eb16
2021-10-08 06:22:12 +00:00
TreeHugger Robot
d3b973ce7e Merge changes from topic "multiDisplayPowerProfile" into sc-v2-dev am: 71f8cf24e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15856347

Change-Id: I41f6ea048c6e1cd7a525be9db8c00dadee0d4709
2021-10-08 06:21:16 +00:00
Wilson Wu
3f43f49df2 Merge "Hide SoftInput when INVALID_DISPLAY" 2021-10-08 03:11:15 +00:00
Matt Pietal
7da5998d03 Merge "Keyguard - Treat messsages to lock with priority" 2021-10-07 12:02:10 +00:00
Mark Renouf
54fef7af80 Merge "Fix NPE in onDestroy() when launched without args" 2021-10-06 15:32:28 +00:00
TreeHugger Robot
b875beaf85 Merge "Remove parent window from display content" 2021-10-06 14:13:42 +00:00
Matt Pietal
28c53ab8bc Keyguard - Treat messsages to lock with priority
When switching users and attempting to lock the device, the sysui main
thread becomes overwhelmed with events, creating a significant lag
between the time a message is posted and processed on the main
thread. This can be dangerous when these events are critical for
security, such as calls coming from PhoneWindowManager#lockNow() that
call KeyguardViewMediator#doKeyguardTimeout(). On older devices with
slower CPUs and less memory, the delay in processing can be
significant (15 - 30s).

The result of not prioritizing these events leads to a window of time
where a guest user can switch back to the owner, and gain access to
the owner's homescreen without needing to unlock the device with the
owner's credentials.

As a mitigation, prioritize two events originating in two specific
methods to make sure the device locks as soon as possible as well as
have the system server preemptively update its local cache.

Bug: 151095871
Test: Very manual race condition - follow steps listed in bug
Change-Id: I7585a0a5eeb308e0e32a4f77f581556d883b5cda
2021-10-06 09:34:32 -04:00
Mark Renouf
da5eebde68 Fix NPE in onDestroy() when launched without args
The previous fix corrects startup, but crashes in
onDestroy because of null value assumed to be
initialized.

Bug: 201719995
Test: adb shell am start com.android.systemui/.usb.UsbResolverActivity
Change-Id: Ie255ece9e73db71cbb4468c59db6de79d8f659b5
2021-10-05 15:22:08 -04:00
Michael Wachenschwanz
8ac63071a4 Update PowerProfile to support multidisplay devices
Replaced the display related power constants with new ones that support
multidisply.

The legacy constants are marked as UnsupportedAppUsage, so they have not
been removed yet and they attempting to read them will return the power
constant values for the first display.

Fixes: 200226329
Test: atest com.android.internal.os.PowerProfileTest#testPowerProfile
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Id181443bd6f553ee37fc4a1647d31644fcad7912
2021-10-05 11:13:01 -07:00
Mark Renouf
09091369d9 Merge "Fix UsbResolverActivity SuperNotCalledException (pt2)" 2021-10-05 18:09:53 +00:00
Dmitri Plotnikov
17be86c4f7 Merge "Writing battery history tags into the history buffer" 2021-10-05 18:03:22 +00:00
Tiger Huang
ce87a68694 Remove parent window from display content
This CL removes the logic related to the legacy ActivityView.

Bug: 179161778
Bug: 161810301
Test: build and boot to home.
Change-Id: I757769d3cac89ebddbdc467f533fed99c74941ee
2021-10-06 00:25:45 +08:00
Fabian Kozynski
c511e019f0 Make API one-way
Convert the return values to values that will be returned through the
callback. Separate the ranges by SUCCESS of the request or ERROR.

Test: CTS tests
Fixes: 199829900
Change-Id: If32083e52ed87a79953c952bbaadd8d977e0226c
2021-10-05 10:25:29 -04:00
Dmitri Plotnikov
d9bf639edc Writing battery history tags into the history buffer
The number and size of history tags can be very large, so they
would make the BatteryUsageStats binder parcel excessively large.
Now that they are written into the main buffer, the overall
size of the buffer, including the tags, is capped at 128k.

Bug: 198084535
Test: atest FrameworksCoreTests:BatteryUsageStatsProviderTest
      atest FrameworksCoreTests:BatteryStatsHistoryIteratorTest
      atest CtsDumpsysHostTestCases:BatteryStatsDumpsysTest
Change-Id: If7c54ab92f9ed92bd77d6a34ceee6e706a8db8fc
2021-10-04 11:26:09 -07:00
Mark Renouf
46abffb3de Fix UsbResolverActivity SuperNotCalledException (pt2)
Instead of calling the normal path, this change creates
a path to call Activity#onCreate directly and avoid
initializing state when the activity is about to self
finish()

Bug: 201719995
Test: adb shell am start -n
      com.android.systemui/com.android.systemui.usb.UsbResolverActivity
Change-Id: I40ee792e341b828a3e288b1fc713f6df13728b4a
2021-10-04 11:28:25 -04:00
Li Li
00b3cd7379 Freezer: don't skip processes with file locks
To prevent deadlock, freezer had to skip all processes holding any file
locks. As SQLite is using exclusive locks, a lot of applications won't
be frozen. The new logic will detect the lock dependencies and only
unfreeze the processes that block others.

This patch also adds a rewind() function to ProcFileReader class so that
ProcLocksReader doesn't open/close procfs nodes and create new instance
each time /proc/locks is parsed.

Bug: 176927978
Test: atest ProcFileReaderTest
Test: atest ProcLocksReaderTest
Test: verified processes with file locks could be frozen
Test: verified processes with blocking file locks were unfrozen
Change-Id: Ic2c89e6dcc9ee186840731c911be2aa3247b1352
2021-09-30 22:11:21 -07:00
Pedro Loureiro
19a969e52c Merge "Parse new xml attributes used for updatable shared libraries" 2021-09-30 18:21:14 +00:00
TreeHugger Robot
b479f7a48a Merge "Add multi-user jank monitoring" into sc-v2-dev am: 89f022ac99 am: e10d87b485
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15891027

Change-Id: Ie1f093096383dc96a1dc9921c5f13ef77bad73d3
2021-09-29 22:59:19 +00:00
TreeHugger Robot
e10d87b485 Merge "Add multi-user jank monitoring" into sc-v2-dev am: 89f022ac99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15891027

Change-Id: I8f5811c0f3d625c13422a9bcb050295bf7789368
2021-09-29 22:42:20 +00:00
TreeHugger Robot
89f022ac99 Merge "Add multi-user jank monitoring" into sc-v2-dev 2021-09-29 22:31:47 +00:00
Lucas Dupin
71d3f5bb9e Add multi-user jank monitoring
Created CUJ for monitoring jank when switching users, including guest
users, but excluding the "Add User" user journey.

Bug: 200160966
Test: switch users manually, look at logs
Test: atest KeyguardUpdateMonitorTest
Test: atest UserSwitcherControllerTest
Change-Id: I5570133a1f96a58d39a8f053f9f480cdaada8df1
2021-09-29 10:26:26 -07:00
Pedro Loureiro
70da334f7b Parse new xml attributes used for updatable shared libraries
Attributes added to the `library` tag used in AndroidManifest.xml.
They allow to easily and transparently include/exclude a library from
apps for compatibility purposes.

Bug: 191978330
Test: atest com.android.server.pm.parsing.library.ApexSharedLibraryUpdaterTest com.android.server.systemconfig.SystemConfigTest
Change-Id: Ibdde742a05fd670a9aaee5ee77ae25b9c0801f53
2021-09-29 09:47:15 +00:00
TreeHugger Robot
dad2a6fd9f Merge "Zero out WiFi duration and power if ControllerActivityCounter is null" into sc-qpr1-dev am: c410f29893 am: bfe149f2ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934611

Change-Id: I19fdba5bffb025cb61f4de03fe8cf78c3b7c479b
2021-09-29 00:54:20 +00:00
TreeHugger Robot
bfe149f2ed Merge "Zero out WiFi duration and power if ControllerActivityCounter is null" into sc-qpr1-dev am: c410f29893
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934611

Change-Id: Iee9dbf00b4568400c319a348587018bfa3e6fb77
2021-09-29 00:43:25 +00:00
TreeHugger Robot
7f541b72f7 Merge "Zero out WiFi duration and power if ControllerActivityCounter is null" into sc-qpr1-dev am: c410f29893
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934611

Change-Id: I94e7ba1c4e69ed2140ca49f4542c08e0bbd72573
2021-09-29 00:43:17 +00:00
TreeHugger Robot
dddbf380e5 Merge "[NGA v2] Reliable Visible Activity Lookup" into sc-v2-dev am: 80fcbc8fe0 am: 347557e905
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15810445

Change-Id: I4a5b0c551343984de6124a497f7b24dd750c5aca
2021-09-28 18:16:17 +00:00
TreeHugger Robot
347557e905 Merge "[NGA v2] Reliable Visible Activity Lookup" into sc-v2-dev am: 80fcbc8fe0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15810445

Change-Id: Ibfce3c573e7cc136226599500e438527a1565075
2021-09-28 18:02:38 +00:00
Dmitri Plotnikov
fb10be47c9 Zero out WiFi duration and power if ControllerActivityCounter is null
Bug: 200346841
Test: atest FrameworksCoreTests:WifiPowerCalculatorTest
Change-Id: I087e3b60c277c1d1a63b6c06e60ffcbe95224668
(cherry picked from commit 199f93ac3b)
2021-09-28 17:20:34 +00:00
Dmitri Plotnikov
df8954c97b Merge "Use LongArrayMultiStateCounter for proc-in-state time counting" 2021-09-28 17:19:46 +00:00
lpeter
918ea9940f [NGA v2] Reliable Visible Activity Lookup
To enable more voice-oriented in-app user journeys, Google Assistant
needs to access more information regarding the visible activities
via the Voice Interaction Session. Thus, we provide the APIs to receive
the changed visible activities in Voice Interaction Session.

Bug: 178244510
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I019d09fee8105ae1eadbc76803f46fd8b1948f6b
2021-09-28 17:06:49 +08:00
TreeHugger Robot
a6c6fdb0d2 Merge "Zero out WiFi duration and power if ControllerActivityCounter is null" 2021-09-28 03:41:52 +00:00
Dmitri Plotnikov
199f93ac3b Zero out WiFi duration and power if ControllerActivityCounter is null
Bug: 200346841
Test: atest FrameworksCoreTests:WifiPowerCalculatorTest
Change-Id: I087e3b60c277c1d1a63b6c06e60ffcbe95224668
2021-09-27 17:50:16 -07:00
Dmitri Plotnikov
2464cfb9d0 Use LongArrayMultiStateCounter for proc-in-state time counting
The acquisition of eBPF's per-UID time-in-state data is now done
in the native code, directly integrating with the native layer
of LongArrayMultiStateCounter.

Bug: 197162116
Test: atest FrameworksCoreTests:BatteryStatsImplTest
      atest FrameworksCoreTests:BstatsCpuTimesValidationTest
      atest FrameworksCoreTests:LongArrayMultiStateCounterTest
      atest FrameworksCoreTests:KernelSingleUidTimeReaderTest

Change-Id: I1fdc747f272ecc0c35c51db39e442aac67d1b24c
2021-09-27 17:42:13 -07:00
Varun Shah
991929b9fb Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev am: 912d89451a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853562

Change-Id: Id9539465fac375a4c2953aff19d6b3e5a880375a
2021-09-27 16:10:57 +00:00
Rhed Jao
5b39a5111d Merge "Dump overlay configurations to the bugreport" 2021-09-27 02:19:51 +00:00
TreeHugger Robot
a401999f85 Merge "Check custom component names before aggregating BatteryUsageStats snapshots" into sc-qpr1-dev am: 0ef5152b17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15872124

Change-Id: I453c8cda7d7d6ab29facc35acd1d6ab84f6ee5fa
2021-09-25 02:17:20 +00:00
Dmitri Plotnikov
5375fe32cb Drop per-app measured energy when an OTA changes the set of energy components am: 50348e3120
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15857253

Change-Id: Ib7813a74c1c4c12d1827d8a07f6caaa8dd4de65b
2021-09-25 02:11:05 +00:00
TreeHugger Robot
cae5560e88 Merge "Create XML parser only once." 2021-09-24 23:22:13 +00:00
Varun Shah
153651ed3e Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev am: 912d89451a am: 12c61b00c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853562

Change-Id: Iff94defece97ede092c6236da4833b7b3907e955
2021-09-24 18:20:29 +00:00
Varun Shah
12c61b00c0 Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev am: 912d89451a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853562

Change-Id: Ieead99da9e0ed20b30b9add94c8003ae69ef9424
2021-09-24 18:07:21 +00:00
Varun Shah
912d89451a Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev 2021-09-24 17:54:45 +00:00
TreeHugger Robot
085b3212ed Merge "Show nearby share as normal app target and in first item always" 2021-09-24 14:33:14 +00:00
Zhen Zhang
8077327624 Show nearby share as normal app target and in first item always
Show nearby share as a normal app target instead of action button. And
always put it as the first item in App prediction Row. The change is
gaurded by lowRamDevice flag and experiment flag. by default, there is
no change to current behavior. One needs to run command 'adb shell
device_config put systemui is_nearby_share_first_target_in_ranked_app true' on
Android Go devices to see the effect.

Bug: 197241083
Test: atest ResolverListControllerTest
Test: atest AbstractResolverComparatorTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest (no new failure)

Change-Id: I22106e382e0d96fc760e4a9fb94be3ae293c8497
2021-09-24 09:19:49 +00:00
Alex Buynytskyy
0c39dd02f6 Create XML parser only once.
This greatly cuts memory usage: 2.5M -> 0.5M (see bug for traces).

Bug: 200995209
Test: atest SystemConfigTest SystemConfigNamedActorTest
Change-Id: I0b76dc2610afaad3e418ef3115c5e54a05ab334e
2021-09-23 15:36:59 -07:00
Rhed Jao
5487d16c81 Dump overlay configurations to the bugreport
Bug: 200250601
Test: adb bugreport
Change-Id: I912c94a44b0592349324d6f74a8685997b2a7601
2021-09-23 20:52:27 +08:00
Rhed Jao
48004fb004 Merge "Fix an IllegalStateException in the OverlayConfigParser" 2021-09-23 03:26:26 +00:00
Mark Renouf
e86123e6d0 Merge "Clean up and expand long screenshots test coverage" 2021-09-22 19:15:27 +00:00