Commit Graph

19707 Commits

Author SHA1 Message Date
Andrey Epin
3b1524af50 Merge "Load icons and labels only once" into tm-qpr-dev am: 3002386445 am: 260401b184
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19961127

Change-Id: I78f85d33d44d7ef9ac23c29fc9576e45a0dcb07d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-04 21:35:31 +00:00
Andrey Epin
260401b184 Merge "Load icons and labels only once" into tm-qpr-dev am: 3002386445
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19961127

Change-Id: I79d2abc85622e57dbb004a4df7cd73635fd1f5d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-04 21:06:26 +00:00
Andrey Epin
3002386445 Merge "Load icons and labels only once" into tm-qpr-dev 2022-10-04 20:39:58 +00:00
Eric Biggers
fd8bf04f1f Merge changes from topic "sps-on-creation"
* changes:
  Make the CE key always be encrypted by the synthetic password
  Give all users SP-based credentials
  Unlock user keys from LockSettingsService only
2022-10-04 20:21:45 +00:00
Matt Casey
7b19c4b99f Merge "Copy multi-image editor fix to QPR" into tm-qpr-dev 2022-10-04 20:01:43 +00:00
Eric Biggers
78e245a21a Give all users SP-based credentials
Make it so that every user gets a synthetic password (SP).  Previously,
users only got an SP if an LSKF or escrow token was set at least once.

For normally created users, create the SP by making UserManagerService
call the new method LSS.createNewUser(), just after the prerequisite
steps of createUserKey and prepareUserData.  As this now results in the
allocation of LSS state (e.g. a Weaver slot) before the user is fully
created, LSS can no longer rely on ACTION_USER_REMOVED for cleaning up
its state, so instead make UserManagerService.destroyUserState() call
LSS.removeUser().  Note that ACTION_USER_REMOVED isn't sent for
pre-created users, so as a side effect this change also fixes a bug
where LSS state for pre-created users wasn't removed immediately.

For the system user, which doesn't go through the normal user creation
flow, make LSS create the SP upon PHASE_BOOT_COMPLETED.  At the same
time, also create SPs for any other users who don't have one yet; this
handles users that were created by older versions of Android.

This change makes things more consistent.  It is also a prerequisite to
making it so that a Weaver value is always needed to unlock the CE key
if the device supports Weaver; this is important since Weaver may be the
only available securely erasable storage.  A later CL will implement
this by making the CE key be always bound to the SP.  For now, the CE
key remains unlockable separately from the SP when there is no LSKF.

Test: see Ia753ea21bbaca8ef7a90c03fe73b66c896b1536e
Bug: 232452368
Change-Id: Ic82084fe9d9bb34ee9640dea027963043afca9c2
2022-10-04 16:41:28 +00:00
Eric Biggers
3d5653e11e Unlock user keys from LockSettingsService only
In preparation for making the CE key of each user always be protected by
the user's synthetic password even when the user has no LSKF, make
LockSettingsService the sole caller of IStorageManager.unlockUserKey().

For the opportunistic secret-less unlock by UserController at user start
time, call a new method LSS.unlockUserKeyIfUnsecured().  For now this
method calls IStorageManager.unlockUserKey() with a null secret.  Later
it will unwrap the user's synthetic password if needed.

For the unlock via credential verification that is triggered by LSS,
make LSS call IStorageManager.unlockUserKey() before calling
IActivityManager.unlockUser(), rather than passing the SP-derived secret
to IActivityManager.unlockUser() for it to do the unlockUserKey().

Since neither the secret nor the token arguments to
IActivityManager.unlockUser() are used anymore, add a new method
IActivityManager.unlockUser2() that lacks these arguments.  Note that
method name overloading cannot be used because AIDL doesn't support it.

Test: atest com.android.server.locksettings && \
      atest com.android.server.am.UserControllerTest \
            com.android.server.pm.UserManagerServiceTest \
            com.android.server.pm.UserManagerTest
Test: Boot and reboot Cuttlefish
Bug: 232452368
Change-Id: I8971b92bb5055fca8e19e0f9d14e8f0a7022b453
2022-10-04 16:41:23 +00:00
Andrey Epin
cd7c00c36e Load icons and labels only once
The current implementation triggers icon loading each time a view gets
bound and, as binding happens multiple times, icon and label loadings
are unnecessarily duplicated. In addition, as a loading task never gets
canceled, there’re cases (like in the associated ticket) when a view
gets rapidly bound to multiple positions and all the icon loadings
eventually catches up updating it, ending up in icons rapidly changing
on the screen for the view.
This change addresses this by simplifying the icon loading/binding
logic: a view is always bound to the current data and the task is only
updates the data with the missing piece of info once (and applied for
both icons and label loading tasks).
There is one extra change in ResolverActivity due to LoadIconTask
interface change and cancellation logic for the tasks.

