Fix invisible security method
Also fixes a bug where notification guts couldn't be launched from
Keyguard.
Bug: 17162095
Change-Id: I50395065e568ca01e837b0540d5edfd8bbd5797a
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
index 66c30c7..55538a7 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
@@ -85,6 +85,7 @@
@Override
public void startAppearAnimation() {
enableClipping(false);
+ setAlpha(1f);
setTranslationY(mAppearAnimationUtils.getStartTranslation());
animate()
.setDuration(500)
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 3b05d11..65c4ce2 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -416,6 +416,7 @@
@Override
public void startAppearAnimation() {
enableClipping(false);
+ setAlpha(1f);
setTranslationY(mAppearAnimationUtils.getStartTranslation());
animate()
.setDuration(500)
@@ -444,7 +445,7 @@
mLockPatternView.clearPattern();
animate()
.alpha(0f)
- .translationY(-100)
+ .translationY(mDisappearYTranslation)
.setInterpolator(AnimationUtils.loadInterpolator(
mContext, android.R.interpolator.fast_out_linear_in))
.setDuration(100)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 3a20b00..b0fd829 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -611,12 +611,35 @@
entry.expandedBig.findViewById(com.android.internal.R.id.media_action_area) != null;
}
- private void startAppNotificationSettingsActivity(String packageName, int appUid) {
- Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
+ private void startAppNotificationSettingsActivity(String packageName, final int appUid) {
+ final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName);
intent.putExtra(Settings.EXTRA_APP_UID, appUid);
- TaskStackBuilder.create(mContext).addNextIntentWithParentStack(intent)
- .startActivities(null, new UserHandle(UserHandle.getUserId(appUid)));
+
+ final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
+ dismissKeyguardThenExecute(new OnDismissAction() {
+ @Override
+ public boolean onDismiss() {
+ AsyncTask.execute(new Runnable() {
+ public void run() {
+ try {
+ if (keyguardShowing) {
+ ActivityManagerNative.getDefault()
+ .keyguardWaitingForActivityDrawn();
+ }
+ TaskStackBuilder.create(mContext)
+ .addNextIntentWithParentStack(intent)
+ .startActivities(null,
+ new UserHandle(UserHandle.getUserId(appUid)));
+ overrideActivityPendingAppTransition(keyguardShowing);
+ } catch (RemoteException e) {
+ }
+ }
+ });
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */);
+ return true;
+ }
+ });
}
protected SwipeHelper.LongPressListener getNotificationLongClicker() {
@@ -1070,14 +1093,7 @@
final int appUidF = appUid;
settingsButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
- dismissKeyguardThenExecute(new OnDismissAction() {
- public boolean onDismiss() {
- startAppNotificationSettingsActivity(pkg, appUidF);
- animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
- visibilityChanged(false);
- return true;
- }
- });
+ startAppNotificationSettingsActivity(pkg, appUidF);
}
});
} else {