Loading core/java/android/app/Instrumentation.java +12 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.ravenwood.annotation.RavenwoodKeep; import android.ravenwood.annotation.RavenwoodKeepPartialClass; import android.ravenwood.annotation.RavenwoodKeepWholeClass; import android.ravenwood.annotation.RavenwoodReplace; import android.util.AndroidRuntimeException; import android.util.Log; Loading Loading @@ -460,6 +461,7 @@ public class Instrumentation { * * @param runner The code to run on the main thread. */ @RavenwoodReplace(blockedBy = ActivityThread.class) public void runOnMainSync(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); Loading @@ -467,6 +469,13 @@ public class Instrumentation { sr.waitForComplete(); } private void runOnMainSync$ravenwood(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mInstrContext.getMainExecutor().execute(sr); sr.waitForComplete(); } boolean isSdkSandboxAllowedToStartActivities() { return Process.isSdkSandbox() && mThread != null Loading Loading @@ -2442,7 +2451,8 @@ public class Instrumentation { } } private final void validateNotAppThread() { @RavenwoodKeep private void validateNotAppThread() { if (Looper.myLooper() == Looper.getMainLooper()) { throw new RuntimeException( "This method can not be called from the main application thread"); Loading Loading @@ -2586,6 +2596,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class SyncRunnable implements Runnable { private final Runnable mTarget; private boolean mComplete; Loading core/java/android/content/res/Resources.java +0 −2 Original line number Diff line number Diff line Loading @@ -482,7 +482,6 @@ public class Resources { * * @return Typeface The Typeface data associated with the resource. */ @RavenwoodThrow(blockedBy = Typeface.class) @NonNull public Typeface getFont(@FontRes int id) throws NotFoundException { final TypedValue value = obtainTempTypedValue(); try { Loading @@ -507,7 +506,6 @@ public class Resources { /** * @hide */ @RavenwoodThrow(blockedBy = Typeface.class) public void preloadFonts(@ArrayRes int id) { final TypedArray array = obtainTypedArray(id); try { Loading core/java/android/content/res/ResourcesImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1068,7 +1068,6 @@ public class ResourcesImpl { * Loads a font from XML or resources stream. */ @Nullable @RavenwoodThrow(blockedBy = Typeface.class) public Typeface loadFont(Resources wrapper, TypedValue value, int id) { if (value.string == null) { throw new NotFoundException("Resource \"" + getResourceName(id) + "\" (" Loading core/java/android/content/res/TypedArray.java +0 −1 Original line number Diff line number Diff line Loading @@ -1043,7 +1043,6 @@ public class TypedArray implements AutoCloseable { * not a font resource. */ @Nullable @RavenwoodThrow(blockedBy = Typeface.class) public Typeface getFont(@StyleableRes int index) { if (mRecycled) { throw new RuntimeException("Cannot make calls to a recycled instance!"); Loading core/java/android/graphics/fonts/FontFamilyUpdateRequest.java +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ import java.util.Objects; * @hide */ @SystemApi @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class FontFamilyUpdateRequest { /** Loading Loading
core/java/android/app/Instrumentation.java +12 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.ravenwood.annotation.RavenwoodKeep; import android.ravenwood.annotation.RavenwoodKeepPartialClass; import android.ravenwood.annotation.RavenwoodKeepWholeClass; import android.ravenwood.annotation.RavenwoodReplace; import android.util.AndroidRuntimeException; import android.util.Log; Loading Loading @@ -460,6 +461,7 @@ public class Instrumentation { * * @param runner The code to run on the main thread. */ @RavenwoodReplace(blockedBy = ActivityThread.class) public void runOnMainSync(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); Loading @@ -467,6 +469,13 @@ public class Instrumentation { sr.waitForComplete(); } private void runOnMainSync$ravenwood(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mInstrContext.getMainExecutor().execute(sr); sr.waitForComplete(); } boolean isSdkSandboxAllowedToStartActivities() { return Process.isSdkSandbox() && mThread != null Loading Loading @@ -2442,7 +2451,8 @@ public class Instrumentation { } } private final void validateNotAppThread() { @RavenwoodKeep private void validateNotAppThread() { if (Looper.myLooper() == Looper.getMainLooper()) { throw new RuntimeException( "This method can not be called from the main application thread"); Loading Loading @@ -2586,6 +2596,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class SyncRunnable implements Runnable { private final Runnable mTarget; private boolean mComplete; Loading
core/java/android/content/res/Resources.java +0 −2 Original line number Diff line number Diff line Loading @@ -482,7 +482,6 @@ public class Resources { * * @return Typeface The Typeface data associated with the resource. */ @RavenwoodThrow(blockedBy = Typeface.class) @NonNull public Typeface getFont(@FontRes int id) throws NotFoundException { final TypedValue value = obtainTempTypedValue(); try { Loading @@ -507,7 +506,6 @@ public class Resources { /** * @hide */ @RavenwoodThrow(blockedBy = Typeface.class) public void preloadFonts(@ArrayRes int id) { final TypedArray array = obtainTypedArray(id); try { Loading
core/java/android/content/res/ResourcesImpl.java +0 −1 Original line number Diff line number Diff line Loading @@ -1068,7 +1068,6 @@ public class ResourcesImpl { * Loads a font from XML or resources stream. */ @Nullable @RavenwoodThrow(blockedBy = Typeface.class) public Typeface loadFont(Resources wrapper, TypedValue value, int id) { if (value.string == null) { throw new NotFoundException("Resource \"" + getResourceName(id) + "\" (" Loading
core/java/android/content/res/TypedArray.java +0 −1 Original line number Diff line number Diff line Loading @@ -1043,7 +1043,6 @@ public class TypedArray implements AutoCloseable { * not a font resource. */ @Nullable @RavenwoodThrow(blockedBy = Typeface.class) public Typeface getFont(@StyleableRes int index) { if (mRecycled) { throw new RuntimeException("Cannot make calls to a recycled instance!"); Loading
core/java/android/graphics/fonts/FontFamilyUpdateRequest.java +1 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ import java.util.Objects; * @hide */ @SystemApi @android.ravenwood.annotation.RavenwoodKeepWholeClass public final class FontFamilyUpdateRequest { /** Loading