Fix: 245934835
Test: Manual tests on a list which does not fit into the screen.
Test: Manual tests with arficial delays added into the tasks.
Test: atest FrameworksCoreTests:ResolverActivityTest
Test: atest FrameworksCoreTests:ChooserActivityTest
Change-Id: I76fe5663523232a74d4f505c535cd6dbcf7f8759
2022-10-03 22:38:47 -07:00
TreeHugger Robot
5baed8b6f4 Merge "Use @EnforcePermission for IIMM#isInputMethodPickerShownForTest()" 2022-10-04 02:38:54 +00:00
TreeHugger Robot
80c068c107 Merge "Implement TIP3." 2022-10-04 00:23:10 +00:00
Yohei Yukawa
aa29be8dda Use @EnforcePermission for IIMM#isInputMethodPickerShownForTest()
This is a follow up CL to my previous CL [1], which locked down

  IInputMethodManager#isInputMethodPickerShownForTest()

with

  android.Manifest.permission.TEST_INPUT_METHOD

permission.

After the original CL was committed the severity assessment was
performed again and in the updated assessment it was concluded that
denial logging was not necessary.  With that, this CL simplifies the
logic by using

  @EnforcePermission

annotation in the ADIL method definition.

Note that there must be no developer-observable behavior change in
this CL, and the security test that was added as part of the original
effort [2] still verifies that the method in question is indeed
guarded with "TEST_INPUT_METHOD" permission.

 [1]: Ie79a3e9d41ce22605ae083594d639c37d08b7def
      b869c78380
 [2]: Idf907e3b762307696a3a7ca11470b0c44b9b7aa4
      3e1dd9d2797f818766105247e3634da525fec8e8

Bug: 237317525
Test: atest CtsInputMethodTestCases:InputMethodManagerTest#testIsInputMethodPickerShownProtection
Change-Id: Ib3f56b1ab1538742a2bf64fec435ced5b8f90bc2
2022-10-03 15:54:37 -07:00
Kweku Adams
eb17357d8a Implement TIP3.
Use a target background battery drain rate to determine the consumption
limit (stock).

Bug: 249365572
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/tare
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/tare
Test: manually drain device and check calculation as it charges
Change-Id: I85879ed23365c388f2ff179c28973e8a2e72b827
2022-10-03 19:00:39 +00:00
TreeHugger Robot
8c321a708f Merge "Fix imprecise name of a fs-verity helper function" 2022-10-03 16:57:47 +00:00
TreeHugger Robot
21da3fc4ee Merge "Make RemoteInputConnectionImpl package-private" 2022-09-30 03:45:20 +00:00
TreeHugger Robot
7eece43081 Merge "Introduce IMM#setExplicitlyEnabledInputMethodSubtypes()" 2022-09-30 00:24:26 +00:00
TreeHugger Robot
514d86c41c Merge "Replace "implicitlySelectedSubtypes" with "implicitlyEnabledSubtypes"" 2022-09-30 00:17:05 +00:00
Yohei Yukawa
f3023dade4 Make RemoteInputConnectionImpl package-private
This CL mechanically moves RemoteInputConnectionImpl from

  com.android.internal.inputmethod

to

  android.view.inputmethod

just to make it a package-private class, as it is (and should be) used
only by InputMethodManager.

This is a mechanical refactoring.  There must be no developer
observable behavior change in this CL.

Bug: 192412909
Test: presubmit
Change-Id: I2d9bd4a5cb39d506a70331c9c930a74580cdbfa0
2022-09-29 15:38:14 -07:00
Daniel Norman
fda797c958 Adds more OWNERS to a11y FW dirs. am: b6dc971384 am: 4292755d27 am: 2325eb5313 am: e9dd122ce4 am: ce09a229dd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2234907

Change-Id: I2c582e4fe76438d51e99a0b2b1f22319badce3f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 21:48:59 +00:00
Victor Hsieh
0e49df4485 Fix imprecise name of a fs-verity helper function
Root hash is only part of the fs-verity digest covers. Rename to avoid
confusion.

Bug: N/A
Test: m
Change-Id: I12c2a4ac57fb8772483473f951e97474ebd894c9
2022-09-29 14:47:50 -07:00
Daniel Norman
ce09a229dd Adds more OWNERS to a11y FW dirs. am: b6dc971384 am: 4292755d27 am: 2325eb5313 am: e9dd122ce4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2234907

Change-Id: I005464c49af46492ee791c3068ec1e21cdaea18f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 21:18:45 +00:00
Daniel Norman
2325eb5313 Adds more OWNERS to a11y FW dirs. am: b6dc971384 am: 4292755d27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2234907

