Don't allow MainActivity to restore its instance state (fixes issues with Taskbar starting itself due to MainActivity going through a config change while in the background)
@@ -36,6 +36,7 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SwitchCompat;
@@ -488,4 +489,9 @@ public class MainActivity extends AppCompatActivity {
AlertDialog dialog = builder.create();
dialog.show();
}
+
+ @Override
+ protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
+ // MainActivity manually handles its own state restoration
+ }
}
