// 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
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();
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));
mStateAnimation = null;
}
- boolean material = Utilities.isLmp();
+ boolean material = Utilities.isLmpOrAbove();
final Resources res = getResources();
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) {
mStateAnimation = null;
}
- boolean material = Utilities.isLmp();
+ boolean material = Utilities.isLmpOrAbove();
Resources res = getResources();
final int duration = res.getInteger(R.integer.config_appsCustomizeZoomOutTime);
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) {
import android.os.Build;
import android.os.Bundle;
+import com.android.launcher3.Utilities;
+
import java.util.List;
public abstract class LauncherAppsCompat {
public static LauncherAppsCompat getInstance(Context context) {
synchronized (sInstanceLock) {
- // STOPSHIP(kennyguy) change this to use api version once L gets an API number.
if (sInstance == null) {
- if ("L".equals(Build.VERSION.CODENAME)) {
+ if (Utilities.isLmpOrAbove()) {
sInstance = new LauncherAppsCompatVL(context.getApplicationContext());
} else {
sInstance = new LauncherAppsCompatV16(context.getApplicationContext());
import android.graphics.drawable.Drawable;
import android.os.Build;
+import com.android.launcher3.Utilities;
+
import java.util.List;
public abstract class UserManagerCompat {
}
public static UserManagerCompat getInstance(Context context) {
- // TODO change this to use api version once L gets an API number.
- if ("L".equals(Build.VERSION.CODENAME)) {
+ if (Utilities.isLmpOrAbove()) {
return new UserManagerCompatVL(context);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
return new UserManagerCompatV17(context);