diff --git a/src/com/android/settings/applications/appops/AppOpsState.java b/src/com/android/settings/applications/appops/AppOpsState.java index 2686b8c144b..3c8d6479380 100644 --- a/src/com/android/settings/applications/appops/AppOpsState.java +++ b/src/com/android/settings/applications/appops/AppOpsState.java @@ -618,7 +618,7 @@ public class AppOpsState { } AppOpsManager.OpEntry opEntry = new AppOpsManager.OpEntry( - permOps.get(k), AppOpsManager.MODE_ALLOWED, 0, 0, 0, -1, null); + permOps.get(k), AppOpsManager.MODE_ALLOWED); 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 73c0d8e04bd..993ba727332 100644 --- a/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/development/MockLocationAppPreferenceControllerTest.java @@ -15,6 +15,7 @@ import static org.mockito.Mockito.when; import android.app.Activity; import android.app.AppOpsManager; +import android.app.AppOpsManager.OpEntry; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; @@ -144,7 +145,7 @@ public class MockLocationAppPreferenceControllerTest { } private AppOpsManager.OpEntry createOpEntry(int opMode) { - return new AppOpsManager.OpEntry(0, opMode, 0l /* time */, 0 /* rejectTime */, - 0 /* duration */, 0 /* proxyUid */, null /* proxyPackage */); + return new OpEntry(0, false, opMode, null /*accessTimes*/, null /*rejectTimes*/, + null /*durations*/, null /* proxyUids */, null /* proxyPackages */); } } diff --git a/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java index 368a93a4e40..78687688df4 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/RestrictAppPreferenceControllerTest.java @@ -77,13 +77,16 @@ public class RestrictAppPreferenceControllerTest { @Before public void setUp() { MockitoAnnotations.initMocks(this); - final AppOpsManager.OpEntry allowOpEntry = new AppOpsManager.OpEntry( - AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_ALLOWED, 0, 0, 0, 0, ""); + AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_ALLOWED, + null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/, + null /* proxyUids */, null /* proxyPackages */); final List allowOps = new ArrayList<>(); allowOps.add(allowOpEntry); final AppOpsManager.OpEntry restrictedOpEntry = new AppOpsManager.OpEntry( - AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, AppOpsManager.MODE_IGNORED, 0, 0, 0, 0, ""); + AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, false, AppOpsManager.MODE_IGNORED, + null /*accessTimes*/, null /*rejectTimes*/, null /*durations*/, + null /* proxyUids */, null /* proxyPackages */); final List restrictedOps = new ArrayList<>(); restrictedOps.add(restrictedOpEntry); mAllowedPackageOps = new AppOpsManager.PackageOps(