Loading core/java/android/os/Handler.java +0 −17 Original line number Diff line number Diff line Loading @@ -330,23 +330,6 @@ public class Handler { return new Handler(looper, callback, true); } /** * Create a new Handler with all reference fields explicitly provided. This is intended to be * used for creating a Handler sentinel object. */ private Handler(Looper looper, MessageQueue queue, Callback callback) { mLooper = looper; mQueue = queue; mCallback = callback; mAsynchronous = false; mIsShared = false; } /** @hide */ static Handler createSentinelHandler() { return new Handler(null, null, null); } /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @NonNull Loading core/java/android/os/Message.java +1 −5 Original line number Diff line number Diff line Loading @@ -419,7 +419,6 @@ public final class Message implements Parcelable { // Sentinel values used to clear reference fields with a valid 'null' value, to avoid grabbing a // removed message when matching for 'null' in these fields. private static final Object NULL_OBJECT = new Object(); private static final Handler NULL_HANDLER = Handler.createSentinelHandler(); private static final Runnable NULL_RUNNABLE = () -> {}; /** Loading @@ -433,7 +432,6 @@ public final class Message implements Parcelable { replyTo = null; sendingThreadName = null; data = null; target = NULL_HANDLER; callback = NULL_RUNNABLE; } Loading Loading @@ -479,9 +477,7 @@ public final class Message implements Parcelable { * worry about yours conflicting with other handlers. */ public Handler getTarget() { // We assign this first to avoid a data race that could potentially expose NULL_HANDLER. final Handler ret = target; return ret == NULL_HANDLER ? null : ret; return target; } /** Loading Loading
core/java/android/os/Handler.java +0 −17 Original line number Diff line number Diff line Loading @@ -330,23 +330,6 @@ public class Handler { return new Handler(looper, callback, true); } /** * Create a new Handler with all reference fields explicitly provided. This is intended to be * used for creating a Handler sentinel object. */ private Handler(Looper looper, MessageQueue queue, Callback callback) { mLooper = looper; mQueue = queue; mCallback = callback; mAsynchronous = false; mIsShared = false; } /** @hide */ static Handler createSentinelHandler() { return new Handler(null, null, null); } /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @NonNull Loading
core/java/android/os/Message.java +1 −5 Original line number Diff line number Diff line Loading @@ -419,7 +419,6 @@ public final class Message implements Parcelable { // Sentinel values used to clear reference fields with a valid 'null' value, to avoid grabbing a // removed message when matching for 'null' in these fields. private static final Object NULL_OBJECT = new Object(); private static final Handler NULL_HANDLER = Handler.createSentinelHandler(); private static final Runnable NULL_RUNNABLE = () -> {}; /** Loading @@ -433,7 +432,6 @@ public final class Message implements Parcelable { replyTo = null; sendingThreadName = null; data = null; target = NULL_HANDLER; callback = NULL_RUNNABLE; } Loading Loading @@ -479,9 +477,7 @@ public final class Message implements Parcelable { * worry about yours conflicting with other handlers. */ public Handler getTarget() { // We assign this first to avoid a data race that could potentially expose NULL_HANDLER. final Handler ret = target; return ret == NULL_HANDLER ? null : ret; return target; } /** Loading