findPreference(PREF_BACKGROUND_TINT_PREF).setOnPreferenceClickListener(this);
findPreference(PREF_ACCENT_COLOR_PREF).setOnPreferenceClickListener(this);
- if(U.isBlissOs(getActivity()))
- ((ListPreference) findPreference(PREF_START_BUTTON_IMAGE)).setEntries(R.array.tb_pref_start_button_image_list_alt);
+ if(U.isAndroidGeneric(getActivity())) {
+ String[] array = getResources().getStringArray(R.array.tb_pref_start_button_image_list);
+ String flavor = U.getSystemProperty("ro.ag.flavor");
+
+ if(flavor != null && flavor.length() > 0)
+ array[1] = flavor;
+ else
+ array[1] = getString(R.string.tb_pref_title_app_drawer_icon_bliss);
+
+ ((ListPreference) findPreference(PREF_START_BUTTON_IMAGE)).setEntries(array);
+ }
bindPreferenceSummaryToValue(findPreference(PREF_THEME));
bindPreferenceSummaryToValue(findPreference(PREF_INVISIBLE_BUTTON));
import androidx.annotation.VisibleForTesting;
import androidx.core.content.ContextCompat;
+import androidx.core.content.res.ResourcesCompat;
import androidx.core.graphics.ColorUtils;
import android.telephony.PhoneStateListener;
import android.telephony.SignalStrength;
case PREF_START_BUTTON_IMAGE_APP_LOGO:
Drawable drawable;
- if(U.isBlissOs(context)) {
- drawable = ContextCompat.getDrawable(context, R.drawable.tb_bliss);
- drawable.setTint(accentColor);
+ if(U.isAndroidGeneric(context)) {
+ try {
+ String bdPackageName = "com.boringdroid.systemui";
+ Resources res = context.getPackageManager().getResourcesForApplication(bdPackageName);
+ int id = res.getIdentifier("bt_all_apps", "drawable", bdPackageName);
+ drawable = ResourcesCompat.getDrawable(res, id, null);
+ } catch (Exception e) {
+ drawable = ContextCompat.getDrawable(context, R.drawable.tb_bliss);
+ drawable.setTint(accentColor);
+ }
} else {
LauncherApps launcherApps = (LauncherApps) context.getSystemService(Context.LAUNCHER_APPS_SERVICE);
LauncherActivityInfo info = launcherApps.getActivityList(context.getPackageName(), Process.myUserHandle()).get(0);
editor.putBoolean(PREF_FREEFORM_HACK, true);
}
- if(isBlissOs(context)) {
- editor.putString(PREF_START_BUTTON_IMAGE, PREF_START_BUTTON_IMAGE_APP_LOGO);
- }
-
+ editor.putString(PREF_START_BUTTON_IMAGE, PREF_START_BUTTON_IMAGE_APP_LOGO);
editor.putString(PREF_RECENTS_AMOUNT, PREF_RECENTS_AMOUNT_RUNNING_APPS_ONLY);
editor.putString(PREF_REFRESH_FREQUENCY, "0");
editor.putString(PREF_MAX_NUM_OF_RECENTS, "2147483647");
}
@SuppressLint("PrivateApi")
- private static String getSystemProperty(String key) {
+ public static String getSystemProperty(String key) {
allowReflection();
try {
Class<?> cls = Class.forName("android.os.SystemProperties");
<string name="tb_pref_title_app_drawer_icon">Das Logo von Taskbar als Menüknopf verwenden</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Das Logo von Taskbar als Menüknopf verwenden</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">%1$s kann nicht ausgewählt werden, da es auf der Liste der verborgenen Apps ist.</string>
<string name="tb_already_top_app">%1$s kann nicht ausgewählt werden, da es auf der Liste der top Apps ist.</string>
<string name="tb_pref_title_app_drawer_icon">Logo de Taskbar</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Logo de Bliss</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">No es posible seleccionar %1$s porque está en la lista de aplicaciones ocultas</string>
<string name="tb_already_top_app">No es posible seleccionar %1$s porque está en la lista de aplicaciones más populares</string>
<string name="tb_pref_title_app_drawer_icon">スタートメニューアイコンとして Taskbar ロゴを使用する</string>
<string name="tb_pref_title_app_drawer_icon_bliss">スタートメニューアイコンとして Taskbar ロゴを使用する</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">非表示アプリリストにあるため %1$s は選択できません</string>
<string name="tb_already_top_app">トップアプリリストにあるため %1$s は選択できません</string>
<string name="tb_pref_title_app_drawer_icon">Taakbalk-logo gebruiken als startmenu-pictogram</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Bliss-logo gebruiken als startmenu-pictogram</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">%1$s kan niet worden gekozen omdat hij op de verborgen apps-lijst staat</string>
<string name="tb_already_top_app">%1$s kan niet worden gekozen omdat hij op de top-apps-lijst staat</string>
<string name="tb_pref_title_anchor">Zakotwiczenie Taskbar podczas obracania ekranu</string>
<string name="tb_pref_title_app_drawer_icon">Logo Taskbar</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Logo Bliss</string>
+<string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_pref_title_background_tint">Barwa tła</string>
<string name="tb_pref_title_blacklist">Konfiguracja aplikacji w menu startowym</string>
<string name="tb_pref_title_chrome_os_context_menu_fix">Poprawka zgodności stacji dokującej Chrome OS</string>
<string name="tb_pref_title_app_drawer_icon">Использовать иконку Taskbar в качестве иконки меню</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Использовать иконку Taskbar в качестве иконки меню</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">%1$s нельзя выбрать, он уже в списке</string>
<string name="tb_already_top_app">%1$s нельзя выбрать, он уже в списке</string>
<string name="tb_pref_title_anchor">Ekran döndürmede Taskbar tut</string>
<string name="tb_pref_title_app_drawer_icon">Başlat menüsü simgesi olarak Taskbar logosunu kullan</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Başlat menüsü simgesi olarak Taskbar logosunu kullan</string>
+<string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_pref_title_background_tint">Arkaplan tonu</string>
<string name="tb_pref_title_blacklist">Uygulamaları başlangıç menüsünde yapılandır</string>
<string name="tb_pref_title_chrome_os_context_menu_fix">Chrome OS uyumluluğu düzeltmesi</string>
<string name="tb_pref_title_app_drawer_icon">使用 任务栏 徽标作为开始菜单图标</string>
<string name="tb_pref_title_app_drawer_icon_bliss">使用 任务栏 徽标作为开始菜单图标</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">%1$s 无法选中,因为在隐藏应用列表中</string>
<string name="tb_already_top_app">%1$s 无法选中,因为在置顶应用列表中</string>
<item>@string/tb_start_button_image_custom</item>
</string-array>
- <string-array name="tb_pref_start_button_image_list_alt">
- <item>@string/tb_start_button_image_default</item>
- <item>@string/tb_pref_title_app_drawer_icon_bliss</item>
- <item>@string/tb_start_button_image_custom</item>
- </string-array>
-
<string-array name="tb_pref_start_button_image_list_values">
<item>default</item>
<item>app_logo</item>
<string name="tb_pref_title_app_drawer_icon">Taskbar logo</string>
<string name="tb_pref_title_app_drawer_icon_bliss">Bliss logo</string>
+ <string name="tb_pref_title_app_drawer_icon_ag">%s logo</string>
<string name="tb_already_blacklisted">%1$s can\'t be selected because it is on the hidden apps list</string>
<string name="tb_already_top_app">%1$s can\'t be selected because it is on the top apps list</string>