Commit Graph

18199 Commits

Author SHA1 Message Date
Joe Bolinger
532df4fc03 Merge changes from topic "coex-again-2" into tm-dev
* changes:
  Temporarily disable some biometric prompt tests.
  Add Face and Fingerprint (Co-Ex) support to biometric prompt.
  Remove face to fingerprint multi-sensor behavior.
  Remove duplicated UDFPS view into single fingerprint view.
2022-03-01 23:25:55 +00:00
Andrei-Valentin Onea
b486a6b6c6 Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94 am: 8ceedbd375 am: a5098729ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: I70b0ba1012990edb184db0e7362635b4e0533cd6
2022-03-01 16:34:12 +00:00
Andrei-Valentin Onea
a5098729ea Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94 am: 8ceedbd375
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: Ida1d994bb0f24f7a8f83bf1fef47d41457b243d1
2022-03-01 16:13:12 +00:00
Rhed Jao
6bd95fdfb4 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d am: e7be86fd15
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: Iff9caa4a49a55f47ef785466ba29f355a569593e
2022-03-01 16:13:04 +00:00
Pedro Loureiro
2367227297 Rename updatable-library to apex-library am: 1df9a1e8f5 am: be595a1cb7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I89d0a4a0ef490a8bc8d9bd41c346aece4e1df58e
2022-03-01 16:13:00 +00:00
Pedro Loureiro
c19d3ed957 Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9 am: 7936aaf92e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I7ae71734b45022e40403df1f1ec7d4290fb61d76
2022-03-01 16:12:58 +00:00
Alex Buynytskyy
56ab2afd2c Create XML parser only once. am: 66fc1f1941 am: 1adacbf9d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

Change-Id: I0fce88538388f7105653e20c66a7b78cecc490ad
2022-03-01 16:12:55 +00:00
Andrei-Valentin Onea
8ceedbd375 Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: Ia43268fea619a0af6a39aef79cc52ed67e92ee99
2022-03-01 15:51:43 +00:00
Rhed Jao
e7be86fd15 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: I63155e278047882b33af00e349d2a7a32099655c
2022-03-01 15:51:38 +00:00
Pedro Loureiro
be595a1cb7 Rename updatable-library to apex-library am: 1df9a1e8f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I559fecd56edbc4fcf1047bb8ab9ec029e515e17f
2022-03-01 15:51:31 +00:00
Pedro Loureiro
7936aaf92e Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I2255f2357f4786cb8931e83cb007a2818a3ba720
2022-03-01 15:51:26 +00:00
Alex Buynytskyy
1adacbf9d7 Create XML parser only once. am: 66fc1f1941
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

Change-Id: I83e8a593a251300aee1fa8d6d9002d22eabf6fc8
2022-03-01 15:51:14 +00:00
Andrei-Valentin Onea
a22612eb94 Merge changes from topic "ignore-vendor-apex-allowlists"
* changes:
  Ignore vendor apex priv-app permission allowlists
  Add test for parsing apex allowlists
  Ignore prebuilt shared library if it doesn't exist on device
  Rename updatable-library to apex-library
  Parse new xml attributes used for updatable shared libraries
  Create XML parser only once.
2022-03-01 15:15:56 +00:00
Joe Bolinger
4f75555ac1 Add Face and Fingerprint (Co-Ex) support to biometric prompt.
Migrate simple views to Kotlin & remove useless test. Will add new tests in a follow up change.

Bug: 217393533
Test: atest com.android.systemui.biometrics com.android.server.biometrics CommandQueueTest
Test: manual (via BP test app)
Change-Id: Ic8c80344d75f34f4b5f65ef14b61bbb5cddb0349
2022-02-28 18:37:19 -08:00
Treehugger Robot
cdeb61ebb7 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71 am: a80c2cd027
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I38f4a3f9f523fc2a59c0dd9569870c0a7de7379f
2022-02-25 14:35:25 +00:00
Treehugger Robot
a80c2cd027 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I90d1b85718c49e772107724aea59155dbe0bf8d1
2022-02-25 14:10:46 +00:00
Treehugger Robot
990ac01f71 Merge "Add a runtime check to ensure that system server jars are prefetched." 2022-02-25 13:44:34 +00:00
Jiakai Zhang
8db9757f08 Add a runtime check to ensure that system server jars are prefetched.
We prefetch standalone system server jars in ZygoteInit based on the
STANDALONE_SYSTEMSERVER_JARS environment variable, so that they can take
the advantage of AOT compilation. This CL adds a check to disallow jars
that are not prefetched, which reminds developers to make appropriate
changes so that their jars will be in the environment variable.

