Removing developer options check for app info target

Bug: 21626561
Change-Id: Ic65155ca5b1e5268ccdf2b20295a5067d5d3fa5d
This commit is contained in:
Sunny Goyal 2015-06-12 12:25:45 -07:00
parent 2d0fc8dccd
commit d7da55fc32
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