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

Commit dad190e8 authored by Parvathy Shanmugam's avatar Parvathy Shanmugam Committed by Android (Google) Code Review
Browse files

Merge "(IMS Threading refactoring) Telephony IMS classes to schedule IMS...

Merge "(IMS Threading refactoring) Telephony IMS classes to schedule IMS callback on the main thread"
parents 594e0388 0faae9de
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -101,6 +101,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.