am 7109aad6: Merge "Fix issue where recents would not show up sometimes" into jb-mr1-dev
* commit '7109aad6a17dbf8a4292477671b60f155effab38': Fix issue where recents would not show up sometimes
This commit is contained in:
@@ -33,6 +33,7 @@ import com.android.systemui.statusbar.tablet.StatusBarPanel;
|
|||||||
public class RecentsActivity extends Activity {
|
public class RecentsActivity extends Activity {
|
||||||
public static final String TOGGLE_RECENTS_INTENT = "com.android.systemui.TOGGLE_RECENTS";
|
public static final String TOGGLE_RECENTS_INTENT = "com.android.systemui.TOGGLE_RECENTS";
|
||||||
public static final String CLOSE_RECENTS_INTENT = "com.android.systemui.CLOSE_RECENTS";
|
public static final String CLOSE_RECENTS_INTENT = "com.android.systemui.CLOSE_RECENTS";
|
||||||
|
private static final String WAS_SHOWING = "was_showing";
|
||||||
|
|
||||||
private RecentsPanelView mRecentsPanel;
|
private RecentsPanelView mRecentsPanel;
|
||||||
private IntentFilter mIntentFilter;
|
private IntentFilter mIntentFilter;
|
||||||
@@ -139,13 +140,21 @@ public class RecentsActivity extends Activity {
|
|||||||
mRecentsPanel.setMinSwipeAlpha(
|
mRecentsPanel.setMinSwipeAlpha(
|
||||||
getResources().getInteger(R.integer.config_recent_item_min_alpha) / 100f);
|
getResources().getInteger(R.integer.config_recent_item_min_alpha) / 100f);
|
||||||
|
|
||||||
handleIntent(getIntent());
|
if (savedInstanceState == null ||
|
||||||
|
savedInstanceState.getBoolean(WAS_SHOWING)) {
|
||||||
|
handleIntent(getIntent());
|
||||||
|
}
|
||||||
mIntentFilter = new IntentFilter();
|
mIntentFilter = new IntentFilter();
|
||||||
mIntentFilter.addAction(CLOSE_RECENTS_INTENT);
|
mIntentFilter.addAction(CLOSE_RECENTS_INTENT);
|
||||||
registerReceiver(mIntentReceiver, mIntentFilter);
|
registerReceiver(mIntentReceiver, mIntentFilter);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
|
outState.putBoolean(WAS_SHOWING, mRecentsPanel.isShowing());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
final SystemUIApplication app = (SystemUIApplication) getApplication();
|
final SystemUIApplication app = (SystemUIApplication) getApplication();
|
||||||
@@ -165,7 +174,7 @@ public class RecentsActivity extends Activity {
|
|||||||
|
|
||||||
if (TOGGLE_RECENTS_INTENT.equals(intent.getAction())) {
|
if (TOGGLE_RECENTS_INTENT.equals(intent.getAction())) {
|
||||||
if (mRecentsPanel != null) {
|
if (mRecentsPanel != null) {
|
||||||
if (mRecentsPanel.isShowing() && mForeground) {
|
if (mRecentsPanel.isShowing()) {
|
||||||
dismissAndGoBack();
|
dismissAndGoBack();
|
||||||
} else {
|
} else {
|
||||||
final SystemUIApplication app = (SystemUIApplication) getApplication();
|
final SystemUIApplication app = (SystemUIApplication) getApplication();
|
||||||
|
|||||||
Reference in New Issue
Block a user