Bug: 203198541
Test: 1. Build a system image.
  2. The device boots.
Test: 1. Remove an entry from PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
  2. Build a system image.
  3. The device does not boot and encounters the following error:
     java.lang.RuntimeException: Creating a ClassLoader from /apex/com.android.wifi/javalib/service-wifi.jar is not allowed. Please make sure that the jar is listed in `PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in the Makefile and added as a `standalone_contents` of a `systemserverclasspath_fragment` in `Android.bp`.
Change-Id: I275d75ac37194a4d8fd491529b7cdb697dc04e37
Merged-In: I275d75ac37194a4d8fd491529b7cdb697dc04e37
(cherry picked from commit 418ab8212c)
2022-02-24 16:21:28 +00:00
Jiakai Zhang
4f04a08fef Merge "Add a runtime check to ensure that system server jars are prefetched." into tm-dev 2022-02-24 16:10:43 +00:00
Pat Manning
80c4b33ddf Merge "Removing 'override' from nav bar mode APIs." into tm-dev 2022-02-24 15:44:35 +00:00
Joshua Trask
0c82ed90fa Remove system call to "headless" unbundled chooser
The behavior of proxying through a headless implementation of
the unbundled component was left over from an earlier stage of
the migration ("phase 2" of go/sharesheet-unbundling-phases).

This headless use is no longer supported in the unbundled
component, and it seems that some users are triggering this
code path even when unbundling is disabled -- resulting in
displaying both the "legacy" (system-side) UI and then, when
a share target is selected, the new unbundled UI (which is
no longer "headless").

Bug: 213348070
Change-Id: I146b42e9624d795cfa6689b6a417778ae912d8b5
Test: manual verification of crash fix, atest ChooserActivityTest
2022-02-23 19:21:09 +00:00
Pat Manning
5342b3d416 Removing 'override' from nav bar mode APIs.
Bug: 217668440
Test: StatusBarManagerTest.java, StatusBarManagerServiceTest.java
Change-Id: I1c5fa5f5d564a78e3abaf1457a105d5e8c6402b9
2022-02-23 10:46:25 +00:00
Xiaowen Lei
8d50e04afc Merge "Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager." into tm-dev 2022-02-23 06:43:49 +00:00
TreeHugger Robot
24637529b6 Merge "Improve Cast dialog styles" into tm-dev 2022-02-22 16:22:02 +00:00
Bernardo Rufino
854cd54abd Merge "Add safer Bundle APIs and deprecated old ones" am: c5589d2c92 am: ce09bba3fc am: aed366dc04
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1988908

Change-Id: I684471f938a4400fae3309ad2c9759d808075aea
2022-02-22 14:31:52 +00:00
Bernardo Rufino
aed366dc04 Merge "Add safer Bundle APIs and deprecated old ones" am: c5589d2c92 am: ce09bba3fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1988908

Change-Id: I2f821d9de45980035ae3b4f36d83b36ad859568e
2022-02-22 14:10:52 +00:00
Bernardo Rufino
ce09bba3fc Merge "Add safer Bundle APIs and deprecated old ones" am: c5589d2c92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1988908

Change-Id: Iadab8b0106bf99b9c6fbdeca6cc020e1d909ae1a
2022-02-22 13:50:00 +00:00
Jiakai Zhang
418ab8212c Add a runtime check to ensure that system server jars are prefetched.
We prefetch standalone system server jars in ZygoteInit based on the
STANDALONE_SYSTEMSERVER_JARS environment variable, so that they can take
the advantage of AOT compilation. This CL adds a check to disallow jars
that are not prefetched, which reminds developers to make appropriate
changes so that their jars will be in the environment variable.

Bug: 203198541
Test: 1. Build a system image.
  2. The device boots.
Test: 1. Remove an entry from PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
  2. Build a system image.
  3. The device does not boot and encounters the following error:
     java.lang.RuntimeException: Creating a ClassLoader from /apex/com.android.wifi/javalib/service-wifi.jar is not allowed. Please make sure that the jar is listed in `PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in the Makefile and added as a `standalone_contents` of a `systemserverclasspath_fragment` in `Android.bp`.
Change-Id: I275d75ac37194a4d8fd491529b7cdb697dc04e37
2022-02-21 20:28:32 +00:00
Jordan Demeulenaere
b587411e0d Improve Cast dialog styles
This CL applies the SystemUI dialog theme to the Cast dialog. See
b/202264918#comment20 for before/after screenshots.

