Merge "Removing developer options check for app info target" into ub-launcher3-burnaby

This commit is contained in:
Sunny Goyal 2015-06-12 19:28:34 +00:00 committed by Android (Google) Code Review
commit 3d2e49d7b9
1 changed files with 1 additions and 14 deletions

View File

@ -16,11 +16,8 @@
package com.android.launcher3;
import android.annotation.TargetApi;
import android.content.ComponentName;
import android.content.Context;
import android.os.Build;
import android.provider.Settings;
import android.util.AttributeSet;
import com.android.launcher3.compat.UserHandleCompat;
@ -70,18 +67,8 @@ public class InfoDropTarget extends ButtonDropTarget {
return source.supportsAppInfoDropTarget() && supportsDrop(getContext(), info);
}
@SuppressWarnings("deprecation")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static boolean supportsDrop(Context context, Object info) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
return (Settings.Global.getInt(context.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) == 1) &&
(info instanceof AppInfo || info instanceof PendingAddItemInfo);
} else {
return (Settings.Secure.getInt(context.getContentResolver(),
Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 0) == 1) &&
(info instanceof AppInfo || info instanceof PendingAddItemInfo);
}
return info instanceof AppInfo || info instanceof PendingAddItemInfo;
}
@Override