summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Liu <congxiliu@google.com> 2025-03-20 08:18:59 -0700
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-20 08:18:59 -0700
commita519bd56545341ed43b4a037d21b2a974172a4cc (patch)
tree381e43fc5f5ed0780f336994060611f92571964b
parent08906d9c93c97136b6dc2ea2669af105b6ed9aa9 (diff)
parent99b5a00f837754e33111af20abddb91e0c0bcc69 (diff)
Merge "Fix the deprecated directlyOn method" into main
-rw-r--r--tests/robotests/testutils/com/android/settings/testutils/shadow/SettingsShadowResources.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/robotests/testutils/com/android/settings/testutils/shadow/SettingsShadowResources.java b/tests/robotests/testutils/com/android/settings/testutils/shadow/SettingsShadowResources.java
index b2d5484dcb2..b25ce4976ce 100644
--- a/tests/robotests/testutils/com/android/settings/testutils/shadow/SettingsShadowResources.java
+++ b/tests/robotests/testutils/com/android/settings/testutils/shadow/SettingsShadowResources.java
@@ -23,8 +23,6 @@ import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.util.SparseArray;
-import androidx.annotation.ArrayRes;
-
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
@@ -63,12 +61,13 @@ public class SettingsShadowResources extends ShadowResources {
}
@Implementation
- protected int[] getIntArray(@ArrayRes int id) throws NotFoundException {
+ protected int[] getIntArray(int id) throws NotFoundException {
final Object override = sResourceOverrides.get(id);
if (override instanceof int[]) {
return (int[]) override;
}
- return directlyOn(realResources, Resources.class).getIntArray(id);
+ return directlyOn(
+ realResources, Resources.class, "getIntArray", ClassParameter.from(int.class, id));
}
@Implementation