Improved setup

This commit is contained in:
M66B
2019-01-15 09:46:25 +00:00
parent ffef493530
commit 711e887619
8 changed files with 110 additions and 66 deletions

View File

@@ -129,9 +129,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DrawerItem item = (DrawerItem) parent.getAdapter().getItem(position);
switch (item.getId()) {
case R.string.title_setup_help:
onMenuHelp();
break;
case R.string.title_setup_export:
onMenuExport();
break;
@@ -170,11 +167,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
PackageManager pm = getPackageManager();
DrawerAdapter drawerArray = new DrawerAdapter(this);
if (getIntentHelp().resolveActivity(pm) != null) {
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_live_help_24, R.string.title_setup_help));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
}
if (getIntentExport().resolveActivity(pm) != null)
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_archive_24, R.string.title_setup_export));
if (getIntentImport().resolveActivity(pm) != null)
@@ -333,10 +325,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
.show();
}
private void onMenuHelp() {
startActivity(getIntentHelp());
}
private void onManageNotifications() {
startActivity(getIntentNotifications(this));
}
@@ -410,12 +398,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
fragmentTransaction.commit();
}
private Intent getIntentHelp() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://github.com/M66B/open-source-email/blob/master/SETUP.md#setup-help"));
return intent;
}
private static Intent getIntentNotifications(Context context) {
return new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS)
.putExtra("app_package", context.getPackageName())