findPreference(PREF_BUTTON_RECENTS).setOnPreferenceClickListener(this);
if(U.isShowHideNavbarSupported()
- && (U.isBlissOs(this) || U.hasSupportLibrary(this, 7)))
+ && (U.isBlissOs(this) || U.isProjectSakura(this) || U.hasSupportLibrary(this, 7)))
findPreference(PREF_AUTO_HIDE_NAVBAR).setOnPreferenceClickListener(this);
else
getPreferenceScreen().removePreference(findPreference(PREF_AUTO_HIDE_NAVBAR_CATEGORY));
case PREF_START_BUTTON_IMAGE_APP_LOGO:
Drawable drawable;
- if(U.isAndroidGeneric(context)) {
+ if(U.isBlissOs(context)) {
drawable = ContextCompat.getDrawable(context, R.drawable.tb_bliss);
+ } else if(U.isProjectSakura(context)) {
+ drawable = ContextCompat.getDrawable(context, R.drawable.tb_sakura);
} else {
LauncherApps launcherApps = (LauncherApps) context.getSystemService(Context.LAUNCHER_APPS_SERVICE);
LauncherActivityInfo info = launcherApps.getActivityList(context.getPackageName(), Process.myUserHandle()).get(0);
&& isSystemApp(context);
}
+ public static boolean isProjectSakura(Context context) {
+ boolean validSakuraBuildProp = false;
+
+ String sakuraVersion = getSystemProperty("ro.lineage.build.version");
+ if(sakuraVersion != null && !sakuraVersion.isEmpty())
+ validSakuraBuildProp = true;
+
+ return validSakuraBuildProp
+ && context.getPackageName().equals(BuildConfig.BASE_APPLICATION_ID)
+ && isSystemApp(context);
+ }
+
public static boolean isAndroidGeneric(Context context) {
- if(isBlissOs(context)) return true;
+ if(isBlissOs(context) || isProjectSakura(context)) return true;
boolean validAndroidGenericBuildProp = false;
if(!isShowHideNavbarSupported()
|| (!isDesktopModeActive(context)
&& !isBlissOs(context)
+ && !isProjectSakura(context)
&& !hasSupportLibrary(context, 7))) {
return;
}
return;
}
- // Show or hide the system navigation bar on Bliss-x86
- if(!isBlissOs(context)) return;
+ // Show or hide the system navigation bar on Bliss-x86 and Project Sakura
+ if(!isBlissOs(context) || !isProjectSakura(context)) return;
try {
if(getCurrentApiVersion() >= 28.0f)