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

Commit f8688a0a authored by Kevin Chyn's avatar Kevin Chyn
Browse files

4/n: Rename files to make more sense

Also flatten the directory, there isn't much point in having a sub package
right now.

Bug: 123378871
Test: atest com.android.systemui.biometrics

Change-Id: I598f1909f6e6940d73da37921d9b5cd2c02f4331
parent 2b1d3d8f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
  ~ limitations under the License.
  -->

<com.android.systemui.biometrics.ui.AuthBiometricFaceView
<com.android.systemui.biometrics.AuthBiometricFaceView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/contents"
    android:layout_width="match_parent"
@@ -23,4 +23,4 @@

    <include layout="@layout/auth_biometric_contents"/>

</com.android.systemui.biometrics.ui.AuthBiometricFaceView>
 No newline at end of file
</com.android.systemui.biometrics.AuthBiometricFaceView>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
  ~ 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
  ~ limitations under the License.
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+1 −1
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@
        <item>com.android.systemui.LatencyTester</item>
        <item>com.android.systemui.globalactions.GlobalActionsComponent</item>
        <item>com.android.systemui.ScreenDecorations</item>
        <item>com.android.systemui.biometrics.BiometricDialogImpl</item>
        <item>com.android.systemui.biometrics.AuthController</item>
        <item>com.android.systemui.SliceBroadcastRelayHandler</item>
        <item>com.android.systemui.SizeCompatModeActivityController</item>
        <item>com.android.systemui.statusbar.notification.InstantAppNotifier</item>
+4 −5
Original line number Diff line number Diff line
@@ -11,10 +11,10 @@
 * 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
 * limitations under the License.
 */

package com.android.systemui.biometrics.ui;
package com.android.systemui.biometrics;

import android.content.Context;
import android.graphics.drawable.Animatable2;
@@ -30,7 +30,6 @@ import android.widget.TextView;

import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.R;
import com.android.systemui.biometrics.BiometricDialog;

public class AuthBiometricFaceView extends AuthBiometricView {

@@ -174,7 +173,7 @@ public class AuthBiometricFaceView extends AuthBiometricView {
        mIconController.updateState(mState, newState);

        if (newState == STATE_AUTHENTICATING_ANIMATING_IN ||
                (newState == STATE_AUTHENTICATING && mSize == BiometricDialog.SIZE_MEDIUM)) {
                (newState == STATE_AUTHENTICATING && mSize == AuthDialog.SIZE_MEDIUM)) {
            resetErrorView(mContext, mErrorView);
        }

@@ -184,7 +183,7 @@ public class AuthBiometricFaceView extends AuthBiometricView {

    @Override
    public void onAuthenticationFailed(String failureReason) {
        if (mSize == BiometricDialog.SIZE_MEDIUM) {
        if (mSize == AuthDialog.SIZE_MEDIUM) {
            mTryAgainButton.setVisibility(View.VISIBLE);
            mPositiveButton.setVisibility(View.GONE);
        }
+15 −17
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package com.android.systemui.biometrics.ui;
package com.android.systemui.biometrics;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -37,7 +37,6 @@ import android.widget.TextView;

import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.R;
import com.android.systemui.biometrics.BiometricDialog;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -145,7 +144,7 @@ public abstract class AuthBiometricView extends LinearLayout {
    private AuthPanelController mPanelController;
    private Bundle mBundle;
    private boolean mRequireConfirmation;
    @BiometricDialog.DialogSize int mSize = BiometricDialog.SIZE_UNKNOWN;
    @AuthDialog.DialogSize int mSize = AuthDialog.SIZE_UNKNOWN;

    private TextView mTitleView;
    private TextView mSubtitleView;
@@ -165,7 +164,6 @@ public abstract class AuthBiometricView extends LinearLayout {

    private float mIconOriginalY;

    protected boolean mDialogAnimatedIn;
    protected boolean mDialogSizeAnimating;

    /**
@@ -199,7 +197,7 @@ public abstract class AuthBiometricView extends LinearLayout {
        if (mState == STATE_AUTHENTICATED) {
            Log.w(TAG, "Ignoring background click after authenticated");
            return;
        } else if (mSize == BiometricDialog.SIZE_SMALL) {
        } else if (mSize == AuthDialog.SIZE_SMALL) {
            Log.w(TAG, "Ignoring background click during small dialog");
            return;
        }
@@ -248,9 +246,9 @@ public abstract class AuthBiometricView extends LinearLayout {
    }

    @VisibleForTesting
    void updateSize(@BiometricDialog.DialogSize int newSize) {
    void updateSize(@AuthDialog.DialogSize int newSize) {
        Log.v(TAG, "Current: " + mSize + " New: " + newSize);
        if (newSize == BiometricDialog.SIZE_SMALL) {
        if (newSize == AuthDialog.SIZE_SMALL) {
            mTitleView.setVisibility(View.GONE);
            mSubtitleView.setVisibility(View.GONE);
            mDescriptionView.setVisibility(View.GONE);
@@ -266,7 +264,7 @@ public abstract class AuthBiometricView extends LinearLayout {
                    false /* animate */);

            mSize = newSize;
        } else if (mSize == BiometricDialog.SIZE_SMALL && newSize == BiometricDialog.SIZE_MEDIUM) {
        } else if (mSize == AuthDialog.SIZE_SMALL && newSize == AuthDialog.SIZE_MEDIUM) {
            if (mDialogSizeAnimating) {
                return;
            }
@@ -281,7 +279,7 @@ public abstract class AuthBiometricView extends LinearLayout {

            // Animate the text
            final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(0, 1);
            opacityAnimator.setDuration(BiometricDialog.ANIMATE_DURATION_MS);
            opacityAnimator.setDuration(AuthDialog.ANIMATE_DURATION_MS);
            opacityAnimator.addUpdateListener((animation) -> {
                final float opacity = (float) animation.getAnimatedValue();

@@ -300,7 +298,7 @@ public abstract class AuthBiometricView extends LinearLayout {

            // Choreograph together
            final AnimatorSet as = new AnimatorSet();
            as.setDuration(BiometricDialog.ANIMATE_DURATION_MS);
            as.setDuration(AuthDialog.ANIMATE_DURATION_MS);
            as.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationStart(Animator animation) {
@@ -330,7 +328,7 @@ public abstract class AuthBiometricView extends LinearLayout {
            // Animate the panel
            mPanelController.updateForContentDimensions(mMediumWidth, mMediumHeight,
                    true /* animate */);
        } else if (newSize == BiometricDialog.SIZE_MEDIUM) {
        } else if (newSize == AuthDialog.SIZE_MEDIUM) {
            mPanelController.updateForContentDimensions(mMediumWidth, mMediumHeight,
                    false /* animate */);
            mSize = newSize;
@@ -352,7 +350,7 @@ public abstract class AuthBiometricView extends LinearLayout {
                break;

            case STATE_AUTHENTICATED:
                if (mSize != BiometricDialog.SIZE_SMALL) {
                if (mSize != AuthDialog.SIZE_SMALL) {
                    mPositiveButton.setVisibility(View.GONE);
                    mNegativeButton.setVisibility(View.GONE);
                    mErrorView.setVisibility(View.INVISIBLE);
@@ -372,8 +370,8 @@ public abstract class AuthBiometricView extends LinearLayout {
                break;

            case STATE_ERROR:
                if (mSize == BiometricDialog.SIZE_SMALL) {
                    updateSize(BiometricDialog.SIZE_MEDIUM);
                if (mSize == AuthDialog.SIZE_SMALL) {
                    updateSize(AuthDialog.SIZE_MEDIUM);
                }
                break;

@@ -404,7 +402,7 @@ public abstract class AuthBiometricView extends LinearLayout {
    }

    public void onHelp(String help) {
        if (mSize != BiometricDialog.SIZE_MEDIUM) {
        if (mSize != AuthDialog.SIZE_MEDIUM) {
            return;
        }
        showTemporaryMessage(help, mResetHelpRunnable);
@@ -528,8 +526,8 @@ public abstract class AuthBiometricView extends LinearLayout {
        // only care about the initial icon position.
        if (mIconOriginalY == 0) {
            mIconOriginalY = mIconView.getY();
            updateSize(mRequireConfirmation ? BiometricDialog.SIZE_MEDIUM
                    : BiometricDialog.SIZE_SMALL);
            updateSize(mRequireConfirmation ? AuthDialog.SIZE_MEDIUM
                    : AuthDialog.SIZE_SMALL);
        }
    }
}
Loading