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

Commit b5ccb150 authored by Parvathy Shanmugam's avatar Parvathy Shanmugam Committed by Automerger Merge Worker
Browse files

(IMS Threading refactoring) Telephony IMS classes to schedule IMS callback on...

(IMS Threading refactoring) Telephony IMS classes to schedule IMS callback on the main thread am: add3b8d7 am: 62a61e86

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1964909

Change-Id: I0ba731f3612bf629b50d1a4fd18e51272d8a1adc
parents 4463b958 62a61e86
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -107,6 +107,25 @@ public final class TelephonyUtils {
        }
    }

    /**
     * Convenience method for running the provided action in the provided
     * executor enclosed in
     * {@link Binder#clearCallingIdentity}/{@link Binder#restoreCallingIdentity}
     *
     * Any exception thrown by the given action will need to be handled by caller.
     *
     */
    public static void runWithCleanCallingIdentity(
            @NonNull Runnable action, @NonNull Executor executor) {
        if (action != null) {
            if (executor != null) {
                executor.execute(() -> runWithCleanCallingIdentity(action));
            } else {
                runWithCleanCallingIdentity(action);
            }
        }
    }


    /**
     * Convenience method for running the provided action enclosed in
+124 −58

File changed.

Preview size limit exceeded, changes collapsed.