Migrate to using DefaultDisplay

- Remove extra binder calls to get the default display

Bug: 140633033
Change-Id: I532645deac101a6065d90484b87a67b67aa717f5
This commit is contained in:
Winson Chung
2019-09-06 11:46:19 -07:00
parent 72fddba837
commit 13c1c2cd65
10 changed files with 64 additions and 88 deletions

View File

@@ -30,6 +30,8 @@ import android.view.ActionMode;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.Nullable;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.model.AppLaunchTracker;
@@ -39,8 +41,6 @@ import com.android.launcher3.uioverrides.WallpaperColorInfo;
import com.android.launcher3.util.PackageManagerHelper;
import com.android.launcher3.util.Themes;
import androidx.annotation.Nullable;
/**
* Extension of BaseActivity allowing support for drag-n-drop
*/
@@ -241,14 +241,14 @@ public abstract class BaseDraggingActivity extends BaseActivity
protected void onDeviceProfileInitiated() {
if (mDeviceProfile.isVerticalBarLayout()) {
mRotationListener.enable();
mDeviceProfile.updateIsSeascape(getWindowManager());
mDeviceProfile.updateIsSeascape(this);
} else {
mRotationListener.disable();
}
}
private void onDeviceRotationChanged() {
if (mDeviceProfile.updateIsSeascape(getWindowManager())) {
if (mDeviceProfile.updateIsSeascape(this)) {
reapplyUi();
}
}