Loading core/java/android/os/Binder.java +2 −2 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ public class Binder implements IBinder { long callingIdentity = clearCallingIdentity(); Throwable throwableToPropagate = null; try { action.run(); action.runOrThrow(); } catch (Throwable throwable) { throwableToPropagate = throwable; } finally { Loading @@ -322,7 +322,7 @@ public class Binder implements IBinder { long callingIdentity = clearCallingIdentity(); Throwable throwableToPropagate = null; try { return action.get(); return action.getOrThrow(); } catch (Throwable throwable) { throwableToPropagate = throwable; return null; // overridden by throwing in finally block Loading core/java/android/os/Message.java +19 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,9 @@ public final class Message implements Parcelable { // sometimes we store linked lists of these things /*package*/ Message next; private static final Object sPoolSync = new Object(); /** @hide */ public static final Object sPoolSync = new Object(); private static Message sPool; private static int sPoolSize = 0; Loading Loading @@ -370,6 +372,12 @@ public final class Message implements Parcelable { return callback; } /** @hide */ public Message setCallback(Runnable r) { callback = r; return this; } /** * Obtains a Bundle of arbitrary data associated with this * event, lazily creating it if necessary. Set this value by calling Loading Loading @@ -410,6 +418,16 @@ public final class Message implements Parcelable { this.data = data; } /** * Chainable setter for {@link #what} * * @hide */ public Message setWhat(int what) { this.what = what; return this; } /** * Sends this Message to the Handler specified by {@link #getTarget}. * Throws a null pointer exception if this field has not been set. Loading core/java/android/util/Pools.java +10 −3 Original line number Diff line number Diff line Loading @@ -130,22 +130,29 @@ public final class Pools { } /** * Synchronized) pool of objects. * Synchronized pool of objects. * * @param <T> The pooled type. */ public static class SynchronizedPool<T> extends SimplePool<T> { private final Object mLock = new Object(); private final Object mLock; /** * Creates a new instance. * * @param maxPoolSize The max pool size. * @param lock an optional custom object to synchronize on * * @throws IllegalArgumentException If the max pool size is less than zero. */ public SynchronizedPool(int maxPoolSize) { public SynchronizedPool(int maxPoolSize, Object lock) { super(maxPoolSize); mLock = lock; } /** @see #SynchronizedPool(int, Object) */ public SynchronizedPool(int maxPoolSize) { this(maxPoolSize, new Object()); } @Override Loading core/java/com/android/internal/util/CollectionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.function.*; import java.util.function.Function; import java.util.stream.Stream; /** Loading core/java/com/android/internal/util/FunctionalUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class FunctionalUtils { */ @FunctionalInterface public interface ThrowingRunnable { void run() throws Exception; void runOrThrow() throws Exception; } /** Loading @@ -43,7 +43,7 @@ public class FunctionalUtils { */ @FunctionalInterface public interface ThrowingSupplier<T> { T get() throws Exception; T getOrThrow() throws Exception; } /** Loading Loading
core/java/android/os/Binder.java +2 −2 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ public class Binder implements IBinder { long callingIdentity = clearCallingIdentity(); Throwable throwableToPropagate = null; try { action.run(); action.runOrThrow(); } catch (Throwable throwable) { throwableToPropagate = throwable; } finally { Loading @@ -322,7 +322,7 @@ public class Binder implements IBinder { long callingIdentity = clearCallingIdentity(); Throwable throwableToPropagate = null; try { return action.get(); return action.getOrThrow(); } catch (Throwable throwable) { throwableToPropagate = throwable; return null; // overridden by throwing in finally block Loading
core/java/android/os/Message.java +19 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,9 @@ public final class Message implements Parcelable { // sometimes we store linked lists of these things /*package*/ Message next; private static final Object sPoolSync = new Object(); /** @hide */ public static final Object sPoolSync = new Object(); private static Message sPool; private static int sPoolSize = 0; Loading Loading @@ -370,6 +372,12 @@ public final class Message implements Parcelable { return callback; } /** @hide */ public Message setCallback(Runnable r) { callback = r; return this; } /** * Obtains a Bundle of arbitrary data associated with this * event, lazily creating it if necessary. Set this value by calling Loading Loading @@ -410,6 +418,16 @@ public final class Message implements Parcelable { this.data = data; } /** * Chainable setter for {@link #what} * * @hide */ public Message setWhat(int what) { this.what = what; return this; } /** * Sends this Message to the Handler specified by {@link #getTarget}. * Throws a null pointer exception if this field has not been set. Loading
core/java/android/util/Pools.java +10 −3 Original line number Diff line number Diff line Loading @@ -130,22 +130,29 @@ public final class Pools { } /** * Synchronized) pool of objects. * Synchronized pool of objects. * * @param <T> The pooled type. */ public static class SynchronizedPool<T> extends SimplePool<T> { private final Object mLock = new Object(); private final Object mLock; /** * Creates a new instance. * * @param maxPoolSize The max pool size. * @param lock an optional custom object to synchronize on * * @throws IllegalArgumentException If the max pool size is less than zero. */ public SynchronizedPool(int maxPoolSize) { public SynchronizedPool(int maxPoolSize, Object lock) { super(maxPoolSize); mLock = lock; } /** @see #SynchronizedPool(int, Object) */ public SynchronizedPool(int maxPoolSize) { this(maxPoolSize, new Object()); } @Override Loading
core/java/com/android/internal/util/CollectionUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.function.*; import java.util.function.Function; import java.util.stream.Stream; /** Loading
core/java/com/android/internal/util/FunctionalUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class FunctionalUtils { */ @FunctionalInterface public interface ThrowingRunnable { void run() throws Exception; void runOrThrow() throws Exception; } /** Loading @@ -43,7 +43,7 @@ public class FunctionalUtils { */ @FunctionalInterface public interface ThrowingSupplier<T> { T get() throws Exception; T getOrThrow() throws Exception; } /** Loading