Loading AconfigFlags.bp +0 −19 Original line number Diff line number Diff line Loading @@ -1292,25 +1292,6 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Media aconfig_declarations { name: "android.media.playback.flags-aconfig", package: "com.android.media.playback.flags", container: "system", srcs: ["media/jni/playback_flags.aconfig"], } cc_aconfig_library { name: "android.media.playback.flags-aconfig-cc", aconfig_declarations: "android.media.playback.flags-aconfig", } java_aconfig_library { name: "android.media.playback.flags-aconfig-java", aconfig_declarations: "android.media.playback.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // DevicePolicy aconfig_declarations { name: "device_policy_aconfig_flags", Loading core/java/Android.bp +3 −8 Original line number Diff line number Diff line Loading @@ -630,19 +630,14 @@ filegroup { ], } aidl_interface { name: "android.os.statsbootstrap_aidl", unstable: true, filegroup { name: "android-os-statsbootstrap-aidl", srcs: [ "android/os/IStatsBootstrapAtomService.aidl", "android/os/StatsBootstrapAtom.aidl", "android/os/StatsBootstrapAtomValue.aidl", ], backend: { cpp: { enabled: true, }, }, visibility: ["//frameworks/native/libs/binder"], } // utility classes statically linked into wifi-service Loading core/java/android/os/CombinedMessageQueue/MessageQueue.java +6 −39 Original line number Diff line number Diff line Loading @@ -34,8 +34,6 @@ import android.util.Printer; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -98,7 +96,6 @@ public final class MessageQueue { @UnsupportedAppUsage private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>(); private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; private IdleHandler[] mPendingIdleHandlers; private boolean mQuitting; Loading Loading @@ -130,29 +127,18 @@ public final class MessageQueue { private static Boolean sIsProcessAllowedToUseConcurrent = null; @RavenwoodRedirect @FastNative private native static long nativeInit(); @RavenwoodRedirect @FastNative private native static void nativeDestroy(long ptr); @UnsupportedAppUsage @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private native static void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private native static boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private native static void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -585,17 +571,6 @@ public final class MessageQueue { setFileDescriptorEvents(fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading Loading @@ -865,18 +840,9 @@ public final class MessageQueue { } } private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords || getQuitting()) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } private Message nextConcurrent() { if (mPtr == 0) { final long ptr = mPtr; if (ptr == 0) { return null; } Loading @@ -888,7 +854,7 @@ public final class MessageQueue { } mMessageDirectlyQueued = false; maybePollOnce(mNextPollTimeoutMillis); nativePollOnce(ptr, mNextPollTimeoutMillis); Message msg = nextMessage(false, false); if (msg != null) { Loading Loading @@ -955,7 +921,8 @@ public final class MessageQueue { // Return here if the message loop has already quit and been disposed. // This can happen if the application tries to restart a looper after quit // which is not supported. if (mPtr == 0) { final long ptr = mPtr; if (ptr == 0) { return null; } Loading @@ -966,7 +933,7 @@ public final class MessageQueue { Binder.flushPendingCommands(); } maybePollOnce(nextPollTimeoutMillis); nativePollOnce(ptr, nextPollTimeoutMillis); synchronized (this) { // Try to retrieve the next message. Return if found. Loading core/java/android/os/ConcurrentMessageQueue/MessageQueue.java +1 −37 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.GuardedBy; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -438,35 +436,22 @@ public final class MessageQueue { private final Object mFileDescriptorRecordsLock = new Object(); @GuardedBy("mFileDescriptorRecordsLock") private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; // The next barrier token. // Barriers are indicated by messages with a null target whose arg1 field carries the token. private final AtomicInteger mNextBarrierToken = new AtomicInteger(1); @RavenwoodRedirect @FastNative private static native long nativeInit(); @RavenwoodRedirect @FastNative private static native void nativeDestroy(long ptr); @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private static native void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private static native boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private static native void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -886,16 +871,6 @@ public final class MessageQueue { } } private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords || getQuitting()) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } Message next() { final long ptr = mPtr; if (ptr == 0) { Loading @@ -910,7 +885,7 @@ public final class MessageQueue { } mMessageDirectlyQueued = false; maybePollOnce(mNextPollTimeoutMillis); nativePollOnce(ptr, mNextPollTimeoutMillis); Message msg = nextMessage(false, false); if (msg != null) { Loading Loading @@ -1761,17 +1736,6 @@ public final class MessageQueue { mFileDescriptorRecords.removeAt(index); setFileDescriptorEvents(fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading core/java/android/os/LegacyMessageQueue/MessageQueue.java +1 −37 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.Printer; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -71,7 +69,6 @@ public final class MessageQueue { @UnsupportedAppUsage private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>(); private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; private IdleHandler[] mPendingIdleHandlers; private boolean mQuitting; Loading @@ -88,29 +85,17 @@ public final class MessageQueue { private int mNextBarrierToken; @RavenwoodRedirect @FastNative private native static long nativeInit(); @RavenwoodRedirect @FastNative private native static void nativeDestroy(long ptr); @UnsupportedAppUsage @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private native static void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private native static boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private native static void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -327,17 +312,6 @@ public final class MessageQueue { mFileDescriptorRecords.removeAt(index); nativeSetFileDescriptorEvents(mPtr, fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading Loading @@ -392,16 +366,6 @@ public final class MessageQueue { private static final AtomicLong mMessagesDelivered = new AtomicLong(); private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } @UnsupportedAppUsage Message next() { // Return here if the message loop has already quit and been disposed. Loading @@ -419,7 +383,7 @@ public final class MessageQueue { Binder.flushPendingCommands(); } maybePollOnce(nextPollTimeoutMillis); nativePollOnce(ptr, nextPollTimeoutMillis); synchronized (this) { // Try to retrieve the next message. Return if found. Loading Loading
AconfigFlags.bp +0 −19 Original line number Diff line number Diff line Loading @@ -1292,25 +1292,6 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Media aconfig_declarations { name: "android.media.playback.flags-aconfig", package: "com.android.media.playback.flags", container: "system", srcs: ["media/jni/playback_flags.aconfig"], } cc_aconfig_library { name: "android.media.playback.flags-aconfig-cc", aconfig_declarations: "android.media.playback.flags-aconfig", } java_aconfig_library { name: "android.media.playback.flags-aconfig-java", aconfig_declarations: "android.media.playback.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // DevicePolicy aconfig_declarations { name: "device_policy_aconfig_flags", Loading
core/java/Android.bp +3 −8 Original line number Diff line number Diff line Loading @@ -630,19 +630,14 @@ filegroup { ], } aidl_interface { name: "android.os.statsbootstrap_aidl", unstable: true, filegroup { name: "android-os-statsbootstrap-aidl", srcs: [ "android/os/IStatsBootstrapAtomService.aidl", "android/os/StatsBootstrapAtom.aidl", "android/os/StatsBootstrapAtomValue.aidl", ], backend: { cpp: { enabled: true, }, }, visibility: ["//frameworks/native/libs/binder"], } // utility classes statically linked into wifi-service Loading
core/java/android/os/CombinedMessageQueue/MessageQueue.java +6 −39 Original line number Diff line number Diff line Loading @@ -34,8 +34,6 @@ import android.util.Printer; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -98,7 +96,6 @@ public final class MessageQueue { @UnsupportedAppUsage private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>(); private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; private IdleHandler[] mPendingIdleHandlers; private boolean mQuitting; Loading Loading @@ -130,29 +127,18 @@ public final class MessageQueue { private static Boolean sIsProcessAllowedToUseConcurrent = null; @RavenwoodRedirect @FastNative private native static long nativeInit(); @RavenwoodRedirect @FastNative private native static void nativeDestroy(long ptr); @UnsupportedAppUsage @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private native static void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private native static boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private native static void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -585,17 +571,6 @@ public final class MessageQueue { setFileDescriptorEvents(fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading Loading @@ -865,18 +840,9 @@ public final class MessageQueue { } } private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords || getQuitting()) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } private Message nextConcurrent() { if (mPtr == 0) { final long ptr = mPtr; if (ptr == 0) { return null; } Loading @@ -888,7 +854,7 @@ public final class MessageQueue { } mMessageDirectlyQueued = false; maybePollOnce(mNextPollTimeoutMillis); nativePollOnce(ptr, mNextPollTimeoutMillis); Message msg = nextMessage(false, false); if (msg != null) { Loading Loading @@ -955,7 +921,8 @@ public final class MessageQueue { // Return here if the message loop has already quit and been disposed. // This can happen if the application tries to restart a looper after quit // which is not supported. if (mPtr == 0) { final long ptr = mPtr; if (ptr == 0) { return null; } Loading @@ -966,7 +933,7 @@ public final class MessageQueue { Binder.flushPendingCommands(); } maybePollOnce(nextPollTimeoutMillis); nativePollOnce(ptr, nextPollTimeoutMillis); synchronized (this) { // Try to retrieve the next message. Return if found. Loading
core/java/android/os/ConcurrentMessageQueue/MessageQueue.java +1 −37 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.proto.ProtoOutputStream; import com.android.internal.annotations.GuardedBy; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -438,35 +436,22 @@ public final class MessageQueue { private final Object mFileDescriptorRecordsLock = new Object(); @GuardedBy("mFileDescriptorRecordsLock") private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; // The next barrier token. // Barriers are indicated by messages with a null target whose arg1 field carries the token. private final AtomicInteger mNextBarrierToken = new AtomicInteger(1); @RavenwoodRedirect @FastNative private static native long nativeInit(); @RavenwoodRedirect @FastNative private static native void nativeDestroy(long ptr); @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private static native void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private static native boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private static native void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -886,16 +871,6 @@ public final class MessageQueue { } } private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords || getQuitting()) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } Message next() { final long ptr = mPtr; if (ptr == 0) { Loading @@ -910,7 +885,7 @@ public final class MessageQueue { } mMessageDirectlyQueued = false; maybePollOnce(mNextPollTimeoutMillis); nativePollOnce(ptr, mNextPollTimeoutMillis); Message msg = nextMessage(false, false); if (msg != null) { Loading Loading @@ -1761,17 +1736,6 @@ public final class MessageQueue { mFileDescriptorRecords.removeAt(index); setFileDescriptorEvents(fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading
core/java/android/os/LegacyMessageQueue/MessageQueue.java +1 −37 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import android.util.Printer; import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.annotation.optimization.NeverCompile; import java.io.FileDescriptor; Loading Loading @@ -71,7 +69,6 @@ public final class MessageQueue { @UnsupportedAppUsage private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>(); private SparseArray<FileDescriptorRecord> mFileDescriptorRecords; private volatile boolean mHasFileDescriptorRecords; private IdleHandler[] mPendingIdleHandlers; private boolean mQuitting; Loading @@ -88,29 +85,17 @@ public final class MessageQueue { private int mNextBarrierToken; @RavenwoodRedirect @FastNative private native static long nativeInit(); @RavenwoodRedirect @FastNative private native static void nativeDestroy(long ptr); @UnsupportedAppUsage @RavenwoodRedirect // Not @FastNative since significant time is spent in the native code as it may invoke // application callbacks. private native void nativePollOnce(long ptr, int timeoutMillis); /*non-static for callbacks*/ @RavenwoodRedirect @CriticalNative private native static void nativeWake(long ptr); @RavenwoodRedirect @CriticalNative private native static boolean nativeIsPolling(long ptr); @RavenwoodRedirect @CriticalNative private native static void nativeSetFileDescriptorEvents(long ptr, int fd, int events); MessageQueue(boolean quitAllowed) { Loading Loading @@ -327,17 +312,6 @@ public final class MessageQueue { mFileDescriptorRecords.removeAt(index); nativeSetFileDescriptorEvents(mPtr, fdNum, 0); } // Indicate to maybePollOnce() if we have file descriptor records that // need to be polled for events. // We write this volatile field here and read it from the worker thread. // Adding an FD on a client thread and polling for events on the worker thread are // inherently racy. If the worker thread skips polling because it thinks there are // no FDs to watch and there is a Message to handle, then the worker will still // poll for the same events the next time. Events won't be missed, they'll just be // interleaved with Message handling in undefined ways. mHasFileDescriptorRecords = mFileDescriptorRecords != null && (mFileDescriptorRecords.size() > 0); } // Called from native code. Loading Loading @@ -392,16 +366,6 @@ public final class MessageQueue { private static final AtomicLong mMessagesDelivered = new AtomicLong(); private void maybePollOnce(int nextPollTimeoutMillis) { if (!Flags.messageQueueNativePollOnceAndForAll()) { // If nativePollOnce optimization is not in effect, poll unconditionally. nativePollOnce(mPtr, nextPollTimeoutMillis); } else if (nextPollTimeoutMillis != 0 || mHasFileDescriptorRecords) { // We need to wait for the next message, or we need to poll for file descriptor events. nativePollOnce(mPtr, nextPollTimeoutMillis); } } @UnsupportedAppUsage Message next() { // Return here if the message loop has already quit and been disposed. Loading @@ -419,7 +383,7 @@ public final class MessageQueue { Binder.flushPendingCommands(); } maybePollOnce(nextPollTimeoutMillis); nativePollOnce(ptr, nextPollTimeoutMillis); synchronized (this) { // Try to retrieve the next message. Return if found. Loading