Added extra button

This commit is contained in:
M66B
2022-05-03 13:50:16 +02:00
parent ce5499e91f
commit c31ef322a0
2 changed files with 28 additions and 2 deletions

View File

@@ -116,6 +116,7 @@ public class FragmentSetup extends FragmentBase {
private CardView cardExtra;
private Button btnApp;
private Button btnNotification;
private Button btnDelete;
private Button btnMore;
private Button btnSupport;
@@ -190,6 +191,7 @@ public class FragmentSetup extends FragmentBase {
cardExtra = view.findViewById(R.id.cardExtra);
btnApp = view.findViewById(R.id.btnApp);
btnNotification = view.findViewById(R.id.btnNotification);
btnDelete = view.findViewById(R.id.btnDelete);
btnMore = view.findViewById(R.id.btnMore);
btnSupport = view.findViewById(R.id.btnSupport);
@@ -619,6 +621,18 @@ public class FragmentSetup extends FragmentBase {
}
});
final Intent channelService = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
.putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName())
.putExtra(Settings.EXTRA_CHANNEL_ID, "service");
btnNotification.setEnabled(channelService.resolveActivity(pm) != null); // system whitelisted
btnNotification.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(channelService);
}
});
btnMore.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {