Moved app settings button

This commit is contained in:
M66B
2022-01-17 18:55:38 +01:00
parent 1a40bf5109
commit ab9c1c75ec
4 changed files with 30 additions and 28 deletions

View File

@@ -108,6 +108,8 @@ public class FragmentSetup extends FragmentBase {
private Button btnInbox;
private Button btnApp;
private Group grpInexactAlarms;
private Group grpBackgroundRestricted;
private Group grpDataSaver;
@@ -175,6 +177,8 @@ public class FragmentSetup extends FragmentBase {
btnInbox = view.findViewById(R.id.btnInbox);
btnApp = view.findViewById(R.id.btnApp);
grpInexactAlarms = view.findViewById(R.id.grpInexactAlarms);
grpBackgroundRestricted = view.findViewById(R.id.grpBackgroundRestricted);
grpDataSaver = view.findViewById(R.id.grpDataSaver);
@@ -541,6 +545,19 @@ public class FragmentSetup extends FragmentBase {
}
});
final Intent app = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
app.setData(Uri.parse("package:" + getContext().getPackageName()));
btnApp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
getContext().startActivity(app);
} catch (Throwable ex) {
Helper.reportNoViewer(getContext(), app, ex);
}
}
});
// Initialize
FragmentDialogTheme.setBackground(getContext(), view, false);