Moved app settings button

pull/194/merge
M66B 3 years ago
parent 1a40bf5109
commit ab9c1c75ec

@ -122,7 +122,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swCleanupAttachments; private SwitchCompat swCleanupAttachments;
private Button btnCleanup; private Button btnCleanup;
private TextView tvLastCleanup; private TextView tvLastCleanup;
private Button btnApp;
private Button btnMore; private Button btnMore;
private SwitchCompat swProtocol; private SwitchCompat swProtocol;
private SwitchCompat swLogInfo; private SwitchCompat swLogInfo;
@ -268,7 +267,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments); swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments);
btnCleanup = view.findViewById(R.id.btnCleanup); btnCleanup = view.findViewById(R.id.btnCleanup);
tvLastCleanup = view.findViewById(R.id.tvLastCleanup); tvLastCleanup = view.findViewById(R.id.tvLastCleanup);
btnApp = view.findViewById(R.id.btnApp);
btnMore = view.findViewById(R.id.btnMore); btnMore = view.findViewById(R.id.btnMore);
swProtocol = view.findViewById(R.id.swProtocol); swProtocol = view.findViewById(R.id.swProtocol);
swLogInfo = view.findViewById(R.id.swLogInfo); swLogInfo = view.findViewById(R.id.swLogInfo);
@ -631,19 +629,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
} }
}); });
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);
}
}
});
btnMore.setOnClickListener(new View.OnClickListener() { btnMore.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {

@ -108,6 +108,8 @@ public class FragmentSetup extends FragmentBase {
private Button btnInbox; private Button btnInbox;
private Button btnApp;
private Group grpInexactAlarms; private Group grpInexactAlarms;
private Group grpBackgroundRestricted; private Group grpBackgroundRestricted;
private Group grpDataSaver; private Group grpDataSaver;
@ -175,6 +177,8 @@ public class FragmentSetup extends FragmentBase {
btnInbox = view.findViewById(R.id.btnInbox); btnInbox = view.findViewById(R.id.btnInbox);
btnApp = view.findViewById(R.id.btnApp);
grpInexactAlarms = view.findViewById(R.id.grpInexactAlarms); grpInexactAlarms = view.findViewById(R.id.grpInexactAlarms);
grpBackgroundRestricted = view.findViewById(R.id.grpBackgroundRestricted); grpBackgroundRestricted = view.findViewById(R.id.grpBackgroundRestricted);
grpDataSaver = view.findViewById(R.id.grpDataSaver); 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 // Initialize
FragmentDialogTheme.setBackground(getContext(), view, false); FragmentDialogTheme.setBackground(getContext(), view, false);

@ -497,18 +497,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCleanupHint" /> app:layout_constraintTop_toBottomOf="@id/tvCleanupHint" />
<Button
android:id="@+id/btnApp"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_settings_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_app"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvLastCleanup" />
<Button <Button
android:id="@+id/btnMore" android:id="@+id/btnMore"
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"
@ -519,7 +507,7 @@
android:drawablePadding="6dp" android:drawablePadding="6dp"
android:text="@string/title_advanced_more" android:text="@string/title_advanced_more"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnApp" /> app:layout_constraintTop_toBottomOf="@id/tvLastCleanup" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swProtocol" android:id="@+id/swProtocol"

@ -874,6 +874,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvBatteryUsage" /> app:layout_constraintTop_toBottomOf="@id/tvBatteryUsage" />
<Button
android:id="@+id/btnApp"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_settings_24"
android:drawablePadding="6dp"
android:text="@string/title_advanced_app"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSyncStopped" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/grpInexactAlarms" android:id="@+id/grpInexactAlarms"
android:layout_width="0dp" android:layout_width="0dp"

Loading…
Cancel
Save