Removing developer options check for app info target
Bug: 21626561 Change-Id: Ic65155ca5b1e5268ccdf2b20295a5067d5d3fa5d
This commit is contained in:
parent
2d0fc8dccd
commit
d7da55fc32
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue