Let the framework handle long clicks
If we manually propagate long click events, the framework can't include coordinate information and we'll only be able to show a modal dialog. Since the default long-click behavior is to show the context menu, just let the framework handle it. Bug: 25214386 Change-Id: I32e14b326ac91cc5a9c2bf7581325daaba34298e
This commit is contained in:
@@ -101,13 +101,7 @@ public class AccessPointPreference extends Preference {
|
||||
if (mFragment != null) {
|
||||
view.itemView.setOnCreateContextMenuListener(mFragment);
|
||||
view.itemView.setTag(this);
|
||||
view.itemView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
view.itemView.showContextMenu();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
view.itemView.setLongClickable(true);
|
||||
}
|
||||
if (mAccessPoint == null) {
|
||||
// Used for dummy pref.
|
||||
|
Reference in New Issue
Block a user