Merge "Fix UDFPS not working when a HUN is showing" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb4a25f6df
@@ -111,7 +111,7 @@ abstract class UdfpsAnimationView extends FrameLayout {
|
|||||||
return (int) ((1 - percent) * 255);
|
return (int) ((1 - percent) * 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onExpansionChanged(float expansion, boolean expanded) {
|
public void onExpansionChanged(float expansion) {
|
||||||
mAlpha = expansionToAlpha(expansion);
|
mAlpha = expansionToAlpha(expansion);
|
||||||
updateAlpha();
|
updateAlpha();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ abstract class UdfpsAnimationViewController<T extends UdfpsAnimationView>
|
|||||||
@NonNull final PanelExpansionStateManager mPanelExpansionStateManager;
|
@NonNull final PanelExpansionStateManager mPanelExpansionStateManager;
|
||||||
@NonNull final DumpManager mDumpManger;
|
@NonNull final DumpManager mDumpManger;
|
||||||
|
|
||||||
boolean mNotificationShadeExpanded;
|
boolean mNotificationShadeVisible;
|
||||||
|
|
||||||
protected UdfpsAnimationViewController(
|
protected UdfpsAnimationViewController(
|
||||||
T view,
|
T view,
|
||||||
@@ -85,7 +85,7 @@ abstract class UdfpsAnimationViewController<T extends UdfpsAnimationView>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||||
pw.println("mNotificationShadeExpanded=" + mNotificationShadeExpanded);
|
pw.println("mNotificationShadeVisible=" + mNotificationShadeVisible);
|
||||||
pw.println("shouldPauseAuth()=" + shouldPauseAuth());
|
pw.println("shouldPauseAuth()=" + shouldPauseAuth());
|
||||||
pw.println("isPauseAuth=" + mView.isPauseAuth());
|
pw.println("isPauseAuth=" + mView.isPauseAuth());
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ abstract class UdfpsAnimationViewController<T extends UdfpsAnimationView>
|
|||||||
* authentication.
|
* authentication.
|
||||||
*/
|
*/
|
||||||
boolean shouldPauseAuth() {
|
boolean shouldPauseAuth() {
|
||||||
return mNotificationShadeExpanded;
|
return mNotificationShadeVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -182,8 +182,10 @@ abstract class UdfpsAnimationViewController<T extends UdfpsAnimationView>
|
|||||||
@Override
|
@Override
|
||||||
public void onPanelExpansionChanged(
|
public void onPanelExpansionChanged(
|
||||||
float fraction, boolean expanded, boolean tracking) {
|
float fraction, boolean expanded, boolean tracking) {
|
||||||
mNotificationShadeExpanded = expanded;
|
// Notification shade can be expanded but not visible (fraction: 0.0), for example
|
||||||
mView.onExpansionChanged(fraction, expanded);
|
// when a heads-up notification (HUN) is showing.
|
||||||
|
mNotificationShadeVisible = expanded && fraction > 0f;
|
||||||
|
mView.onExpansionChanged(fraction);
|
||||||
updatePauseAuth();
|
updatePauseAuth();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mUdfpsRequested && !mNotificationShadeExpanded
|
if (mUdfpsRequested && !mNotificationShadeVisible
|
||||||
&& (!mIsBouncerVisible
|
&& (!mIsBouncerVisible
|
||||||
|| mInputBouncerHiddenAmount != KeyguardBouncer.EXPANSION_VISIBLE)) {
|
|| mInputBouncerHiddenAmount != KeyguardBouncer.EXPANSION_VISIBLE)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user