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

Commit ea77682f authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Verify `android.test.mock` under Ravenwood." into main

parents 4ab7dcd6 de344710
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ android_ravenwood_libgroup {
        "junit",
        "truth",
        "ravenwood-junit-impl",
        "android.test.mock",
        "android.test.mock.ravenwood",
    ],
}

+3 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ import java.util.function.IntConsumer;
 * another Context.  Can be subclassed to modify behavior without changing
 * the original Context.
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public class ContextWrapper extends Context {
    @UnsupportedAppUsage
    Context mBase;
@@ -1430,6 +1431,7 @@ public class ContextWrapper extends Context {
     * @throws IllegalStateException if this method calls before {@link #attachBaseContext(Context)}
     */
    @Override
    @android.ravenwood.annotation.RavenwoodThrow
    public void registerComponentCallbacks(ComponentCallbacks callback) {
        if (mBase != null) {
            mBase.registerComponentCallbacks(callback);
@@ -1464,6 +1466,7 @@ public class ContextWrapper extends Context {
     * @throws IllegalStateException if this method calls before {@link #attachBaseContext(Context)}
     */
    @Override
    @android.ravenwood.annotation.RavenwoodThrow
    public void unregisterComponentCallbacks(ComponentCallbacks callback) {
        // It usually means the ComponentCallbacks is registered before this ContextWrapper attaches
        // to a base Context and Application is targeting prior to S-v2. We should unregister the
+2 −0
Original line number Diff line number Diff line
set noparent

jsharkey@google.com
omakoto@google.com
jaggies@google.com
+3 −1
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ class com.android.modules.utils.TypedXmlSerializer stubclass
class android.net.Uri stubclass
class android.net.UriCodec stubclass

# Context: just enough to support wrapper, no further functionality
# Just enough to support mocking, no further functionality
class android.content.Context stub
    method <init> ()V stub
class android.content.pm.PackageManager stub
    method <init> ()V stub
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ android.content.ClipDescription
android.content.ComponentName
android.content.ContentUris
android.content.ContentValues
android.content.ContextWrapper
android.content.Intent
android.content.IntentFilter
android.content.UriMatcher
Loading