summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java2
-rw-r--r--packages/Keyguard/res/layout/keyguard_password_view.xml1
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java16
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java52
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java33
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java2
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/animation/AppearAnimationUtils.java66
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java3
17 files changed, 163 insertions, 77 deletions
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index a489f94..0fe5509 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -56,7 +56,7 @@ import java.util.Random;
public class CaptivePortalLoginActivity extends Activity {
private static final String TAG = "CaptivePortalLogin";
- private static final String DEFAULT_SERVER = "connectivitycheck.android.com";
+ private static final String DEFAULT_SERVER = "connectivitycheck.gstatic.com";
private static final int SOCKET_TIMEOUT_MS = 10000;
private enum Result { DISMISSED, UNWANTED, WANTED_AS_IS };
diff --git a/packages/Keyguard/res/layout/keyguard_password_view.xml b/packages/Keyguard/res/layout/keyguard_password_view.xml
index 7dcaf6d..7d45017 100644
--- a/packages/Keyguard/res/layout/keyguard_password_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_password_view.xml
@@ -57,6 +57,7 @@
android:textSize="16sp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:imeOptions="flagForceAscii|actionDone"
+ android:maxLength="500"
/>
<ImageView android:id="@+id/switch_ime_button"
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
index d265e0d..4abb795 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
@@ -16,8 +16,12 @@
package com.android.keyguard;
+import android.animation.Animator;
+import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
+import android.view.RenderNode;
+import android.view.RenderNodeAnimator;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
@@ -114,10 +118,8 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
enableClipping(false);
setAlpha(1f);
setTranslationY(mAppearAnimationUtils.getStartTranslation());
- animate()
- .setDuration(500)
- .setInterpolator(mAppearAnimationUtils.getInterpolator())
- .translationY(0);
+ AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 500 /* duration */,
+ 0, mAppearAnimationUtils.getInterpolator());
mAppearAnimationUtils.startAnimation2d(mViews,
new Runnable() {
@Override
@@ -131,10 +133,8 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
public boolean startDisappearAnimation(final Runnable finishRunnable) {
enableClipping(false);
setTranslationY(0);
- animate()
- .setDuration(280)
- .setInterpolator(mDisappearAnimationUtils.getInterpolator())
- .translationY(mDisappearYTranslation);
+ AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 280 /* duration */,
+ mDisappearYTranslation, mDisappearAnimationUtils.getInterpolator());
mDisappearAnimationUtils.startAnimation2d(mViews,
new Runnable() {
@Override
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 3568429..b000e26 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -17,6 +17,7 @@ package com.android.keyguard;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
+import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Rect;
@@ -27,6 +28,7 @@ import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
+import android.view.RenderNodeAnimator;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
@@ -334,10 +336,8 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
enableClipping(false);
setAlpha(1f);
setTranslationY(mAppearAnimationUtils.getStartTranslation());
- animate()
- .setDuration(500)
- .setInterpolator(mAppearAnimationUtils.getInterpolator())
- .translationY(0);
+ AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 500 /* duration */,
+ 0, mAppearAnimationUtils.getInterpolator());
mAppearAnimationUtils.startAnimation2d(
mLockPatternView.getCellStates(),
new Runnable() {
@@ -362,10 +362,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
mLockPatternView.clearPattern();
enableClipping(false);
setTranslationY(0);
- animate()
- .setDuration(300)
- .setInterpolator(mDisappearAnimationUtils.getInterpolator())
- .translationY(-mDisappearAnimationUtils.getStartTranslation());
+ AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 300 /* duration */,
+ -mDisappearAnimationUtils.getStartTranslation(),
+ mDisappearAnimationUtils.getInterpolator());
mDisappearAnimationUtils.startAnimation2d(mLockPatternView.getCellStates(),
new Runnable() {
@Override
@@ -398,43 +397,16 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
long duration, float translationY, final boolean appearing,
Interpolator interpolator,
final Runnable finishListener) {
- if (appearing) {
- animatedCell.scale = 0.0f;
- animatedCell.alpha = 1.0f;
- }
- animatedCell.translateY = appearing ? translationY : 0;
- ValueAnimator animator = ValueAnimator.ofFloat(animatedCell.translateY,
- appearing ? 0 : translationY);
- animator.setInterpolator(interpolator);
- animator.setDuration(duration);
- animator.setStartDelay(delay);
- animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- float animatedFraction = animation.getAnimatedFraction();
- if (appearing) {
- animatedCell.scale = animatedFraction;
- } else {
- animatedCell.alpha = 1 - animatedFraction;
- }
- animatedCell.translateY = (float) animation.getAnimatedValue();
- mLockPatternView.invalidate();
- }
- });
+ mLockPatternView.startCellStateAnimation(animatedCell,
+ 1f, appearing ? 1f : 0f, /* alpha */
+ appearing ? translationY : 0f, appearing ? 0f : translationY, /* translation */
+ appearing ? 0f : 1f, 1f /* scale */,
+ delay, duration, interpolator, finishListener);
if (finishListener != null) {
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- finishListener.run();
- }
- });
-
// Also animate the Emergency call
mAppearAnimationUtils.createAnimation(mEcaView, delay, duration, translationY,
appearing, interpolator, null);
}
- animator.start();
- mLockPatternView.invalidate();
}
@Override
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index b098258..ec185eb 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -111,7 +111,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
private static final int MSG_DEVICE_PROVISIONED = 308;
private static final int MSG_DPM_STATE_CHANGED = 309;
private static final int MSG_USER_SWITCHING = 310;
- private static final int MSG_KEYGUARD_VISIBILITY_CHANGED = 312;
+ private static final int MSG_KEYGUARD_VISIBILITY_CHANGED = 311;
+ private static final int MSG_KEYGUARD_RESET = 312;
private static final int MSG_BOOT_COMPLETED = 313;
private static final int MSG_USER_SWITCH_COMPLETE = 314;
private static final int MSG_USER_INFO_CHANGED = 317;
@@ -135,6 +136,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
private boolean mKeyguardIsVisible;
private boolean mBouncer;
private boolean mBootCompleted;
+ private boolean mUserHasAuthenticatedSinceBoot;
// Device provisioning state
private boolean mDeviceProvisioned;
@@ -194,6 +196,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
case MSG_KEYGUARD_VISIBILITY_CHANGED:
handleKeyguardVisibilityChanged(msg.arg1);
break;
+ case MSG_KEYGUARD_RESET:
+ handleKeyguardReset();
+ break;
case MSG_KEYGUARD_BOUNCER_CHANGED:
handleKeyguardBouncerChanged(msg.arg1);
break;
@@ -497,7 +502,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
public boolean getUserCanSkipBouncer(int userId) {
- return getUserHasTrust(userId) || mUserFingerprintAuthenticated.get(userId);
+ return getUserHasTrust(userId) || (mUserFingerprintAuthenticated.get(userId)
+ && isUnlockingWithFingerprintAllowed());
}
public boolean getUserHasTrust(int userId) {
@@ -508,6 +514,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
return mUserTrustIsManaged.get(userId) && !isTrustDisabled(userId);
}
+ public boolean isUnlockingWithFingerprintAllowed() {
+ return mUserHasAuthenticatedSinceBoot;
+ }
+
static class DisplayClientState {
public int clientGeneration;
public boolean clearing;
@@ -867,14 +877,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
private boolean shouldListenForFingerprint() {
- return mKeyguardIsVisible && !mSwitchingUser
- && mTrustManager.hasUserAuthenticatedSinceBoot(ActivityManager.getCurrentUser());
+ return mKeyguardIsVisible && !mSwitchingUser;
}
private void startListeningForFingerprint() {
if (DEBUG) Log.v(TAG, "startListeningForFingerprint()");
int userId = ActivityManager.getCurrentUser();
if (isUnlockWithFingerPrintPossible(userId)) {
+ mUserHasAuthenticatedSinceBoot = mTrustManager.hasUserAuthenticatedSinceBoot(
+ ActivityManager.getCurrentUser());
if (mFingerprintCancelSignal != null) {
mFingerprintCancelSignal.cancel();
}
@@ -1168,6 +1179,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
/**
+ * Handle {@link #MSG_KEYGUARD_RESET}
+ */
+ private void handleKeyguardReset() {
+ if (DEBUG) Log.d(TAG, "handleKeyguardReset");
+ if (!isUnlockingWithFingerprintAllowed()) {
+ updateFingerprintListeningState();
+ }
+ }
+
+ /**
* Handle {@link #MSG_KEYGUARD_BOUNCER_CHANGED}
* @see #sendKeyguardBouncerChanged(boolean)
*/
@@ -1274,6 +1295,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
message.sendToTarget();
}
+ public void sendKeyguardReset() {
+ mHandler.obtainMessage(MSG_KEYGUARD_RESET).sendToTarget();
+ }
+
/**
* @see #handleKeyguardBouncerChanged(int)
*/
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index 3c5dae3..6baa4b3 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -679,7 +679,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat
if (resolvedActivities.get(0).activityInfo.exported) {
intent.putExtra(PrintService.EXTRA_PRINT_JOB_INFO, mPrintJob);
intent.putExtra(PrintService.EXTRA_PRINTER_INFO, printer);
- intent.putExtra(PrintService.EXTRA_PRINT_JOB_INFO,
+ intent.putExtra(PrintService.EXTRA_PRINT_DOCUMENT_INFO,
mPrintedDocument.getDocumentInfo().info);
// This is external activity and may not be there.
diff --git a/packages/SettingsLib/src/com/android/settingslib/animation/AppearAnimationUtils.java b/packages/SettingsLib/src/com/android/settingslib/animation/AppearAnimationUtils.java
index 441474d..df76125 100644
--- a/packages/SettingsLib/src/com/android/settingslib/animation/AppearAnimationUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/animation/AppearAnimationUtils.java
@@ -16,11 +16,18 @@
package com.android.settingslib.animation;
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
import android.content.Context;
+import android.view.RenderNodeAnimator;
import android.view.View;
+import android.view.ViewPropertyAnimator;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
+import com.android.internal.widget.LockPatternView;
import com.android.settingslib.R;
/**
@@ -174,24 +181,63 @@ public class AppearAnimationUtils implements AppearAnimationCreator<View> {
}
@Override
- public void createAnimation(View view, long delay, long duration, float translationY,
- boolean appearing, Interpolator interpolator, Runnable endRunnable) {
+ public void createAnimation(final View view, long delay, long duration, float translationY,
+ boolean appearing, Interpolator interpolator, final Runnable endRunnable) {
if (view != null) {
view.setAlpha(appearing ? 0f : 1.0f);
view.setTranslationY(appearing ? translationY : 0);
- view.animate()
- .alpha(appearing ? 1f : 0f)
- .translationY(appearing ? 0 : translationY)
- .setInterpolator(interpolator)
- .setDuration(duration)
- .setStartDelay(delay);
+ Animator alphaAnim;
+ float targetAlpha = appearing ? 1f : 0f;
+ if (view.isHardwareAccelerated()) {
+ RenderNodeAnimator alphaAnimRt = new RenderNodeAnimator(RenderNodeAnimator.ALPHA,
+ targetAlpha);
+ alphaAnimRt.setTarget(view);
+ alphaAnim = alphaAnimRt;
+ } else {
+ alphaAnim = ObjectAnimator.ofFloat(view, View.ALPHA, view.getAlpha(), targetAlpha);
+ }
+ alphaAnim.setInterpolator(interpolator);
+ alphaAnim.setDuration(duration);
+ alphaAnim.setStartDelay(delay);
if (view.hasOverlappingRendering()) {
- view.animate().withLayer();
+ view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ alphaAnim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ view.setLayerType(View.LAYER_TYPE_NONE, null);
+ }
+ });
}
if (endRunnable != null) {
- view.animate().withEndAction(endRunnable);
+ alphaAnim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ endRunnable.run();
+ }
+ });
}
+ alphaAnim.start();
+ startTranslationYAnimation(view, delay, duration, appearing ? 0 : translationY,
+ interpolator);
+ }
+ }
+
+ public static void startTranslationYAnimation(View view, long delay, long duration,
+ float endTranslationY, Interpolator interpolator) {
+ Animator translationAnim;
+ if (view.isHardwareAccelerated()) {
+ RenderNodeAnimator translationAnimRt = new RenderNodeAnimator(
+ RenderNodeAnimator.TRANSLATION_Y, endTranslationY);
+ translationAnimRt.setTarget(view);
+ translationAnim = translationAnimRt;
+ } else {
+ translationAnim = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y,
+ view.getTranslationY(), endTranslationY);
}
+ translationAnim.setInterpolator(interpolator);
+ translationAnim.setDuration(duration);
+ translationAnim.setStartDelay(delay);
+ translationAnim.start();
}
public class AppearAnimationProperties {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index c01a485..7d72dab 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -460,13 +460,20 @@ public class KeyguardViewMediator extends SystemUI {
@Override
public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) {
+ boolean unlockingWithFingerprintAllowed =
+ mUpdateMonitor.isUnlockingWithFingerprintAllowed();
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
- mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
+ if (unlockingWithFingerprintAllowed) {
+ mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
+ }
} else {
- if (wakeAndUnlocking) {
+ if (wakeAndUnlocking && unlockingWithFingerprintAllowed) {
mWakeAndUnlocking = true;
keyguardDone(true, true);
} else {
+ if (wakeAndUnlocking) {
+ mStatusBarKeyguardViewManager.notifyScreenWakeUpRequested();
+ }
mStatusBarKeyguardViewManager.animateCollapsePanels(
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index a2e6632..41b37b0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1837,7 +1837,7 @@ public abstract class BaseStatusBar extends SystemUI implements
logUpdate(entry, n);
}
boolean applyInPlace = shouldApplyInPlace(entry, n);
- boolean shouldInterrupt = shouldInterrupt(entry);
+ boolean shouldInterrupt = shouldInterrupt(entry, notification);
boolean alertAgain = alertAgain(entry, n);
entry.notification = notification;
@@ -2009,7 +2009,10 @@ public abstract class BaseStatusBar extends SystemUI implements
}
protected boolean shouldInterrupt(Entry entry) {
- StatusBarNotification sbn = entry.notification;
+ return shouldInterrupt(entry, entry.notification);
+ }
+
+ protected boolean shouldInterrupt(Entry entry, StatusBarNotification sbn) {
if (mNotificationData.shouldFilterOut(sbn)) {
if (DEBUG) {
Log.d(TAG, "Skipping HUN check for " + sbn.getKey() + " since it's filtered out.");
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 4558288..7c08efc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -659,6 +659,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
@Override
public void onFingerprintHelp(int msgId, String helpString) {
+ if (!KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed()) {
+ return;
+ }
mLockIcon.setTransientFpError(true);
mIndicationController.showTransientIndication(helpString,
getResources().getColor(R.color.system_warning_color, null));
@@ -668,6 +671,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
@Override
public void onFingerprintError(int msgId, String errString) {
+ if (!KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed()) {
+ return;
+ }
// TODO: Go to bouncer if this is "too many attempts" (lockout) error.
mIndicationController.showTransientIndication(errString,
getResources().getColor(R.color.system_warning_color, null));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index 9e2ce15..d93f7c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -224,13 +224,14 @@ public class LockIcon extends KeyguardAffordanceView {
}
private int getState() {
- boolean fingerprintRunning =
- KeyguardUpdateMonitor.getInstance(mContext).isFingerprintDetectionRunning();
+ KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
+ boolean fingerprintRunning = updateMonitor.isFingerprintDetectionRunning();
+ boolean unlockingAllowed = updateMonitor.isUnlockingWithFingerprintAllowed();
if (mUnlockMethodCache.canSkipBouncer()) {
return STATE_LOCK_OPEN;
} else if (mTransientFpError) {
return STATE_FINGERPRINT_ERROR;
- } else if (fingerprintRunning) {
+ } else if (fingerprintRunning && unlockingAllowed) {
return STATE_FINGERPRINT;
} else if (mUnlockMethodCache.isFaceUnlockRunning()) {
return STATE_FACE_UNLOCK;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 03bdf97..56e3032 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -26,11 +26,13 @@ import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.MathUtils;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
+import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.accessibility.AccessibilityEvent;
@@ -42,6 +44,7 @@ import android.widget.TextView;
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardStatusView;
+import com.android.systemui.DejankUtils;
import com.android.systemui.EventLogConstants;
import com.android.systemui.EventLogTags;
import com.android.systemui.R;
@@ -79,6 +82,8 @@ public class NotificationPanelView extends PanelView implements
private static final String COUNTER_PANEL_OPEN_QS = "panel_open_qs";
private static final String COUNTER_PANEL_OPEN_PEEK = "panel_open_peek";
+ private static final Rect mDummyDirtyRect = new Rect(0, 0, 1, 1);
+
public static final long DOZE_ANIMATION_DURATION = 700;
private KeyguardAffordanceHelper mAfforanceHelper;
@@ -1777,7 +1782,22 @@ public class NotificationPanelView extends PanelView implements
mIsExpanding = false;
mScrollYOverride = -1;
if (isFullyCollapsed()) {
- setListening(false);
+ DejankUtils.postAfterTraversal(new Runnable() {
+ @Override
+ public void run() {
+ setListening(false);
+ }
+ });
+
+ // Workaround b/22639032: Make sure we invalidate something because else RenderThread
+ // thinks we are actually drawing a frame put in reality we don't, so RT doesn't go
+ // ahead with rendering and we jank.
+ postOnAnimation(new Runnable() {
+ @Override
+ public void run() {
+ getParent().invalidateChild(NotificationPanelView.this, mDummyDirtyRect);
+ }
+ });
} else {
setListening(true);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index fb940d2..dfce170 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3163,9 +3163,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
@Override
public boolean shouldDisableNavbarGestures() {
- return !isDeviceProvisioned()
- || mExpandedVisible
- || (mDisabled1 & StatusBarManager.DISABLE_SEARCH) != 0;
+ return !isDeviceProvisioned() || (mDisabled1 & StatusBarManager.DISABLE_SEARCH) != 0;
}
public void postStartActivityDismissingKeyguard(final Intent intent, int delay) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 5d58cd0..7ee47df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -789,7 +789,9 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
mQsDetailHeader.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- detail.setToggleState(!mQsDetailHeaderSwitch.isChecked());
+ boolean checked = !mQsDetailHeaderSwitch.isChecked();
+ mQsDetailHeaderSwitch.setChecked(checked);
+ detail.setToggleState(checked);
}
});
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index e622144..6b3a59d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -150,6 +150,7 @@ public class StatusBarKeyguardViewManager {
} else {
showBouncerOrKeyguard();
}
+ KeyguardUpdateMonitor.getInstance(mContext).sendKeyguardReset();
updateStates();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
index f31311d..c8c45e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
@@ -133,6 +133,9 @@ public class UnlockMethodCache {
@Override
public void onFingerprintAuthenticated(int userId, boolean wakeAndUnlocking) {
+ if (!mKeyguardUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
+ return;
+ }
update(false /* updateAlways */);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 82224d4..13e9b16 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -25,6 +25,7 @@ import android.telephony.SignalStrength;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
@@ -389,7 +390,7 @@ public class MobileSignalController extends SignalController<
}
// Fill in the network name if we think we have it.
if (mCurrentState.networkName == mNetworkNameDefault && mServiceState != null
- && mServiceState.getOperatorAlphaShort() != null) {
+ && !TextUtils.isEmpty(mServiceState.getOperatorAlphaShort())) {
mCurrentState.networkName = mServiceState.getOperatorAlphaShort();
}