Loading packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +10 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; import android.content.res.Configuration; import android.os.Bundle; import android.os.Process; Loading Loading @@ -81,7 +80,9 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { super(); if (!isSubprocess()) { Trace.registerWithPerfetto(); } Log.v(TAG, "SystemUIApplication constructed."); // SysUI may be building without protolog preprocessing in some cases ProtoLog.REQUIRE_PROTOLOGTOOL = false; Loading Loading @@ -182,9 +183,7 @@ public class SystemUIApplication extends Application implements } else { // We don't need to startServices for sub-process that is doing some tasks. // (screenshots, sweetsweetdesserts or tuner ..) String processName = ActivityThread.currentProcessName(); ApplicationInfo info = getApplicationInfo(); if (processName != null && processName.startsWith(info.processName + ":")) { if (isSubprocess()) { return; } // For a secondary user, boot-completed will never be called because it has already Loading @@ -195,6 +194,12 @@ public class SystemUIApplication extends Application implements } } /** Returns whether this is a subprocess (e.g. com.android.systemui:screenshot) */ private boolean isSubprocess() { String processName = ActivityThread.currentProcessName(); return processName != null && processName.contains(":"); } /** * Makes sure that all the CoreStartables are running. If they are already running, this is a * no-op. This is needed to conditionally start all the services, as we only need to have it in Loading Loading
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +10 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; import android.content.res.Configuration; import android.os.Bundle; import android.os.Process; Loading Loading @@ -81,7 +80,9 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { super(); if (!isSubprocess()) { Trace.registerWithPerfetto(); } Log.v(TAG, "SystemUIApplication constructed."); // SysUI may be building without protolog preprocessing in some cases ProtoLog.REQUIRE_PROTOLOGTOOL = false; Loading Loading @@ -182,9 +183,7 @@ public class SystemUIApplication extends Application implements } else { // We don't need to startServices for sub-process that is doing some tasks. // (screenshots, sweetsweetdesserts or tuner ..) String processName = ActivityThread.currentProcessName(); ApplicationInfo info = getApplicationInfo(); if (processName != null && processName.startsWith(info.processName + ":")) { if (isSubprocess()) { return; } // For a secondary user, boot-completed will never be called because it has already Loading @@ -195,6 +194,12 @@ public class SystemUIApplication extends Application implements } } /** Returns whether this is a subprocess (e.g. com.android.systemui:screenshot) */ private boolean isSubprocess() { String processName = ActivityThread.currentProcessName(); return processName != null && processName.contains(":"); } /** * Makes sure that all the CoreStartables are running. If they are already running, this is a * no-op. This is needed to conditionally start all the services, as we only need to have it in Loading