diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index 6e4a69bc1188..764397b93881 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -31,6 +31,7 @@ import android.os.Handler; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; +import android.provider.Settings.Secure; import android.util.Log; import android.view.KeyEvent; import android.view.View; @@ -42,7 +43,6 @@ import android.view.WindowManager.LayoutParams; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.MetricsProto.MetricsEvent; import com.android.systemui.Interpolators; -import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.recents.events.EventBus; import com.android.systemui.recents.events.activity.CancelEnterRecentsWindowAnimationEvent; @@ -179,8 +179,10 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD // is still valid. Otherwise, we need to reset the lastStackactiveTime to the // currentTime and remove the old tasks in between which would not be previously // visible, but currently would be in the new currentTime - long oldLastStackActiveTime = Prefs.getLong(RecentsActivity.this, - Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1); + int currentUser = SystemServicesProxy.getInstance(RecentsActivity.this) + .getCurrentUser(); + long oldLastStackActiveTime = Settings.Secure.getLongForUser(getContentResolver(), + Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, -1, currentUser); if (oldLastStackActiveTime != -1) { long currentTime = System.currentTimeMillis(); if (currentTime < oldLastStackActiveTime) { @@ -198,8 +200,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD Recents.getSystemServices().removeTask(task.persistentId); } } - Prefs.putLong(RecentsActivity.this, - Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, currentTime); + Settings.Secure.putLongForUser(RecentsActivity.this.getContentResolver(), + Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, currentTime, currentUser); } } } @@ -825,8 +827,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD Recents.getTaskLoader().dump(prefix, writer); String id = Integer.toHexString(System.identityHashCode(this)); - long lastStackActiveTime = Prefs.getLong(this, - Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, -1); + long lastStackActiveTime = Settings.Secure.getLongForUser(getContentResolver(), + Secure.OVERVIEW_LAST_STACK_ACTIVE_TIME, -1, + SystemServicesProxy.getInstance(this).getCurrentUser()); writer.print(prefix); writer.print(TAG); writer.print(" visible="); writer.print(mIsVisible ? "Y" : "N"); |