Revert "Added mockito-extended support to WmTests."
This reverts commit 953fd225ccba3f46e336228362063bcafcac7fd5.
Reason for revert: Breaks pre-submit tests in cloud...
Bug: 113806960
Change-Id: I464d6a3acd40bfb112d94cbc4ff1c076ba5b59f1
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 9b8fb0f..97af045 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -1925,13 +1925,8 @@
@Override
public void setDefaultDisplay(DisplayContentInfo displayContentInfo) {
- setDefaultDisplay(displayContentInfo.getDisplay(), displayContentInfo.getDisplayRotation());
- }
-
- @VisibleForTesting
- void setDefaultDisplay(Display display, DisplayRotation displayRotation) {
- mDefaultDisplay = display;
- mDefaultDisplayRotation = displayRotation;
+ mDefaultDisplay = displayContentInfo.getDisplay();
+ mDefaultDisplayRotation = displayContentInfo.getDisplayRotation();
mDefaultDisplayPolicy = mDefaultDisplayRotation.getDisplayPolicy();
mDefaultOrientationListener = mDefaultDisplayRotation.getOrientationListener();
}
@@ -2669,11 +2664,7 @@
@Override
public void onConfigurationChanged(DisplayContentInfo displayContentInfo) {
- onConfigurationChanged(displayContentInfo.getDisplayRotation());
- }
-
- @VisibleForTesting
- void onConfigurationChanged(DisplayRotation displayRotation) {
+ final DisplayRotation displayRotation = displayContentInfo.getDisplayRotation();
// TODO(multi-display): Define policy for secondary displays.
if (!displayRotation.isDefaultDisplay) {
return;
diff --git a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
index cd708b9..082f521 100644
--- a/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityStackSupervisor.java
@@ -315,7 +315,7 @@
/** The number of distinct task ids that can be assigned to the tasks of a single user */
private static final int MAX_TASK_IDS_PER_USER = UserHandle.PER_USER_RANGE;
- final ActivityTaskManagerService mService;
+ ActivityTaskManagerService mService;
/** The historial list of recent tasks including inactive tasks */
RecentTasks mRecentTasks;
@@ -618,6 +618,11 @@
}
@VisibleForTesting
+ void setService(ActivityTaskManagerService service) {
+ mService = service;
+ }
+
+ @VisibleForTesting
void setWindowContainerController(RootWindowContainerController controller) {
mWindowContainerController = controller;
}
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 30eb500..1d00075 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -341,8 +341,7 @@
ActivityManagerInternal mAmInternal;
UriGrantsManagerInternal mUgmInternal;
private PackageManagerInternal mPmInternal;
- @VisibleForTesting
- final ActivityTaskManagerInternal mInternal;
+ private ActivityTaskManagerInternal mInternal;
PowerManagerInternal mPowerManagerInternal;
private UsageStatsManagerInternal mUsageStatsInternal;
@@ -644,7 +643,6 @@
mSystemThread = ActivityThread.currentActivityThread();
mUiContext = mSystemThread.getSystemUiContext();
mLifecycleManager = new ClientLifecycleManager();
- mInternal = new LocalService();
GL_ES_VERSION = SystemProperties.getInt("ro.opengles.version", GL_ES_VERSION_UNDEFINED);
}
@@ -895,6 +893,7 @@
}
private void start() {
+ mInternal = new LocalService();
LocalServices.addService(ActivityTaskManagerInternal.class, mInternal);
}
@@ -6871,4 +6870,4 @@
}
}
}
-}
+}
\ No newline at end of file