Loading packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -204,7 +204,7 @@ public class SystemUIApplication extends Application implements */ */ public void startSystemUserServicesIfNeeded() { public void startSystemUserServicesIfNeeded() { if (!mProcessWrapper.isSystemUser()) { if (!shouldStartSystemUserServices()) { Log.wtf(TAG, "Tried starting SystemUser services on non-SystemUser"); Log.wtf(TAG, "Tried starting SystemUser services on non-SystemUser"); return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. } } Loading @@ -227,7 +227,7 @@ public class SystemUIApplication extends Application implements * <p>This method must only be called from the main thread.</p> * <p>This method must only be called from the main thread.</p> */ */ void startSecondaryUserServicesIfNeeded() { void startSecondaryUserServicesIfNeeded() { if (mProcessWrapper.isSystemUser()) { if (!shouldStartSecondaryUserServices()) { return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. } } // Sort the startables so that we get a deterministic ordering. // Sort the startables so that we get a deterministic ordering. Loading @@ -238,6 +238,14 @@ public class SystemUIApplication extends Application implements sortedStartables, "StartSecondaryServices", null); sortedStartables, "StartSecondaryServices", null); } } protected boolean shouldStartSystemUserServices() { return mProcessWrapper.isSystemUser(); } protected boolean shouldStartSecondaryUserServices() { return !mProcessWrapper.isSystemUser(); } private void startServicesIfNeeded( private void startServicesIfNeeded( Map<Class<?>, Provider<CoreStartable>> startables, Map<Class<?>, Provider<CoreStartable>> startables, String metricsPrefix, String metricsPrefix, Loading Loading
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -204,7 +204,7 @@ public class SystemUIApplication extends Application implements */ */ public void startSystemUserServicesIfNeeded() { public void startSystemUserServicesIfNeeded() { if (!mProcessWrapper.isSystemUser()) { if (!shouldStartSystemUserServices()) { Log.wtf(TAG, "Tried starting SystemUser services on non-SystemUser"); Log.wtf(TAG, "Tried starting SystemUser services on non-SystemUser"); return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. } } Loading @@ -227,7 +227,7 @@ public class SystemUIApplication extends Application implements * <p>This method must only be called from the main thread.</p> * <p>This method must only be called from the main thread.</p> */ */ void startSecondaryUserServicesIfNeeded() { void startSecondaryUserServicesIfNeeded() { if (mProcessWrapper.isSystemUser()) { if (!shouldStartSecondaryUserServices()) { return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. return; // Per-user startables are handled in #startSystemUserServicesIfNeeded. } } // Sort the startables so that we get a deterministic ordering. // Sort the startables so that we get a deterministic ordering. Loading @@ -238,6 +238,14 @@ public class SystemUIApplication extends Application implements sortedStartables, "StartSecondaryServices", null); sortedStartables, "StartSecondaryServices", null); } } protected boolean shouldStartSystemUserServices() { return mProcessWrapper.isSystemUser(); } protected boolean shouldStartSecondaryUserServices() { return !mProcessWrapper.isSystemUser(); } private void startServicesIfNeeded( private void startServicesIfNeeded( Map<Class<?>, Provider<CoreStartable>> startables, Map<Class<?>, Provider<CoreStartable>> startables, String metricsPrefix, String metricsPrefix, Loading