Loading services/core/java/com/android/server/am/ActivityManagerService.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -549,6 +549,11 @@ public class ActivityManagerService extends IActivityManager.Stub // Whether we should use SCHED_FIFO for UI and RenderThreads. // Whether we should use SCHED_FIFO for UI and RenderThreads. boolean mUseFifoUiScheduling = false; boolean mUseFifoUiScheduling = false; // Use an offload queue for long broadcasts, e.g. BOOT_COMPLETED. // For simplicity, since we statically declare the size of the array of BroadcastQueues, // we still create this new offload queue, but never ever put anything on it. boolean mEnableOffloadQueue; BroadcastQueue mFgBroadcastQueue; BroadcastQueue mFgBroadcastQueue; BroadcastQueue mBgBroadcastQueue; BroadcastQueue mBgBroadcastQueue; BroadcastQueue mOffloadBroadcastQueue; BroadcastQueue mOffloadBroadcastQueue; Loading Loading @@ -2283,6 +2288,9 @@ public class ActivityManagerService extends IActivityManager.Stub // by default, no "slow" policy in this queue // by default, no "slow" policy in this queue offloadConstants.SLOW_TIME = Integer.MAX_VALUE; offloadConstants.SLOW_TIME = Integer.MAX_VALUE; mEnableOffloadQueue = SystemProperties.getBoolean( "persist.device_config.activity_manager_native_boot.offload_queue_enabled", false); mFgBroadcastQueue = new BroadcastQueue(this, mHandler, mFgBroadcastQueue = new BroadcastQueue(this, mHandler, "foreground", foreConstants, false); "foreground", foreConstants, false); mBgBroadcastQueue = new BroadcastQueue(this, mHandler, mBgBroadcastQueue = new BroadcastQueue(this, mHandler, Loading Loading @@ -18389,6 +18397,6 @@ public class ActivityManagerService extends IActivityManager.Stub } } private boolean isOnOffloadQueue(int flags) { private boolean isOnOffloadQueue(int flags) { return ((flags & Intent.FLAG_RECEIVER_OFFLOAD) != 0); return (mEnableOffloadQueue && ((flags & Intent.FLAG_RECEIVER_OFFLOAD) != 0)); } } } } Loading
services/core/java/com/android/server/am/ActivityManagerService.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -549,6 +549,11 @@ public class ActivityManagerService extends IActivityManager.Stub // Whether we should use SCHED_FIFO for UI and RenderThreads. // Whether we should use SCHED_FIFO for UI and RenderThreads. boolean mUseFifoUiScheduling = false; boolean mUseFifoUiScheduling = false; // Use an offload queue for long broadcasts, e.g. BOOT_COMPLETED. // For simplicity, since we statically declare the size of the array of BroadcastQueues, // we still create this new offload queue, but never ever put anything on it. boolean mEnableOffloadQueue; BroadcastQueue mFgBroadcastQueue; BroadcastQueue mFgBroadcastQueue; BroadcastQueue mBgBroadcastQueue; BroadcastQueue mBgBroadcastQueue; BroadcastQueue mOffloadBroadcastQueue; BroadcastQueue mOffloadBroadcastQueue; Loading Loading @@ -2283,6 +2288,9 @@ public class ActivityManagerService extends IActivityManager.Stub // by default, no "slow" policy in this queue // by default, no "slow" policy in this queue offloadConstants.SLOW_TIME = Integer.MAX_VALUE; offloadConstants.SLOW_TIME = Integer.MAX_VALUE; mEnableOffloadQueue = SystemProperties.getBoolean( "persist.device_config.activity_manager_native_boot.offload_queue_enabled", false); mFgBroadcastQueue = new BroadcastQueue(this, mHandler, mFgBroadcastQueue = new BroadcastQueue(this, mHandler, "foreground", foreConstants, false); "foreground", foreConstants, false); mBgBroadcastQueue = new BroadcastQueue(this, mHandler, mBgBroadcastQueue = new BroadcastQueue(this, mHandler, Loading Loading @@ -18389,6 +18397,6 @@ public class ActivityManagerService extends IActivityManager.Stub } } private boolean isOnOffloadQueue(int flags) { private boolean isOnOffloadQueue(int flags) { return ((flags & Intent.FLAG_RECEIVER_OFFLOAD) != 0); return (mEnableOffloadQueue && ((flags & Intent.FLAG_RECEIVER_OFFLOAD) != 0)); } } } }