mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Revert "Migrating all model tests to Instrumentation tests"
This reverts commit 455ba62b5d.
Reason for revert: Breaks tests on all targets
Bug: 196825541
Bug: 197570389
Change-Id: Ida6792a09c54dee46105b6b914a0dd1545bdf48d
This commit is contained in:
@@ -55,7 +55,7 @@ import java.util.Set;
|
||||
* Utility class to cache properties of default display to avoid a system RPC on every call.
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
public class DisplayController implements DisplayListener, ComponentCallbacks, SafeCloseable {
|
||||
public class DisplayController implements DisplayListener, ComponentCallbacks {
|
||||
|
||||
private static final String TAG = "DisplayController";
|
||||
|
||||
@@ -79,7 +79,6 @@ public class DisplayController implements DisplayListener, ComponentCallbacks, S
|
||||
|
||||
private final ArrayList<DisplayInfoChangeListener> mListeners = new ArrayList<>();
|
||||
private Info mInfo;
|
||||
private boolean mDestroyed = false;
|
||||
|
||||
private DisplayController(Context context) {
|
||||
mContext = context;
|
||||
@@ -111,17 +110,6 @@ public class DisplayController implements DisplayListener, ComponentCallbacks, S
|
||||
mDM.registerDisplayListener(this, UI_HELPER_EXECUTOR.getHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
mDestroyed = true;
|
||||
if (mWindowContext != null) {
|
||||
mWindowContext.unregisterComponentCallbacks(this);
|
||||
} else {
|
||||
// TODO: unregister broadcast receiver
|
||||
}
|
||||
mDM.unregisterDisplayListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onDisplayAdded(int displayId) { }
|
||||
|
||||
@@ -169,9 +157,6 @@ public class DisplayController implements DisplayListener, ComponentCallbacks, S
|
||||
* Only used for pre-S
|
||||
*/
|
||||
private void onConfigChanged(Intent intent) {
|
||||
if (mDestroyed) {
|
||||
return;
|
||||
}
|
||||
Configuration config = mContext.getResources().getConfiguration();
|
||||
if (mInfo.fontScale != config.fontScale || mInfo.densityDpi != config.densityDpi) {
|
||||
Log.d(TAG, "Configuration changed, notifying listeners");
|
||||
|
||||
Reference in New Issue
Block a user