Commit Graph

15167 Commits

Author SHA1 Message Date
TreeHugger Robot
81be384dee Merge "Make IInputMethodManager to oneway (4/N)" 2020-12-11 07:09:19 +00:00
TreeHugger Robot
f52311f658 Merge "Add dumpsys and shell cmd for sensor_privacy" 2020-12-11 04:35:56 +00:00
Wilson Wu
5a5648dcb5 Make IInputMethodManager to oneway (4/N)
After CL[1], the client might be waiting forever when
system server throw Exception. The expected behavior
after throwing an Exception from the system server
should let the caller crash.

To keep the previous behavior, support exception as a
valid result for ResultCallback.

CL[1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64

Bug: 174263942
Bug: 163453493
Test: Throw an exception in system server and observe the
      caller crash with ResultCallback flow.
Test: atest CtsInputMethodTestCases
Change-Id: If79e063641a01b325c63eb9f871f5b992d7c0b72
2020-12-11 11:49:50 +08:00
Sam Saccone
bf33f70982 Merge "Revert "Temporarily replace "android.com" accounts."" 2020-12-10 23:05:03 +00:00
Dmitri Plotnikov
57fbbae2be Merge "Convert CpuPowerCalculator from using BatterySipper to UidBatteryConsumer" 2020-12-10 19:50:20 +00:00
Jeff Sharkey
7db7b68b9d Merge "Add per-file OWNERS for BatteryStats" 2020-12-10 19:00:08 +00:00
Dmitri Plotnikov
3ff453a944 Add per-file OWNERS for BatteryStats
Manual merge of https://r.android.com/1520758

Test: N/A

Change-Id: Ie9eef7eed7f097113074c3c5f3f7a7084a55f97b
2020-12-10 10:58:56 -08:00
Jorim Jaggi
b3886bcaeb OWNERS for SysUI JankTracker
Change-Id: Id8a467273f2dbd2addb395bcbe7dd3126fa79c3c
2020-12-10 16:38:55 +00:00
Riddle Hsu
959d41c6cb Merge "Move launched activity info getter to ActivityClientController" 2020-12-10 15:32:58 +00:00
Jeff Sharkey
9bfd484087 Merge "Mitigate performance TypedXml regression." 2020-12-10 14:12:06 +00:00
Narayan Kamath
f6cf5abf47 Merge "ResolverActivity: Rename alwaysCheck to always." 2020-12-10 11:29:31 +00:00
Adam Bookatz
c8eaa82d5c Merge "Cleanup some SystemService.onUser...() comments" 2020-12-10 10:03:34 +00:00
Zoey Chen
cc8c3ba4a9 Merge "[Telephony] Implement onDataEnabled callback" 2020-12-10 08:46:15 +00:00
Dmitri Plotnikov
62d862082b Merge "Use eBPF-based time-in-state monitoring for groups of threads" 2020-12-10 03:31:06 +00:00
Dmitri Plotnikov
e786140e74 Convert CpuPowerCalculator from using BatterySipper to UidBatteryConsumer
Bug: 158137862
Test: Start Settings app, navigate to Apps, pick an app, navigate to Battery

Change-Id: I1ce3d1a0ece5419384c366e908523312651877ee
2020-12-09 18:17:18 -08:00
Dmitri Plotnikov
a7b599b824 Use eBPF-based time-in-state monitoring for groups of threads
Bug: 169279846

Test: atest FrameworksCoreTests:com.android.internal.os.KernelSingleProcessCpuThreadReaderTest
Test: atest FrameworksCoreTests:com.android.internal.os.SystemServerCpuThreadReaderTest
Change-Id: Ic06fe30bc1b602470c18bf89d3380ae2bca7ed3c
2020-12-09 16:44:23 -08:00
Adam Bookatz
4f2d2e84a4 Cleanup some SystemService.onUser...() comments
These functions were recently renamed, so this cl
updates a few comments referencing the old names.

Also removes an unused method.

Test: compiles (just comments and removing unused method)
Change-Id: Iaaf8fd4927c4ccf38fffb304c67ef139e626fdcf
2020-12-09 23:53:23 +00:00
Philip P. Moltmann
6a227526f1 Add dumpsys and shell cmd for sensor_privacy
E.g.

> adb shell dumpsys sensor_privacy
SENSOR PRIVACY MANAGER STATE (dumpsys sensor_privacy)
{
  is_enabled=false
}

> adb shell cmd sensor_privacy enable microphone

> adb shell dumpsys sensor_privacy
SENSOR PRIVACY MANAGER STATE (dumpsys sensor_privacy)
{
  is_enabled=false
  individual_enabled_sensor={
    sensor=1
    is_enabled=true
  }
}

Bug: 162549680
Test: Above shell commands
Change-Id: I5700ff5b0aae4f64d3bf54b5c51d8ab2779e5abf
2020-12-09 14:42:41 -08:00
Jeff Sharkey
78e84716e6 Mitigate performance TypedXml regression.
When an attribute value is missing, we can immediately return the
default value instead of paying the cost of throwing an exception.

To bring this benefit to both human-readable and binary XML, this
is implemented by adding a new getAttributeIndex() lookup method
which is then used by default methods.

readExtraAttributes() also appears to be parsing a string list as
a boolean value (which seems very broken), so we add hand-rolled
parsing logic to avoid paying the cost of an exception.  Someone
should follow up in the future to investigate if there's an actual
bug here.

Bug: 174544002
Test: manual
Change-Id: Id313d18000e345ca1acd3c66d2c0c0fc44769b71
2020-12-09 12:18:05 -07:00
Jeff Sharkey
7444e309f9 Revert "Temporarily replace "android.com" accounts."
This reverts commit 0ace970e19.

Bug: 174932174, 175111824
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I152186408ecf6da1cb7354d14737de7cce55a34b
2020-12-09 11:06:28 -07:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
0ace970e19 Temporarily replace "android.com" accounts.
We're temporarily blocked on internal Gerrit tooling to support
relaxed OWNERS validation, so this change temporarily replaces all
"android.com" accounts with "google.com" equivalents.

Bug: 174932174,175111824
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I114f2a40cee1b65e21250da7372e11c18cd73e25
2020-12-08 17:54:13 +00:00
Jeff Sharkey
358f0d4fc8 Merge changes from topic "dec5" am: c2793cf12b am: 9af6ac78b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2776a545a24f007ccb4b9ee14705978571265ef3
2020-12-08 16:43:19 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c2793cf12b Merge changes from topic "dec5"
* changes:
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
2020-12-08 15:39:59 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Narayan Kamath
cfabf905a3 ResolverActivity: Rename alwaysCheck to always.
alwaysCheck can mean something very different
("always check with the user") and has the opposite meaning. It's
also inconsistent with naming in the rest of the file which is
"always".

Test: make
Bug: N/A
Change-Id: I856ba34a5607d3bca9dee396c531a07699489a7f
2020-12-08 12:18:50 +00:00
Fiona Campbell
8379118173 Merge "Persist screen brightness setting through upgrade" am: 2a747f002f am: a333c1fb5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517740

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I762a6db2c61952d2a8f4fbda511bcc81a870fe81
2020-12-08 10:47:28 +00:00
Fiona Campbell
a333c1fb5e Merge "Persist screen brightness setting through upgrade" am: 2a747f002f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1517740

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75a7feb9ec86baf2a588c1187ec2632be64beaf0
2020-12-08 10:10:58 +00:00
Fiona Campbell
2a747f002f Merge "Persist screen brightness setting through upgrade" 2020-12-08 10:07:29 +00:00
Riddle Hsu
f90b2d4610 Move launched activity info getter to ActivityClientController
- Add getLaunchedFromUid and getLaunchedFromPackage into Activity
  because they are used in several places.
- Move getActivityClassForToken to ActivityTaskManagerInternal#
  getActivityName because it is only used in system server.
- Remove getPackageForToken because it is no longer used.

Bug: 174041144
Bug: 174040691
Test: CtsWindowManagerDeviceTestCases

Change-Id: Iac1581ac2271baf1ab1625ced6cc1f42bf05eaf5
2020-12-08 13:10:10 +08:00
Winson Chiu
5c5e30f40b Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into rvc-qpr-dev am: 5e971858b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12940364

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I425a4f3881d34ca06af0383ae9ca8888f1ae6a04
2020-12-08 00:45:54 +00:00
Winson Chiu
5e971858b8 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into rvc-qpr-dev 2020-12-08 00:25:50 +00:00
Winson Chiu
1ab707a196 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" 2020-12-08 00:24:46 +00:00
Hai Zhang
c25b63c275 Merge "Move or refactor PermissionManagerInternal APIs." 2020-12-06 00:50:22 +00:00
Treehugger Robot
54b570ea4c Merge "Add more logging for wakelock stats inquiries" am: e98c214507 am: 9aafb7ca56 am: 7400c11e9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518102

Change-Id: Ic7383de3d521e399b4071ed456d9ae0a137e283f
2020-12-05 22:15:31 +00:00
Hai Zhang
93e38c9566 Move or refactor PermissionManagerInternal APIs.
Make the three backup related methods in PermissionManagerInternal
ready for system API. PermissionManagerInternal is currently used in
framework so it can't be removed without other changes yet. The other
listener methods are only used by PermissionPolicyService and will
become module internal.

Finally turn PermissionManagerInternal and
PermissionManagerServiceInternal into an interface from an abstract
class, and remove redundant modifiers after this.

Also refactors onUserCreated/Removed() to be system API ready.

Bug: 158736025
Test: presubmit
Change-Id: I335a7a37b737f6fa0faf0a2c34634d44199aee97
2020-12-04 23:05:59 -08:00
Treehugger Robot
7400c11e9d Merge "Add more logging for wakelock stats inquiries" am: e98c214507 am: 9aafb7ca56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518102

Change-Id: Iccd807a0ef318f8690e1e2418a07b3425435a16b
2020-12-05 02:20:05 +00:00
Zoey Chen
415ec768ba Merge "[Telephony] PhoneStateListener redesign for new event" 2020-12-05 01:28:41 +00:00
Treehugger Robot
9aafb7ca56 Merge "Add more logging for wakelock stats inquiries" am: e98c214507
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518102

Change-Id: I02a2586654f3ec241491d5471a2c1f94123e5f36
2020-12-05 00:27:26 +00:00
Jeff Sharkey
db4ae71beb Merge changes from topic "nov30"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Mechanical refactoring to new typed XML classes.
  Additional hand-migration to TypedXml interface.
  "Resolve" both human-readable and binary XML.
2020-12-04 21:32:44 +00:00
Michael Sun
757b01b94b Add more logging for wakelock stats inquiries
Add additional logging after receiving wakelock statistics from
SystemSuspend via AIDL.

Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: manually verified new log presented
Bug: 173539101
Change-Id: Ia64ca7edaa4c7925348e1c31d5681943cfbe4f33
2020-12-04 20:25:28 +00:00
Fiona Campbell
2e8e9d39fe Persist screen brightness setting through upgrade
The screen brightness float setting initially did not exist when
upgrading the device software. This change ensures the float and int
values are synchronised on the system start-up.

Bug: 174508435
Test: manual - set autobrightness off, upgrade from Q to R, and check
brightness value in settings.

Change-Id: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
Merged-In: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
(cherry picked from commit 96f43f21b3a3021762c2d213d8958590127cae36)
2020-12-04 15:42:29 +00:00
Ming-Shin Lu
4ba8484ffb Revert "Revert "Let IME#onFinishInput called without dup onStart..."
Revert^2 "Verify lifecycle test when screen on/off"

c2769e41ea17d7f0d261396d28ddde3563422701

Reason: Fix forward Bug 174512702 and Bug 174445559
        with CL[1].

CL[1]: Icf1504d40b25fc5f53eae65d4bab48a3070db1d6

Change-Id: Id4e71a822bfde5fe6a263bbe094c0d238017efe1
2020-12-04 11:40:20 +08:00
Jeff DeCew
13fa153e25 Merge "Revert "Let IME#onFinishInput called without dup onStartInput wh..."" 2020-12-04 01:02:15 +00:00
Dmitri Plotnikov
75affe2132 Merge "Introduce BatteryUsageStats API" 2020-12-04 00:00:46 +00:00
Jeff DeCew
3d62f739a8 Revert "Let IME#onFinishInput called without dup onStartInput wh..."
Revert "Verify lifecycle test when screen on/off"

Revert submission 12716106-ims_screenstate_lifecycle

Reason for revert: b/174512702
Reverted Changes:
Iba0332ed3:Verify lifecycle test when screen on/off
I8a657e75e:Let IME#onFinishInput called without dup onStartIn...

Change-Id: I16f4a34360a2f64b69978724648a9be741f140b5
2020-12-03 19:13:34 +00:00
Dmitri Plotnikov
bfe822007b Introduce BatteryUsageStats API
Bug: 158137862
Test: Start Settings app, navigate to Apps, pick an app, navigate to Battery

Change-Id: I8da8cc9501e01282b855f1bee6032911d91aaf77
2020-12-03 10:42:41 -08:00
Zoey Chen
6ec5712446 [Telephony] PhoneStateListener redesign for new event
1. Add int EVENT_* and expose these as @SystemApi
 2. Add listener interface
 3. Deprecated LISTEN_*
 4. un/registerPhoneStateListener
 5. get event from event listener
 6. Add event to list

Test: manual and
atest TelephonyManagerTest#testRegisterPhoneStateListener
atest TelephonyManagerPermissionTest
atest CtsTelephonyTestCases:PhoneStateListenerTest
atest TelephonyRegistryManagerTest
atest CtsTelecomTestCases:android.telecom.cts.IncomingCallTest
atest CtsTelecomTestCases:android.telecom.cts.OutgoingCallTest

Bug: 167684594
Change-Id: Id89a541745fb8700e1ebd2cc162ee55cd1055661
2020-12-03 17:46:22 +08:00
Jackal Guo
ccfa9a6682 Merge "Reduce package parsing times" 2020-12-03 05:57:53 +00:00