editor.putBoolean("taskbar_active", false);
// Ensure that components that should be enabled are enabled properly
- boolean launcherEnabled = (pref.getBoolean("launcher", false) && U.canDrawOverlays(this)) || U.hasSupportLibrary(this);
- editor.putBoolean("launcher", launcherEnabled);
+ boolean launcherEnabled = (pref.getBoolean("launcher", false) && U.canDrawOverlays(this))
+ || U.hasSupportLibrary(this)
+ || BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID);
+ editor.putBoolean("launcher", launcherEnabled);
editor.apply();
ComponentName component = new ComponentName(this, HomeActivity.class);
if(!launcherEnabled)
LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent("com.farmerbb.taskbar.KILL_HOME_ACTIVITY"));
- if(BuildConfig.APPLICATION_ID.equals(BuildConfig.BASE_APPLICATION_ID))
- proceedWithAppLaunch(savedInstanceState);
- else {
+ if(BuildConfig.APPLICATION_ID.equals(BuildConfig.PAID_APPLICATION_ID)) {
File file = new File(getFilesDir() + File.separator + "imported_successfully");
if(freeVersionInstalled() && !file.exists()) {
startActivity(new Intent(this, ImportSettingsActivity.class));
finish();
- } else {
+ } else
proceedWithAppLaunch(savedInstanceState);
- }
- }
+ } else
+ proceedWithAppLaunch(savedInstanceState);
}
private boolean freeVersionInstalled() {
bindPreferenceSummaryToValue(findPreference("dashboard"));
SharedPreferences pref = U.getSharedPreferences(getActivity());
- boolean lockHomeToggle = U.hasSupportLibrary(getActivity()) && pref.getBoolean("launcher", false);
+ boolean lockHomeToggle = pref.getBoolean("launcher", false)
+ && (U.hasSupportLibrary(getActivity())
+ || BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID));
findPreference("launcher").setEnabled(!lockHomeToggle);
}
pref.edit().putString("start_menu_layout", "grid").apply();
}
+ // Enable freeform hack automatically on supported devices
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
if(!pref.getBoolean("freeform_hack_override", false)) {
pref.edit()
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent("com.farmerbb.taskbar.FINISH_FREEFORM_ACTIVITY"));
}
}
+
+ // Customizations for Android-x86 devices (non-Bliss)
+ if(BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID)
+ && isSystemApp(context)
+ && !pref.getBoolean("android_x86_prefs", false)) {
+ pref.edit()
+ .putString("recents_amount", "running_apps_only")
+ .putString("refresh_frequency", "0")
+ .putString("max_num_of_recents", "2147483647")
+ .putBoolean("full_length", true)
+ .putBoolean("dashboard", true)
+ .putBoolean("android_x86_prefs", true)
+ .apply();
+ }
}
}