Merge "Fix the deprecated directlyOn method" into main am: a519bd5654
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3545520 Change-Id: I6ed116e75f81b391734e28dc800513f2ed1d643b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user