OSDN Git Service

Partially revert previous commit
authorBraden Farmer <farmerbb@gmail.com>
Fri, 5 Apr 2019 03:36:09 +0000 (21:36 -0600)
committerBraden Farmer <farmerbb@gmail.com>
Fri, 5 Apr 2019 03:36:09 +0000 (21:36 -0600)
app/src/main/java/com/farmerbb/taskbar/util/U.java

index b2e0190..7fecf57 100644 (file)
@@ -1240,36 +1240,29 @@ public class U {
         }
 
         // Customizations for BlissOS
-        if(isBlissOs(context)) {
-            if(getCurrentApiVersion() >= 28.0f) {
-                try {
-                    Settings.System.putString(context.getContentResolver(), "navigation_bar_show", "null");
-                } catch (Exception e) { /* Gracefully fail */ }
-            }
+        if(isBlissOs(context) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+                && !pref.getBoolean("bliss_os_prefs", false)) {
+            SharedPreferences.Editor editor = pref.edit();
 
-            if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
-                    && !pref.getBoolean("bliss_os_prefs", false)) {
-                SharedPreferences.Editor editor = pref.edit();
-
-                if(hasFreeformSupport(context))
-                    editor.putBoolean("freeform_hack", true);
-
-                editor.putString("recents_amount", "running_apps_only");
-                editor.putString("refresh_frequency", "0");
-                editor.putString("max_num_of_recents", "2147483647");
-                editor.putString("sort_order", "true");
-                editor.putString("window_size", "phone_size");
-                editor.putBoolean("full_length", true);
-                editor.putBoolean("dashboard", true);
-                editor.putBoolean("app_drawer_icon", true);
-                editor.putBoolean("button_back", true);
-                editor.putBoolean("button_home", true);
-                editor.putBoolean("button_recents", true);
-                editor.putBoolean("auto_hide_navbar", true);
-                // editor.putBoolean("shortcut_icon", false);
-                editor.putBoolean("bliss_os_prefs", true);
-                editor.apply();
+            if(hasFreeformSupport(context)) {
+                editor.putBoolean("freeform_hack", true);
             }
+
+            editor.putString("recents_amount", "running_apps_only");
+            editor.putString("refresh_frequency", "0");
+            editor.putString("max_num_of_recents", "2147483647");
+            editor.putString("sort_order", "true");
+            editor.putString("window_size", "phone_size");
+            editor.putBoolean("full_length", true);
+            editor.putBoolean("dashboard", true);
+            editor.putBoolean("app_drawer_icon", true);
+            editor.putBoolean("button_back", true);
+            editor.putBoolean("button_home", true);
+            editor.putBoolean("button_recents", true);
+            editor.putBoolean("auto_hide_navbar", true);
+         // editor.putBoolean("shortcut_icon", false);
+            editor.putBoolean("bliss_os_prefs", true);
+            editor.apply();
         }
 
         // Customizations for Android-x86 devices (non-Bliss)