Loading packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +45 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.os.Handler; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -239,6 +240,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Shows the Recents. */ @ProxyFromPrimaryToCurrentUser public void onShowRecents(boolean triggeredFromAltTab) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { showRecents(triggeredFromAltTab); } else { Loading @@ -261,6 +268,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Hides the Recents. */ @ProxyFromPrimaryToCurrentUser public void onHideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { hideRecents(triggeredFromAltTab, triggeredFromHomeKey); } else { Loading @@ -287,6 +300,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Toggles the Recents activity. */ @ProxyFromPrimaryToCurrentUser public void onToggleRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { toggleRecents(); } else { Loading @@ -308,6 +327,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Preloads info for the Recents activity. */ @ProxyFromPrimaryToCurrentUser public void onPreloadRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { preloadRecents(); } else { Loading Loading @@ -400,10 +425,22 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta } public void onShowNextAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } showRelativeAffiliatedTask(true); } public void onShowPrevAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } showRelativeAffiliatedTask(false); } Loading Loading @@ -746,6 +783,14 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta return plan; } /** * @return whether this device is provisioned. */ private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0; } /**** OnAnimationStartedListener Implementation ****/ @Override Loading Loading
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +45 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.os.Handler; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; Loading Loading @@ -239,6 +240,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Shows the Recents. */ @ProxyFromPrimaryToCurrentUser public void onShowRecents(boolean triggeredFromAltTab) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { showRecents(triggeredFromAltTab); } else { Loading @@ -261,6 +268,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Hides the Recents. */ @ProxyFromPrimaryToCurrentUser public void onHideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { hideRecents(triggeredFromAltTab, triggeredFromHomeKey); } else { Loading @@ -287,6 +300,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Toggles the Recents activity. */ @ProxyFromPrimaryToCurrentUser public void onToggleRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { toggleRecents(); } else { Loading @@ -308,6 +327,12 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta /** Preloads info for the Recents activity. */ @ProxyFromPrimaryToCurrentUser public void onPreloadRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (mSystemServicesProxy.isForegroundUserOwner()) { preloadRecents(); } else { Loading Loading @@ -400,10 +425,22 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta } public void onShowNextAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } showRelativeAffiliatedTask(true); } public void onShowPrevAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } showRelativeAffiliatedTask(false); } Loading Loading @@ -746,6 +783,14 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta return plan; } /** * @return whether this device is provisioned. */ private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0; } /**** OnAnimationStartedListener Implementation ****/ @Override Loading