diff --git a/src/com/android/settings/applications/appops/AppOpsState.java b/src/com/android/settings/applications/appops/AppOpsState.java index 3c8d6479380..fed77ae0c4e 100644 --- a/src/com/android/settings/applications/appops/AppOpsState.java +++ b/src/com/android/settings/applications/appops/AppOpsState.java @@ -28,6 +28,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.format.DateUtils; import android.util.Log; +import android.util.Pair; import android.util.SparseArray; import com.android.settings.R; @@ -618,7 +619,7 @@ public class AppOpsState { } AppOpsManager.OpEntry opEntry = new AppOpsManager.OpEntry( - permOps.get(k), AppOpsManager.MODE_ALLOWED); + permOps.get(k), AppOpsManager.MODE_ALLOWED, new Pair[0]); dummyOps.add(opEntry); addOp(entries, pkgOps, appEntry, opEntry, packageName == null, packageName == null ? 0 : opToOrder[opEntry.getOp()]); diff --git a/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java index 993ba727332..3be43471dce 100644 --- a/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; +import android.util.Pair; import androidx.preference.Preference; import androidx.preference.PreferenceScreen; @@ -145,7 +146,6 @@ public class MockLocationAppPreferenceControllerTest { } private AppOpsManager.OpEntry createOpEntry(int opMode) { - return new OpEntry(0, false, opMode, null /*accessTimes*/, null /*rejectTimes*/, - null /*durations*/, null /* proxyUids */, null /* proxyPackages */); + return new OpEntry(0, opMode, new Pair[0]); } } diff --git a/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java index 774fba22885..1febbe410f9 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java @@ -34,6 +34,7 @@ import android.content.Context; import android.content.Intent; import android.os.UserHandle; import android.os.UserManager; +import android.util.Pair; import androidx.preference.Preference; import androidx.preference.PreferenceManager; @@ -83,14 +84,10 @@ public class RestrictAppPreferenceControllerTest { MockitoAnnotations.initMocks(this); final List allowOps = new ArrayList<>(); allowOps.add(new AppOpsManager.OpEntry( - AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_ALLOWED, - null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/, - null /* proxyUids */, null /* proxyPackages */)); + AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_ALLOWED, new Pair[0])); final List restrictedOps = new ArrayList<>(); restrictedOps.add(new AppOpsManager.OpEntry( - AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_IGNORED, - null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/, - null /* proxyUids */, null /* proxyPackages */)); + AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_IGNORED, new Pair[0])); mAllowedPackageOps = new AppOpsManager.PackageOps( ALLOWED_PACKAGE_NAME, ALLOWED_UID, allowOps); mRestrictedPackageOps = new AppOpsManager.PackageOps(