Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit addd354a authored by Lee Shombert's avatar Lee Shombert Committed by Android (Google) Code Review
Browse files

Merge "Use the standard AIDL Delegator" into main

parents b541012e d6863d2e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import java.util.Map;
 *
 * {@hide}
 */
@JavaDelegator
oneway interface IApplicationThread {
    void scheduleReceiver(in Intent intent, in ActivityInfo info,
            in CompatibilityInfo compatInfo,
+14 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import java.util.Arrays;
 *
 * {@hide}
 */
class ApplicationThreadDeferred extends ApplicationThreadFilter {
final class ApplicationThreadDeferred extends IApplicationThread.Delegator {

    static final String TAG = TAG_WITH_CLASS_NAME ? "ApplicationThreadDeferred" : TAG_AM;

@@ -87,11 +87,15 @@ class ApplicationThreadDeferred extends ApplicationThreadFilter {
    // When true, binder calls to paused processes will be deferred until the process is unpaused.
    private final boolean mDefer;

    // The base thread, because Delegator does not expose it.
    private final IApplicationThread mBase;

    /** Create an instance with a base thread and a deferral enable flag. */
    @VisibleForTesting
    public ApplicationThreadDeferred(IApplicationThread thread, boolean defer) {
        super(thread);

        mBase = thread;
        mDefer = defer;

        mOperations[CLEAR_DNS_CACHE] = () -> { super.clearDnsCache(); };
@@ -105,6 +109,15 @@ class ApplicationThreadDeferred extends ApplicationThreadFilter {
        this(thread, deferBindersWhenPaused());
    }

    /**
     * Return the implementation's value of asBinder(). super.asBinder() is not a real Binder
     * object.
     */
    @Override
    public  android.os.IBinder asBinder() {
        return mBase.asBinder();
    }

    /** The process is being paused.  Start deferring calls. */
    void onProcessPaused() {
        synchronized (mLock) {
+0 −603

File deleted.

Preview size limit exceeded, changes collapsed.