Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e44934f authored by Winson Chung's avatar Winson Chung
Browse files

Fixing issue where we were responding to SCREEN_OFF and going home even if...

Fixing issue where we were responding to SCREEN_OFF and going home even if Recents was not visible. (Bug 16204632)

Change-Id: Id29d4190f63bfa3986d15975418f47a3a79fcb83
parent 5f90bccd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        public void run() {
            // Mark Recents as no longer visible
            AlternateRecentsComponent.notifyVisibilityChanged(false);
            mVisible = false;
            // Finish Recents
            if (mLaunchIntent != null) {
                if (mLaunchOpts != null) {
@@ -170,7 +171,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (action.equals(Intent.ACTION_SCREEN_OFF)) {
            if (action.equals(Intent.ACTION_SCREEN_OFF) && mVisible) {
                mFinishLaunchHomeRunnable.run();
            } else if (action.equals(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED)) {
                // Refresh the search widget
@@ -518,8 +519,6 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        if (mConfig.searchBarAppWidgetId >= 0) {
            mAppWidgetHost.stopListening();
        }

        mVisible = false;
    }

    @Override
@@ -641,6 +640,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
    public void onTaskViewClicked() {
        // Mark recents as no longer visible
        AlternateRecentsComponent.notifyVisibilityChanged(false);
        mVisible = false;
    }

    @Override