Moved delete contacts

This commit is contained in:
M66B
2019-03-15 07:01:04 +00:00
parent 08d7d51e57
commit 83e4197bf9
4 changed files with 66 additions and 28 deletions

View File

@@ -179,34 +179,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
}
});
drawerList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
DrawerItem item = drawerArray.getItem(position);
if (item == null)
return false;
if (item.getMenuId() == R.string.menu_privacy) {
new SimpleTask<Void>() {
@Override
protected Void onExecute(Context context, Bundle args) {
int count = DB.getInstance(context).contact().clearContacts();
Log.i("Cleared contacts=" + count);
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(ActivitySetup.this, ActivitySetup.this, ex);
}
}.execute(ActivitySetup.this, new Bundle(), "setup:privacy");
return true;
}
return false;
}
});
List<DrawerItem> items = new ArrayList<>();
PackageManager pm = getPackageManager();