Loading src/com/android/launcher3/Launcher.java +4 −4 Original line number Diff line number Diff line Loading @@ -365,7 +365,7 @@ public class Launcher extends Activity ? app.getInvariantDeviceProfile().landscapeProfile : app.getInvariantDeviceProfile().portraitProfile; if (Utilities.isNycOrAbove() && isInMultiWindowMode()) { if (Utilities.ATLEAST_NOUGAT && isInMultiWindowMode()) { Display display = getWindowManager().getDefaultDisplay(); Point mwSize = new Point(); display.getSize(mwSize); Loading Loading @@ -466,7 +466,7 @@ public class Launcher extends Activity private void loadExtractedColorsAndColorItems() { // TODO: do this in pre-N as well, once the extraction part is complete. if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { mExtractedColors.load(this); mHotseat.updateColor(mExtractedColors, !mPaused); mWorkspace.getPageIndicator().updateColor(mExtractedColors); Loading Loading @@ -913,7 +913,7 @@ public class Launcher extends Activity mLauncherCallbacks.onStop(); } if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { mAppWidgetHost.stopListening(); } } Loading @@ -927,7 +927,7 @@ public class Launcher extends Activity mLauncherCallbacks.onStart(); } if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { mAppWidgetHost.startListening(); } } Loading src/com/android/launcher3/LauncherAppState.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class LauncherAppState { filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE); filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNLOCKED); // For extracting colors from the wallpaper if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { // TODO: add a broadcast entry to the manifest for pre-N. filter.addAction(Intent.ACTION_WALLPAPER_CHANGED); } Loading src/com/android/launcher3/LauncherModel.java +1 −1 Original line number Diff line number Diff line Loading @@ -2692,7 +2692,7 @@ public class LauncherModel extends BroadcastReceiver * use partial updates similar to {@link UserManagerCompat} */ public void refreshShortcutsIfRequired() { if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { sWorker.removeCallbacks(mShortcutPermissionCheckRunnable); sWorker.post(mShortcutPermissionCheckRunnable); } Loading src/com/android/launcher3/Utilities.java +6 −8 Original line number Diff line number Diff line Loading @@ -84,13 +84,11 @@ public final class Utilities { private static final int[] sLoc0 = new int[2]; private static final int[] sLoc1 = new int[2]; public static boolean isNycMR1OrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; } public static final boolean ATLEAST_NOUGAT_MR1 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; public static boolean isNycOrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; } public static final boolean ATLEAST_NOUGAT = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; public static final boolean ATLEAST_MARSHMALLOW = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; Loading Loading @@ -137,7 +135,7 @@ public final class Utilities { } public static boolean getAllowRotationDefaultValue(Context context) { if (isNycOrAbove()) { if (ATLEAST_NOUGAT) { // If the device was scaled, used the original dimensions to determine if rotation // is allowed of not. Resources res = context.getResources(); Loading Loading @@ -619,7 +617,7 @@ public final class Utilities { } public static boolean isWallpaperAllowed(Context context) { if (isNycOrAbove()) { if (ATLEAST_NOUGAT) { try { WallpaperManager wm = context.getSystemService(WallpaperManager.class); return (Boolean) wm.getClass().getDeclaredMethod("isSetWallpaperAllowed") Loading src/com/android/launcher3/compat/AlphabeticIndexCompat.java +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ public class AlphabeticIndexCompat { BaseIndex index = null; try { if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { index = new AlphabeticIndexVN(context); } } catch (Exception e) { Loading Loading
src/com/android/launcher3/Launcher.java +4 −4 Original line number Diff line number Diff line Loading @@ -365,7 +365,7 @@ public class Launcher extends Activity ? app.getInvariantDeviceProfile().landscapeProfile : app.getInvariantDeviceProfile().portraitProfile; if (Utilities.isNycOrAbove() && isInMultiWindowMode()) { if (Utilities.ATLEAST_NOUGAT && isInMultiWindowMode()) { Display display = getWindowManager().getDefaultDisplay(); Point mwSize = new Point(); display.getSize(mwSize); Loading Loading @@ -466,7 +466,7 @@ public class Launcher extends Activity private void loadExtractedColorsAndColorItems() { // TODO: do this in pre-N as well, once the extraction part is complete. if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { mExtractedColors.load(this); mHotseat.updateColor(mExtractedColors, !mPaused); mWorkspace.getPageIndicator().updateColor(mExtractedColors); Loading Loading @@ -913,7 +913,7 @@ public class Launcher extends Activity mLauncherCallbacks.onStop(); } if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { mAppWidgetHost.stopListening(); } } Loading @@ -927,7 +927,7 @@ public class Launcher extends Activity mLauncherCallbacks.onStart(); } if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { mAppWidgetHost.startListening(); } } Loading
src/com/android/launcher3/LauncherAppState.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class LauncherAppState { filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE); filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNLOCKED); // For extracting colors from the wallpaper if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { // TODO: add a broadcast entry to the manifest for pre-N. filter.addAction(Intent.ACTION_WALLPAPER_CHANGED); } Loading
src/com/android/launcher3/LauncherModel.java +1 −1 Original line number Diff line number Diff line Loading @@ -2692,7 +2692,7 @@ public class LauncherModel extends BroadcastReceiver * use partial updates similar to {@link UserManagerCompat} */ public void refreshShortcutsIfRequired() { if (Utilities.isNycMR1OrAbove()) { if (Utilities.ATLEAST_NOUGAT_MR1) { sWorker.removeCallbacks(mShortcutPermissionCheckRunnable); sWorker.post(mShortcutPermissionCheckRunnable); } Loading
src/com/android/launcher3/Utilities.java +6 −8 Original line number Diff line number Diff line Loading @@ -84,13 +84,11 @@ public final class Utilities { private static final int[] sLoc0 = new int[2]; private static final int[] sLoc1 = new int[2]; public static boolean isNycMR1OrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; } public static final boolean ATLEAST_NOUGAT_MR1 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; public static boolean isNycOrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; } public static final boolean ATLEAST_NOUGAT = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; public static final boolean ATLEAST_MARSHMALLOW = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; Loading Loading @@ -137,7 +135,7 @@ public final class Utilities { } public static boolean getAllowRotationDefaultValue(Context context) { if (isNycOrAbove()) { if (ATLEAST_NOUGAT) { // If the device was scaled, used the original dimensions to determine if rotation // is allowed of not. Resources res = context.getResources(); Loading Loading @@ -619,7 +617,7 @@ public final class Utilities { } public static boolean isWallpaperAllowed(Context context) { if (isNycOrAbove()) { if (ATLEAST_NOUGAT) { try { WallpaperManager wm = context.getSystemService(WallpaperManager.class); return (Boolean) wm.getClass().getDeclaredMethod("isSetWallpaperAllowed") Loading
src/com/android/launcher3/compat/AlphabeticIndexCompat.java +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ public class AlphabeticIndexCompat { BaseIndex index = null; try { if (Utilities.isNycOrAbove()) { if (Utilities.ATLEAST_NOUGAT) { index = new AlphabeticIndexVN(context); } } catch (Exception e) { Loading