* 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.
- Add callbacks to observer service lifecycle events to ServiceConnector.
- Leverage callbacks to avoid re-binding to GameService in order to
send disconnected event
- Leverage callbacks to detect when GameSessionService process dies and
destroy all GameSessions.
Test: Manually verified GameSession overlays are removed when
GameSession process crashes. Added unit test covering behavior.
Bug: 220204229
Bug: 215599171
Change-Id: Idda96f221e40c88f0f80c95bea94556275da5166
In support of sharesheet unbundling:
This code directly accesses private platform config resources
and cannot be used outside of system_server.
This was originally added during the Q->R transition as app
prediction service was ramping up [See b/138595943].
Incorrect versions would cause increased latency in opening
the sharesheet, app prediction missing but no crash.
If there is a problem with AiAi version configuration, that
should be addressed directly and not covered over by silently
disabling functionality.
At this time the package name returned from the system call
PackageManager#getAppPredictionServicePackageName() is passed
through the function "ensureSystemPackage" before being
returned this is sufficient to satisfy and availability checks.
Bug: 220895016
Test: manual; share content from app, verify share targets
Change-Id: I11aebe4fba1d96b543ba89482313668ce55b8ca4
This change fixes a number of interconnected issues in memory safety
(MTE, GWP-ASan, nativeHeapZeroInit) runtime flags.
* Exported services use the hosting app UID to locate the process
definition, and fail 100% of the time. Use the defining app UID and
package name instead.
* Isolated services process name does not match the name in the defining
app manifest, because it includes a class name and an instance number.
Pass the defining process name in HostingRecord to address this.
* Exported service ApplicationInfo.packageName refers to the hosting
app, again. As a result, wrong compat feature overrides are applied.
This has been fixed before for AppZygote services; extend the fix to all
external services.
* Pass correct memory runtimeFlags to WebViewZygote. This is important
because both MTE and GWP-ASan have a one-way disable switch; they are
enabled in the Zygote and disabled in the apps that do not opt-in.
Passing 0 runtimeFlags to WebViewZygote (and AppZygote) makes it
impossible to enable these features later in their child processes.
This change moves runtimeFlags logic from ProcessList to os.Zygote to
make it available to WebViewZygote.
Bug: 208910418
Test: CtsTaggingHostTestCases
Test: atest in frameworks/base
Test: CtsWebkitTestCases
Test: manual install WebView with android:memtagMode tag
Change-Id: I232d35344f4cd34226ff11324421904b35251525
* 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.
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
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)
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
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
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
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
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
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
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