Trying one more thing to fix System UI crashes on Bliss OS Pie
@@ -1198,10 +1198,9 @@ public class U {
public static void showHideNavigationBar(Context context, boolean show) {
// Show or hide the system navigation bar on Bliss-x86
try {
- if(getCurrentApiVersion() >= 28.0f) {
- Settings.System.putInt(context.getContentResolver(), "navigation_bar_show", 1);
+ if(getCurrentApiVersion() >= 28.0f)
Settings.Secure.putInt(context.getContentResolver(), "navigation_bar_visible", show ? 1 : 0);
- } else
+ else
Settings.System.putInt(context.getContentResolver(), "navigation_bar_show", show ? 1 : 0);
} catch (Exception e) { /* Gracefully fail */ }
}
@@ -1241,13 +1240,19 @@ public class U {
}
// Customizations for BlissOS
- if(isBlissOs(context) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ if(isBlissOs(context)) {
+ if(getCurrentApiVersion() >= 28.0f) {
+ try {
+ Settings.System.putString(context.getContentResolver(), "navigation_bar_show", "null");
+ } catch (Exception e) { /* Gracefully fail */ }
+ }
+
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& !pref.getBoolean("bliss_os_prefs", false)) {
SharedPreferences.Editor editor = pref.edit();
- if(hasFreeformSupport(context)) {
+ if(hasFreeformSupport(context))
editor.putBoolean("freeform_hack", true);
- }
editor.putString("recents_amount", "running_apps_only");
editor.putString("refresh_frequency", "0");
@@ -1265,6 +1270,7 @@ public class U {
editor.putBoolean("bliss_os_prefs", true);
editor.apply();
}
+ }
// Customizations for Android-x86 devices (non-Bliss)
if(BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID)
