Loading AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.launcher3"> <uses-sdk android:targetSdkVersion="19" android:minSdkVersion="16"/> <uses-sdk android:targetSdkVersion="21" android:minSdkVersion="16"/> <permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" Loading src/com/android/launcher3/Folder.java +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList Animator openFolderAnim = null; final Runnable onCompleteRunnable; if (!Utilities.isLmp()) { if (!Utilities.isLmpOrAbove()) { positionAndSizeAsIcon(); centerAboutIcon(); Loading src/com/android/launcher3/Launcher.java +7 −7 Original line number Diff line number Diff line Loading @@ -1650,7 +1650,7 @@ public class Launcher extends Activity // TODO(sansid): use the APIs directly when compiling against L sdk. // Currently we use reflection to access the flags and the API to set the transparency // on the System bars. if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { try { getWindow().getAttributes().systemUiVisibility |= (View.SYSTEM_UI_FLAG_LAYOUT_STABLE Loading Loading @@ -2809,7 +2809,7 @@ public class Launcher extends Activity Bundle optsBundle = null; if (useLaunchAnimation) { ActivityOptions opts = Utilities.isLmp() ? ActivityOptions opts = Utilities.isLmpOrAbove() ? ActivityOptions.makeCustomAnimation(this, R.anim.task_open_enter, R.anim.no_anim) : ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); optsBundle = opts.toBundle(); Loading Loading @@ -2920,7 +2920,7 @@ public class Launcher extends Activity ObjectAnimator oa = LauncherAnimUtils.ofPropertyValuesHolder(mFolderIconImageView, alpha, scaleX, scaleY); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { oa.setInterpolator(new LogDecelerateInterpolator(100, 0)); } oa.setDuration(getResources().getInteger(R.integer.config_folderExpandDuration)); Loading Loading @@ -3194,7 +3194,7 @@ public class Launcher extends Activity mStateAnimation = null; } boolean material = Utilities.isLmp(); boolean material = Utilities.isLmpOrAbove(); final Resources res = getResources(); Loading Loading @@ -3376,7 +3376,7 @@ public class Launcher extends Activity dispatchOnLauncherTransitionStart(toView, animated, false); revealView.setAlpha(initAlpha); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { Loading Loading @@ -3431,7 +3431,7 @@ public class Launcher extends Activity mStateAnimation = null; } boolean material = Utilities.isLmp(); boolean material = Utilities.isLmpOrAbove(); Resources res = getResources(); final int duration = res.getInteger(R.integer.config_appsCustomizeZoomOutTime); Loading Loading @@ -3651,7 +3651,7 @@ public class Launcher extends Activity dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { Loading src/com/android/launcher3/Utilities.java +3 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,10 @@ public final class Utilities { } /** * Indicates if the device is running LMP or not. * TODO(sansid): Change the check to a VERSION_CODES code check once we have a version for L. * Indicates if the device is running LMP or higher. */ public static boolean isLmp() { return "L".equals(Build.VERSION.CODENAME); public static boolean isLmpOrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.L; } /** Loading src/com/android/launcher3/compat/AppWidgetManagerCompat.java +1 −2 Original line number Diff line number Diff line Loading @@ -38,9 +38,8 @@ public abstract class AppWidgetManagerCompat { public static AppWidgetManagerCompat getInstance(Context context) { synchronized (sInstanceLock) { // TODO change this to use api version once L gets an API number. if (sInstance == null) { if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { sInstance = new AppWidgetManagerCompatVL(context.getApplicationContext()); } else { sInstance = new AppWidgetManagerCompatV16(context.getApplicationContext()); Loading Loading
AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.launcher3"> <uses-sdk android:targetSdkVersion="19" android:minSdkVersion="16"/> <uses-sdk android:targetSdkVersion="21" android:minSdkVersion="16"/> <permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" Loading
src/com/android/launcher3/Folder.java +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList Animator openFolderAnim = null; final Runnable onCompleteRunnable; if (!Utilities.isLmp()) { if (!Utilities.isLmpOrAbove()) { positionAndSizeAsIcon(); centerAboutIcon(); Loading
src/com/android/launcher3/Launcher.java +7 −7 Original line number Diff line number Diff line Loading @@ -1650,7 +1650,7 @@ public class Launcher extends Activity // TODO(sansid): use the APIs directly when compiling against L sdk. // Currently we use reflection to access the flags and the API to set the transparency // on the System bars. if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { try { getWindow().getAttributes().systemUiVisibility |= (View.SYSTEM_UI_FLAG_LAYOUT_STABLE Loading Loading @@ -2809,7 +2809,7 @@ public class Launcher extends Activity Bundle optsBundle = null; if (useLaunchAnimation) { ActivityOptions opts = Utilities.isLmp() ? ActivityOptions opts = Utilities.isLmpOrAbove() ? ActivityOptions.makeCustomAnimation(this, R.anim.task_open_enter, R.anim.no_anim) : ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); optsBundle = opts.toBundle(); Loading Loading @@ -2920,7 +2920,7 @@ public class Launcher extends Activity ObjectAnimator oa = LauncherAnimUtils.ofPropertyValuesHolder(mFolderIconImageView, alpha, scaleX, scaleY); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { oa.setInterpolator(new LogDecelerateInterpolator(100, 0)); } oa.setDuration(getResources().getInteger(R.integer.config_folderExpandDuration)); Loading Loading @@ -3194,7 +3194,7 @@ public class Launcher extends Activity mStateAnimation = null; } boolean material = Utilities.isLmp(); boolean material = Utilities.isLmpOrAbove(); final Resources res = getResources(); Loading Loading @@ -3376,7 +3376,7 @@ public class Launcher extends Activity dispatchOnLauncherTransitionStart(toView, animated, false); revealView.setAlpha(initAlpha); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { Loading Loading @@ -3431,7 +3431,7 @@ public class Launcher extends Activity mStateAnimation = null; } boolean material = Utilities.isLmp(); boolean material = Utilities.isLmpOrAbove(); Resources res = getResources(); final int duration = res.getInteger(R.integer.config_appsCustomizeZoomOutTime); Loading Loading @@ -3651,7 +3651,7 @@ public class Launcher extends Activity dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { Loading
src/com/android/launcher3/Utilities.java +3 −4 Original line number Diff line number Diff line Loading @@ -103,11 +103,10 @@ public final class Utilities { } /** * Indicates if the device is running LMP or not. * TODO(sansid): Change the check to a VERSION_CODES code check once we have a version for L. * Indicates if the device is running LMP or higher. */ public static boolean isLmp() { return "L".equals(Build.VERSION.CODENAME); public static boolean isLmpOrAbove() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.L; } /** Loading
src/com/android/launcher3/compat/AppWidgetManagerCompat.java +1 −2 Original line number Diff line number Diff line Loading @@ -38,9 +38,8 @@ public abstract class AppWidgetManagerCompat { public static AppWidgetManagerCompat getInstance(Context context) { synchronized (sInstanceLock) { // TODO change this to use api version once L gets an API number. if (sInstance == null) { if (Utilities.isLmp()) { if (Utilities.isLmpOrAbove()) { sInstance = new AppWidgetManagerCompatVL(context.getApplicationContext()); } else { sInstance = new AppWidgetManagerCompatV16(context.getApplicationContext()); Loading