Change-Id: I9a70dc471223f0cd68bfeaeecdb6c0b6ac033efa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 19:43:37 +00:00
Yohei Yukawa
2b295932df Replace "implicitlySelectedSubtypes" with "implicitlyEnabledSubtypes"
This CL makes it clear on how the following API works by renaming the
second boolean parameter to "implicitlyEnabledSubtypes".

  InputMethodManager#getEnabledInputMethodSubtypeList(
          @Nullable InputMethodInfo, boolean);

The second parameter controls whether the return value must contain
only explicitly enabled subtypes or not.  Hence it is better to be
named as

  "implicitlyEnabledSubtypes"

rather than

  "implicitlySelectedSubtypes".

This is just a mechanical renaming.  The must be no developer
observable behavior change.

Fix: 249648819
Test: presubmit
Change-Id: I7730f644435f4a2e0e88805744a5a43567ddf13b
2022-09-29 11:52:16 -07:00
Yohei Yukawa
82c4baba77 Introduce IMM#setExplicitlyEnabledInputMethodSubtypes()
While it still makes sense to require a user consent when enabling
non-system IMEs, programmatically modifying explicitly enabled
subtypes can be allowed for each IME as long as affected subtypes are
their own.  This is why

  IMM#setExplicitlyEnabledInputMethodSubtypes(String, int[])

is introduced in this CL.  Here are use cases for IME developers.

  * If they like, IME developers can take full control of what
    subtypes are explicitly enabled for their IME, with their own
    settings UI instead of relying on
      InputMethodManager#showInputMethodAndSubtypeEnabler()
    and user interactions.  This also enables IME developers to
    backup and restore enabled subtypes in some cloud services.

  * If IME developers find that
      Settings.Secure.ENABLED_INPUT_METHODS
    contains any invalid subtype hashcode, or they plan to migrate
    some legacy subtype hashcode to a new subtype hashcode, they can
    programmatically fix/migrate it without bothering users.

See also the corresponding end-to-end test in CTS [1].

 [1]: I0d46efb1ec98aaf529e2d531205ccd2cc0261492

Fix: 249110888
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Test: atest FrameworksServicesTests:InputMethodUtilsTest#updateEnabledImeStringTest
Change-Id: I836903dbdb6bc1ff3dc4b99710e4e08a65f59417
2022-09-28 15:38:53 -07:00
Daniel Norman
b6dc971384 Adds more OWNERS to a11y FW dirs.
Bug: n/a
Test: n/a
Change-Id: I1331e89caf4942d2118e644ed3f9710daa66be95
2022-09-28 09:15:49 -07:00
Pablo Gamito
8eb24f5fbd Merge "Dump jank tagging to event log" 2022-09-28 09:05:43 +00:00
Pablo Gamito
04dd9dc8cc Dump jank tagging to event log
Bug: 240648270
Test: N/A
Change-Id: I85b841c2b84031e1455a9cfda939a707141c1203
2022-09-27 16:16:36 +00:00
TreeHugger Robot
6fc7651cdc Merge "Catch unexpected detached view while creating FrameTracker" into tm-qpr-dev am: 05914b98a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20033151

Change-Id: I70f58c963ee1e25a276e88a290d3f6bda3f94c8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 13:44:21 +00:00
TreeHugger Robot
05914b98a4 Merge "Catch unexpected detached view while creating FrameTracker" into tm-qpr-dev 2022-09-27 13:14:43 +00:00
Riddle Hsu
1500550794 Merge "Remove unused pooled lambda methods" 2022-09-27 12:08:31 +00:00
Lan Wei
02d2f81b52 Merge "IMA API InputConnection#replaceText()" 2022-09-27 00:01:06 +00:00
Matt Casey
09daaaf5e2 Copy multi-image editor fix to QPR
Already fixed in master via https://android-review.googlesource.com/c/platform/frameworks/base/+/2049443

This is that change, but in QPR.

Test: Share multiple images from photos, verify that edit button doesn't
      appear.
Bug: 247638926
Merged-In: Id6ce93efacd54a86d870595ae32b4e6efcec0c04
Change-Id: I51b7d332b6b7e59ee559716022d795bb8de4a71c
2022-09-26 20:30:24 +00:00
TreeHugger Robot
e1b8f01e2b Merge "Add Logging of the UI Latency for hotword invocation" into tm-qpr-dev am: 7ca15df236 am: cc6597d2d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20021705

Change-Id: I79c45f77d1ac9c97eaa8f6a8f9318b1d73d40060
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 05:16:51 +00:00
TreeHugger Robot
cc6597d2d1 Merge "Add Logging of the UI Latency for hotword invocation" into tm-qpr-dev am: 7ca15df236
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20021705

