Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc0b7929 authored by Fredrik Ryden's avatar Fredrik Ryden Committed by Josh Yang
Browse files

Initialize compose lifecycle for BiometricPrompt for wear

This adds a flag handled by wear for always initializing the lifecycle
for compose components when adding the biometric prompt UI, since wear
uses a compose based pin pad.

Bug: 414859063
Flag: android.hardware.biometrics.bp_initialize_compose_watch
Test: N/A, code is not changed, only adds an additional flag to an
already available check.
(cherry picked from https://partner-android-review.googlesource.com/q/commit:2d12bb40c59f4fd715e92a747829d5fad99596cb)
Merged-In: I8cb7f86b719bff9c6b4e97408f7899b7f2473e48
Change-Id: I8cb7f86b719bff9c6b4e97408f7899b7f2473e48
parent ef040c1c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -100,3 +100,13 @@ flag {
  description: "This flag is for the integration of Identity Check with Watch"
  bug: "397954948"
}

flag {
  name: "bp_initialize_compose_watch"
  namespace: "wear_frameworks"
  description: "Initialize lifecycle to enable compose to run outside activities"
  bug: "414859063"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ public class AuthContainerView extends LinearLayout
            return;
        }

        if (Flags.bpFallbackOptions()) {
        if (Flags.bpFallbackOptions() || Flags.bpInitializeComposeWatch()) {
            ComposeInitializer.INSTANCE.onAttachedToWindow(this);
        }

@@ -565,7 +565,7 @@ public class AuthContainerView extends LinearLayout
            findOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(mBackCallback);
        }
        super.onDetachedFromWindow();
        if (Flags.bpFallbackOptions()) {
        if (Flags.bpFallbackOptions() || Flags.bpInitializeComposeWatch()) {
            ComposeInitializer.INSTANCE.onDetachedFromWindow(this);
        }
        mWakefulnessLifecycle.removeObserver(this);