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

Commit 62a61e86 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

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

Change-Id: I190e6198ed622c36773226b713abc5149f7ed276
parents dbb9eaab add3b8d7
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.