Moved manage notifications to tab page

This commit is contained in:
M66B
2019-06-14 19:05:28 +02:00
parent fb1007e9cf
commit 50c3a7b6a9
3 changed files with 36 additions and 22 deletions

View File

@@ -40,7 +40,6 @@ import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MenuItem;
@@ -187,15 +186,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
}
}).setSeparated());
if (getIntentNotifications(this).resolveActivity(pm) != null)
menus.add(new NavMenuItem(R.drawable.baseline_notifications_24, R.string.title_setup_notifications, new Runnable() {
@Override
public void run() {
drawerLayout.closeDrawer(drawerContainer);
onManageNotifications();
}
}));
menus.add(new NavMenuItem(R.drawable.baseline_reorder_24, R.string.title_setup_reorder_accounts, new Runnable() {
@Override
public void run() {
@@ -441,10 +431,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
.show();
}
private void onManageNotifications() {
startActivity(getIntentNotifications(this));
}
private void onMenuOrder(int title, Class clazz) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
getSupportFragmentManager().popBackStack("order", FragmentManager.POP_BACK_STACK_INCLUSIVE);
@@ -557,13 +543,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
fragmentTransaction.commit();
}
private static Intent getIntentNotifications(Context context) {
return new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS)
.putExtra("app_package", context.getPackageName())
.putExtra("app_uid", context.getApplicationInfo().uid)
.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
}
private static Intent getIntentExport() {
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);