Loading packages/SystemUI/src/com/android/systemui/recents/Recents.java +51 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import android.view.Display; import android.view.View; Loading Loading @@ -193,6 +194,12 @@ public class Recents extends SystemUI */ @Override public void showRecents(boolean triggeredFromAltTab, View statusBarView) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_SHOW_RECENTS)) { return; } Loading Loading @@ -222,6 +229,12 @@ public class Recents extends SystemUI */ @Override public void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_HIDE_RECENTS)) { return; } Loading Loading @@ -251,6 +264,12 @@ public class Recents extends SystemUI */ @Override public void toggleRecents(Display display, int layoutDirection, View statusBarView) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_TOGGLE_RECENTS)) { return; } Loading Loading @@ -280,6 +299,12 @@ public class Recents extends SystemUI */ @Override public void preloadRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.preloadRecents(); Loading @@ -302,6 +327,12 @@ public class Recents extends SystemUI @Override public void cancelPreloadingRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.cancelPreloadingRecents(); Loading Loading @@ -329,11 +360,23 @@ public class Recents extends SystemUI @Override public void showNextAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } mImpl.showNextAffiliatedTask(); } @Override public void showPrevAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } mImpl.showPrevAffiliatedTask(); } Loading Loading @@ -455,6 +498,14 @@ public class Recents extends SystemUI mOnConnectRunnables.clear(); } /** * @return whether this device is provisioned. */ private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0; } /** * Attempts to proxy the following action to the override recents package. * @return whether the proxying was successful Loading Loading
packages/SystemUI/src/com/android/systemui/recents/Recents.java +51 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.IBinder; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.util.Log; import android.view.Display; import android.view.View; Loading Loading @@ -193,6 +194,12 @@ public class Recents extends SystemUI */ @Override public void showRecents(boolean triggeredFromAltTab, View statusBarView) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_SHOW_RECENTS)) { return; } Loading Loading @@ -222,6 +229,12 @@ public class Recents extends SystemUI */ @Override public void hideRecents(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_HIDE_RECENTS)) { return; } Loading Loading @@ -251,6 +264,12 @@ public class Recents extends SystemUI */ @Override public void toggleRecents(Display display, int layoutDirection, View statusBarView) { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } if (proxyToOverridePackage(ACTION_TOGGLE_RECENTS)) { return; } Loading Loading @@ -280,6 +299,12 @@ public class Recents extends SystemUI */ @Override public void preloadRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.preloadRecents(); Loading @@ -302,6 +327,12 @@ public class Recents extends SystemUI @Override public void cancelPreloadingRecents() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } int currentUser = sSystemServicesProxy.getCurrentUser(); if (sSystemServicesProxy.isSystemUser(currentUser)) { mImpl.cancelPreloadingRecents(); Loading Loading @@ -329,11 +360,23 @@ public class Recents extends SystemUI @Override public void showNextAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } mImpl.showNextAffiliatedTask(); } @Override public void showPrevAffiliatedTask() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isDeviceProvisioned()) { return; } mImpl.showPrevAffiliatedTask(); } Loading Loading @@ -455,6 +498,14 @@ public class Recents extends SystemUI mOnConnectRunnables.clear(); } /** * @return whether this device is provisioned. */ private boolean isDeviceProvisioned() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0; } /** * Attempts to proxy the following action to the override recents package. * @return whether the proxying was successful Loading