Bug: 202264918
Test: Manual
Change-Id: Ic20df867177986a6a73617dd9141e4d091651b5b
(cherry picked from commit b8310b0dec)
Merged-In: Ic20df867177986a6a73617dd9141e4d091651b5b
2022-02-21 13:43:02 +01:00
Bernardo Rufino
cccb1b78d9 Add safer Bundle APIs and deprecated old ones
Add safer Bundle APIs that take an extra Class<T> argument that checks
that the type about to be deserialized is a child of the type passed in
parameter *before* actually deserializing it, while also deprecating old
APIs.

This allows use to reap the benefits of the new typed Parcel APIs and
enhances security.

Only the APIs that could involve custom object injection are modified.
So, besides the obvious ones that have that design (eg.
readParcelableList()), subtler cases such as readIntegerArrayList()
could result in custom object deserialization, and since it's all
generics, even the casting inside Bundle wouldn't fail, only after the
client unpacked the list items would it blow up. Now those are checked
beforehand.

Since Bundle always calls Parcel.readValue() under the hood (instead of
specialized APIs such as readParcelable() etc), we had to augment that
method (that's used by LazyValue when retrieving the item) to accept
item types now for containers, which I implemented as a vararg of
Class<?> parameters (this is all private/@hide). This way we could
retrieve a list of intents like readValue(.., List.class, Intent.class),
or a map of string to intents like readValue(.., Map.class,
String.class, Intent.class). For non-container items, we can just pass
no arguments for the vararg. This is explained in internal javadocs.

Inside readValue() now, we also check the container types before
calling the internal methods for deserialization. So, if the thing on
the wire is a VAL_MAP and we know the method we're about to call will
return a HashMap, we verify that the type passed in parameter is a super
type of that (if it's non-null, if it's null it means "perform no
check").

Now, LazyValue became a BiFunction<Class<?>, Class<?>[], Object> to
receive those extra "item types" for containers. The reason for
separating the first from the rest is that the first defines the return
type in the new APIs and inside Parcel, so we need the T from Class<T>
to ensure type-safety.

(I was torn here between using BiFunction or just exposing LazyValue as
@hide for Bundle since it feels like we're missing meaning/abstraction,
but end up leaving this way, advise if you'd prefer the other way)

There was a bit of a refactor in Parcel so readValue() could call
internal methods that accepted nullable Class<?> parameters with the
meaning that null = "no verification"  and non-null = "check against
type provided" (because the external APIs all require non-null
parameters).

Now we can return null in all cases when there is a type mismatch. Note
that the Bundle APIs catch ClassCastException to return null, but that
only works for non-generic types (eg. getSizeF()). For generic types
wrapping "return (T) o" with try-catch doesn't work because the type
gets erased to its bound at runtime, so the type mismatch escapes that
try-catch to the caller, potentially causing a crash. Now they happen
inside the getters, as the non-generic ones.

Test: Boots for now
Test: Working on CTS
Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
CTS-Coverage-Bug: 219980813
Change-Id: Ifcbeb34b4684d7de105756b9d414162a9205ffaa
2022-02-19 14:10:29 +00:00
Xiaowen Lei
a650c2c4b7 Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager.
Bug: 216630470
CTS-Coverage-Bug: 220371902
Test: manual
Test: atest CtsAppTestCases:KeyguardLockedStateApiTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
not yet publicly announced.

Change-Id: I1f44ec6799b0f74791613389ce28aadf84c9fe5c
2022-02-19 03:48:40 +00:00
Yohei Yukawa
a4a6960b62 Fix NPE when IMM#invalidateInput() is called too early
This is a follow up CL to my previous CL [1], which introduced

  InputMethodManager#invalidateInput(View).

One thing I overlooked is that apps may call that API even before

  InputMethodManager#mCurrentInputMethodSession,

which results in a NullPointerException.

With this CL, such a case will be gracefully fallen back into

  InputMethodManager#restartInput(View)

like other cases when IMM#invalidateInput() is not available.

 [1]: I3161755779080f98bcef0e47dd0c5247d8a3a256
      daa6695c2e

Fix: 213350732
Test: atest CtsInputMethodTestCases:InputMethodStartInputLifecycleTest
Change-Id: I67458494b3069498a1395e3278f6a975e821e610
2022-02-18 12:05:15 -08:00
TreeHugger Robot
5585ad36b0 Merge "Defer the instrument of AOD transition per doze amount" 2022-02-17 12:42:59 +00:00
Ady Abraham
171380fd37 Merge "Correct JankData.PREDICTION_ERROR meaning" 2022-02-17 02:12:43 +00:00
Abodunrinwa Toki
62599cbdcc Merge "Ensure that TextViewActivityTest still pass for the new system toolbar." 2022-02-17 01:10:21 +00:00
Steve Elliott
ba790ec0e9 Merge "Defer MessagingGroup#recycle until bind completes" 2022-02-16 17:26:15 +00:00
BK Choi
1ccbddadfb Merge "Fix the infinite loop bug for AndroidFuture.ThenCombine." 2022-02-16 16:01:46 +00:00
Oli Lan
9807b6350f Merge "Increase default user icon size." 2022-02-16 15:50:00 +00:00
Ahan Wu
c60451d094 Defer the instrument of AOD transition per doze amount
When the doze changes, StatusBar#updateDozing will be invoked at the
first frame, usually make the following one be regarded as janky,
but it is unperceptible by the users, so ignore it.

Bug: 201987244
Test: Capture the trace manually
Change-Id: Iac739d23eb0fdc988bd52076bdccca4665e28d18
2022-02-16 19:55:24 +08:00
Marcin Oczeretko
b548b1a38d Merge "Change PerfettoTrigger throttling to be per trigger name" 2022-02-16 11:40:46 +00:00
Ady Abraham
e4a9000b03 Correct JankData.PREDICTION_ERROR meaning
JankData.PREDICTION_ERROR is asserted when SF vsync calculation
is incorrect and should be attributed to SF missed frames.

Bug: 211763914
Test: SF unit tests
Change-Id: I332480ad1017c220501ed938319f8b2fbfe22826
2022-02-15 15:06:45 -08:00
Nicolò Mazzucato
fc5f85a892 Merge "Avoid binder transaction to WM for lock orientation" 2022-02-15 22:09:40 +00:00
Marcin Oczeretko
6c5c8abcd8 Change PerfettoTrigger throttling to be per trigger name
This is to allow us to collect more representative traces even if one of
the triggers is invoked more frequently than other.

Increased the throttling to be 5min per trigger name

Bug: 213920740
Test: manual - flashed and checked logcat
Change-Id: I078c640cc1e72c4ce8641b047fc90eb13bc8f2a4
2022-02-15 15:43:27 +00:00
Nicolo' Mazzucato
8fa312bb67 Avoid binder transaction to WM for lock orientation
When rotation happened during a change of screen (e.g. on foldable devices), getRotationLockOrientation was blocked by a wm binder call to get the display size. wm was holding the lock while changing display power state. This cl removes this dependency.

Bug: 197515205
Test: Manual
Change-Id: I950e80289ea0f385bcaedf052d393ac7a23a14c6
2022-02-15 12:33:44 +01:00
Steve Elliott
2a68270c76 Defer MessagingGroup#recycle until bind completes
There is a "race condition" where a MessagingGroup is recycled while the
contents of that group are being used elsewhere in the
ConversationLayout, namely in the "image message container" used to show
the most recent image message in the collapsed state.

This state isn't cleared until later in the bind() process, which
unfortunately depends on the groups being updated. For that reason, we
defer all synchronous calls to recycle() until the end of bind(), which
will ensure that the old groups are still around as long as necessary.

Fixes: 212689920
Test: manual
Change-Id: Idef815d54690544615512bd2bd1006f172403e18
2022-02-15 00:18:13 -05:00
Badhri Jagan Sridharan
9c80283f83 Convert @UsbDataStatus into bit field flags.
getUsbDataStatus now returns bit field values of @UsbDataStatus.

Also renaming from USB_DATA_STATUS_* to DATA_STATUS_* based on
review comments.

Bug: 216640242
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I96ade3dd7041a4094e57907069a872909a62e72f
2022-02-15 03:17:46 +00:00
Evan Rosky
33cfda6944 Merge "Add ability for sysui/featureflags to restart android" 2022-02-14 20:49:12 +00:00
Xin Li
2b87be68b8 Merge SP2A.220305.012
Bug: 219523960
Merged-In: I748fdd49626acaa0e986a9d8038039cada6faa60
Change-Id: I67693156d705f2488fe18149d2dd02d529f009ff
2022-02-14 20:06:38 +00:00
Felipe Leme
865dc828f5 Merge "Final (?!?!?!) improvements on Activity.dump()" 2022-02-14 19:28:29 +00:00
bkchoi
052cba1feb Fix the infinite loop bug for AndroidFuture.ThenCombine.
The bug was found and fixed in
android.car.util.concurrent.AndroidFuture. The same fix is being
duplicated from commit 9dcaf6862035676b2574e92cb72cba67ff0a879b.

Bug: 218377773

Test: atest com.android.internal.infra.AndroidFutureTest

Change-Id: I1e13d512a449a7330c74ed06f6afd90e3c4f9493
2022-02-14 10:30:33 -08:00