Removing all compatibility code below Lollipop

Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
This commit is contained in:
Sunny Goyal
2016-12-16 15:04:51 -08:00
parent 90a40570bc
commit a52ecb0390
49 changed files with 220 additions and 1178 deletions

View File

@@ -1782,11 +1782,6 @@ public class Workspace extends PagedView
}
protected void onResume() {
// Update wallpaper dimensions if they were changed since last onResume
// (we also always set the wallpaper dimensions in the constructor)
if (LauncherAppState.getInstance().hasWallpaperChangedSinceLastCheck()) {
setWallpaperDimension();
}
mWallpaperOffset.onResume();
}
@@ -2091,20 +2086,13 @@ public class Workspace extends PagedView
public void updateAccessibilityFlags() {
// TODO: Update the accessibility flags appropriately when dragging.
if (!mLauncher.getAccessibilityDelegate().isInAccessibleDrag()) {
if (Utilities.ATLEAST_LOLLIPOP) {
int total = getPageCount();
for (int i = numCustomPages(); i < total; i++) {
updateAccessibilityFlags((CellLayout) getPageAt(i), i);
}
setImportantForAccessibility((mState == State.NORMAL || mState == State.OVERVIEW)
? IMPORTANT_FOR_ACCESSIBILITY_AUTO
: IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
} else {
int accessible = mState == State.NORMAL ?
IMPORTANT_FOR_ACCESSIBILITY_AUTO :
IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
setImportantForAccessibility(accessible);
int total = getPageCount();
for (int i = numCustomPages(); i < total; i++) {
updateAccessibilityFlags((CellLayout) getPageAt(i), i);
}
setImportantForAccessibility((mState == State.NORMAL || mState == State.OVERVIEW)
? IMPORTANT_FOR_ACCESSIBILITY_AUTO
: IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
}