Revert "Saving and restoring current page when rotating in lockscreen. (Bug 7568412)"
This reverts commit 6cbc2e81742039969e081a9eed02060fb8789e25.
This commit is contained in:
@@ -80,7 +80,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
private boolean mEnableFallback; // TODO: This should get the value from KeyguardPatternView
|
private boolean mEnableFallback; // TODO: This should get the value from KeyguardPatternView
|
||||||
private SecurityMode mCurrentSecuritySelection = SecurityMode.Invalid;
|
private SecurityMode mCurrentSecuritySelection = SecurityMode.Invalid;
|
||||||
private int mAppWidgetToShow;
|
private int mAppWidgetToShow;
|
||||||
private int mPreviousWidgetPage = -1;
|
|
||||||
|
|
||||||
private boolean mCheckAppWidgetConsistencyOnBootCompleted = false;
|
private boolean mCheckAppWidgetConsistencyOnBootCompleted = false;
|
||||||
private boolean mCleanupAppWidgetsOnBootCompleted = false;
|
private boolean mCleanupAppWidgetsOnBootCompleted = false;
|
||||||
@@ -913,7 +912,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
|
|
||||||
public void clearAppWidgetToShow() {
|
public void clearAppWidgetToShow() {
|
||||||
mAppWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
mAppWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
||||||
mPreviousWidgetPage = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1301,22 +1299,10 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
showAppropriateWidgetPage();
|
showAppropriateWidgetPage();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Runnable mOnRestoreUpdatePageRunnable = new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
mSwitchPageRunnable.run();
|
|
||||||
|
|
||||||
// We need to update the alpha's of the hints and content after setting the current page
|
|
||||||
mViewStateManager.showUsabilityHints();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static class SavedState extends BaseSavedState {
|
static class SavedState extends BaseSavedState {
|
||||||
int transportState;
|
int transportState;
|
||||||
int appWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
int appWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
||||||
// Note the appWidgetContainerPage is only used if the appWidgetToShow is invalid
|
|
||||||
int appWidgetContainerPage = -1;
|
|
||||||
|
|
||||||
SavedState(Parcelable superState) {
|
SavedState(Parcelable superState) {
|
||||||
super(superState);
|
super(superState);
|
||||||
@@ -1326,7 +1312,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
super(in);
|
super(in);
|
||||||
this.transportState = in.readInt();
|
this.transportState = in.readInt();
|
||||||
this.appWidgetToShow = in.readInt();
|
this.appWidgetToShow = in.readInt();
|
||||||
this.appWidgetContainerPage = in.readInt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1334,7 +1319,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
super.writeToParcel(out, flags);
|
super.writeToParcel(out, flags);
|
||||||
out.writeInt(this.transportState);
|
out.writeInt(this.transportState);
|
||||||
out.writeInt(this.appWidgetToShow);
|
out.writeInt(this.appWidgetToShow);
|
||||||
out.writeInt(this.appWidgetContainerPage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<SavedState> CREATOR
|
public static final Parcelable.Creator<SavedState> CREATOR
|
||||||
@@ -1356,7 +1340,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
SavedState ss = new SavedState(superState);
|
SavedState ss = new SavedState(superState);
|
||||||
ss.transportState = mViewStateManager.getTransportState();
|
ss.transportState = mViewStateManager.getTransportState();
|
||||||
ss.appWidgetToShow = mAppWidgetToShow;
|
ss.appWidgetToShow = mAppWidgetToShow;
|
||||||
ss.appWidgetContainerPage = mAppWidgetContainer.getCurrentPage();
|
|
||||||
return ss;
|
return ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1371,8 +1354,7 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
super.onRestoreInstanceState(ss.getSuperState());
|
super.onRestoreInstanceState(ss.getSuperState());
|
||||||
mViewStateManager.setTransportState(ss.transportState);
|
mViewStateManager.setTransportState(ss.transportState);
|
||||||
mAppWidgetToShow = ss.appWidgetToShow;
|
mAppWidgetToShow = ss.appWidgetToShow;
|
||||||
mPreviousWidgetPage = ss.appWidgetContainerPage;
|
post(mSwitchPageRunnable);
|
||||||
post(mOnRestoreUpdatePageRunnable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1429,9 +1411,6 @@ public class KeyguardHostView extends KeyguardViewBase {
|
|||||||
}
|
}
|
||||||
mAppWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
mAppWidgetToShow = AppWidgetManager.INVALID_APPWIDGET_ID;
|
||||||
}
|
}
|
||||||
if (mPreviousWidgetPage > -1) {
|
|
||||||
return mPreviousWidgetPage;
|
|
||||||
}
|
|
||||||
// if music playing, show transport
|
// if music playing, show transport
|
||||||
if (isMusicPlaying) {
|
if (isMusicPlaying) {
|
||||||
if (DEBUG) Log.d(TAG, "Music playing, show transport");
|
if (DEBUG) Log.d(TAG, "Music playing, show transport");
|
||||||
|
|||||||
Reference in New Issue
Block a user