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

Unverified Commit 9566dc54 authored by Michael Bestas's avatar Michael Bestas Committed by Michael Bestas
Browse files

Revert "udfps: Implement default udfps display mode provider"

Replaced by AOSP implementation

This reverts commit aee4be2e.

Change-Id: Ib7485a5b366360aba67aed97c7e2ca71003aa02c
parent fbb73c79
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -10,9 +10,6 @@
}
-keep class * extends com.android.systemui.CoreStartable
-keep class * implements com.android.systemui.CoreStartable$Injector
-keep class * implements com.android.systemui.biometrics.UdfpsDisplayModeProvider {
    public <init>(...);
}

# Needed for builds to properly initialize KeyFrames from xml scene
-keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
+0 −3
Original line number Diff line number Diff line
@@ -25,9 +25,6 @@
         causes a poor experience. -->
    <bool name="config_fingerprintWakeAndUnlock">true</bool>

    <!-- Udfps display mode provider class name -->
    <string name="config_udfpsDisplayModeProviderComponent">com.android.systemui.biometrics.DummyUdfpsDisplayModeProvider</string>

    <!-- Color of the UDFPS pressed view -->
    <color name="config_udfpsColor">#ffffffff</color>

+0 −32
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.biometrics

import android.content.Context
import android.view.Surface

class DummyUdfpsDisplayModeProvider constructor(
    private val context: Context
): UdfpsDisplayModeProvider {
    override fun enable(onEnabled: Runnable?) {
        onEnabled?.run()
    }

    override fun disable(onDisabled: Runnable?) {
        onDisabled?.run()
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ public class UdfpsController implements DozeReceiver {
            @NonNull VibratorHelper vibrator,
            @NonNull UdfpsHapticsSimulator udfpsHapticsSimulator,
            @NonNull UdfpsShell udfpsShell,
            @NonNull UdfpsDisplayModeProvider udfpsDisplayMode,
            @NonNull Optional<UdfpsDisplayModeProvider> udfpsDisplayMode,
            @NonNull KeyguardStateController keyguardStateController,
            @NonNull DisplayManager displayManager,
            @Main Handler mainHandler,
@@ -626,7 +626,7 @@ public class UdfpsController implements DozeReceiver {
        mPowerManager = powerManager;
        mAccessibilityManager = accessibilityManager;
        mLockscreenShadeTransitionController = lockscreenShadeTransitionController;
        mUdfpsDisplayMode = udfpsDisplayMode;
        mUdfpsDisplayMode = udfpsDisplayMode.orElse(null);
        screenLifecycle.addObserver(mScreenObserver);
        mScreenOn = screenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_ON;
        mConfigurationController = configurationController;
+2 −12
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ import com.android.systemui.util.time.SystemClock;
import com.android.systemui.util.time.SystemClockImpl;
import com.android.systemui.wallet.dagger.WalletModule;
import com.android.systemui.wmshell.BubblesManager;
import com.android.systemui.R;
import com.android.wm.shell.bubbles.Bubbles;

import java.util.Optional;
@@ -199,17 +198,8 @@ public abstract class SystemUIModule {
    @BindsOptionalOf
    abstract CentralSurfaces optionalCentralSurfaces();

    @Provides
    static UdfpsDisplayModeProvider getUdfpsDisplayModeProvider(Context context) {
        String className = context.getString(R.string.config_udfpsDisplayModeProviderComponent);
        try {
            Class<?> clazz = context.getClassLoader().loadClass(className);
            return (UdfpsDisplayModeProvider) clazz.getDeclaredConstructor(
                    new Class[] { Context.class }).newInstance(context);
        } catch (Throwable t) {
            throw new RuntimeException("Error loading UdfpsDisplayModeProvider " + className, t);
        }
    }
    @BindsOptionalOf
    abstract UdfpsDisplayModeProvider optionalUdfpsDisplayModeProvider();

    @BindsOptionalOf
    abstract AlternateUdfpsTouchProvider optionalUdfpsTouchProvider();