Change-Id: Ia09d62f94fb98ef9c0fedaa9cd5b4df58902ddeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 04:18:40 +00:00
Jing Ji
738ac4ca12 Merge "Check the null pointer in ProcStats" into tm-qpr-dev am: 52ef129d27 am: 316c6e8df8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20040059

Change-Id: I636e2d6f3869b7ffed420eaeffb651077f25b137
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 03:53:31 +00:00
TreeHugger Robot
7ca15df236 Merge "Add Logging of the UI Latency for hotword invocation" into tm-qpr-dev 2022-09-24 03:51:17 +00:00
Jing Ji
316c6e8df8 Merge "Check the null pointer in ProcStats" into tm-qpr-dev am: 52ef129d27
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20040059

Change-Id: Ic69c4987f96c0085834105010d621901a24dd9f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 03:21:34 +00:00
Jing Ji
52ef129d27 Merge "Check the null pointer in ProcStats" into tm-qpr-dev 2022-09-24 03:10:28 +00:00
Josh Tsuji
b2f2fa414f Merge "Add jank instrumentation for occlude/unocclude/launcher unlock." into tm-qpr-dev am: 11ffb9c8b4 am: e99749d20b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601329

Change-Id: I5becbcb9d1324ec025b2f153da5e9bffba6df715
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 01:33:05 +00:00
Eun-Jeong Shin
4074a914b9 Merge "Add hyperlink to "Learn more" in device log access dialog" into tm-qpr-dev am: ce1f5634ab am: 9f8c630473
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20029318

Change-Id: Ic69c17e709fb9a9a07944ce3e91f05c1364a9f23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 01:32:21 +00:00
Nicholas Ambur
0cf35e854e Add Logging of the UI Latency for hotword invocation
Log the UI latency with UIActionLatencyReported atom. We plan to
calulate the latency from when the SoundTrigger HAL emits an event to
when the VoiceInteraction system UI view is shown.

Test: device_config put latency_tracker enabled true; verify traces
and latency is logged in WW.
Bug: 247879896

Change-Id: I3edb91691e81f8f23660c0823a6388338fe926ad
2022-09-23 18:13:14 -07:00
Josh Tsuji
e99749d20b Merge "Add jank instrumentation for occlude/unocclude/launcher unlock." into tm-qpr-dev am: 11ffb9c8b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19601329

Change-Id: Iaf8e39aaf62ef5272b43a06b1b76cafe8d8448a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 00:56:55 +00:00
Eun-Jeong Shin
9f8c630473 Merge "Add hyperlink to "Learn more" in device log access dialog" into tm-qpr-dev am: ce1f5634ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20029318

Change-Id: Ied834646b40513958d19633556813d521dfa65b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-24 00:55:22 +00:00
Josh Tsuji
11ffb9c8b4 Merge "Add jank instrumentation for occlude/unocclude/launcher unlock." into tm-qpr-dev 2022-09-24 00:23:28 +00:00
Jing Ji
5ecd71861f Check the null pointer in ProcStats
Bug: 246663534
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Test: atest CtsStatsdHostTestCases
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: Ie39e232970238f44b447467173ae46d4775e6432
2022-09-23 16:47:50 -07:00
Josh Tsuji
64a3f7394a Add jank instrumentation for occlude/unocclude/launcher unlock.
Fixes: 241195239
Test: grab a trace
Change-Id: If9af9aa95ddff26c9baf5101fb5aa45389e532eb
2022-09-23 15:33:52 -04:00
Josh Tsuji
06a8a923de Merge "Enable presubmit for com.android.internal.jank" into tm-qpr-dev-plus-aosp 2022-09-23 19:27:37 +00:00
TreeHugger Robot
db736f39bb Merge "Catch unexpected detached view while creating FrameTracker" 2022-09-23 18:59:24 +00:00
Eun-Jeong Shin
db1ed6fa67 Add hyperlink to "Learn more" in device log access dialog
Add a hyperlink to explain device log access in "Learn more"

Bug: 231437131
Test: GtsVerifier
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: Id7978ee800367f696a8b9ea0d80d0b7e0c2d41eb
2022-09-23 17:30:44 +00:00
Nick Chameyev
9755004796 Merge "[Partial Screensharing] Add initial recents selector UI" into tm-qpr-dev am: 66e9106619 am: d84bec201c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19867406

Change-Id: I555339bc5c939215a7d8604d73bd0264f49f372e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 17:11:27 +00:00
Ahan Wu
830249f303 Catch unexpected detached view while creating FrameTracker
Bug: 245083316
Test: atest FrameTrackerTest InteractionJankMonitorTest
Test: LatencyTrackerTest
Change-Id: I55941c78b7200bd70a4b30a29defc3c8306eead8
Merged-In: I55941c78b7200bd70a4b30a29defc3c8306eead8
2022-09-23 16:48:24 +00:00