From c0fda61838496539dceb17cc828b1c947b8a4f3d Mon Sep 17 00:00:00 2001 From: mdespesse Date: Thu, 26 Sep 2024 22:35:32 +0200 Subject: [PATCH] Add support for Projectivy Launcher --- app/src/main/AndroidManifest.xml | 5 ++++ .../candybar/lib/helpers/IntentHelper.java | 2 ++ .../candybar/lib/helpers/LauncherHelper.java | 25 ++++++++++++++++++ .../ic_launcher_projectivy.png | Bin 0 -> 6734 bytes library/src/main/res/values/launchers.xml | 1 + .../main/res/xml/dashboard_contributors.xml | 6 +++++ 6 files changed, 39 insertions(+) create mode 100644 library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6de18d649..9886b5bf4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -163,6 +163,11 @@ + + + + + diff --git a/library/src/main/java/candybar/lib/helpers/IntentHelper.java b/library/src/main/java/candybar/lib/helpers/IntentHelper.java index 91fe6b961..e2cd976c4 100644 --- a/library/src/main/java/candybar/lib/helpers/IntentHelper.java +++ b/library/src/main/java/candybar/lib/helpers/IntentHelper.java @@ -37,6 +37,7 @@ public class IntentHelper { private static final String ACTION_NOVA_LAUNCHER = "com.novalauncher.THEME"; private static final String ACTION_ONEPLUS_PICK_ICON = "net.oneplus.launcher.icons.ACTION_PICK_ICON"; private static final String ACTION_PLUS_HOME = "jp.co.a_tm.android.launcher.icons.ACTION_PICK_ICON"; + private static final String ACTION_PROJECTIVY_PICK_ICON = "com.spocky.projengmenu.icons.ACTION_PICK_ICON"; public static int getAction(@Nullable Intent intent) { if (intent == null) return ACTION_DEFAULT; @@ -49,6 +50,7 @@ public static int getAction(@Nullable Intent intent) { case ACTION_NOVA_LAUNCHER: case ACTION_ONEPLUS_PICK_ICON: case ACTION_PLUS_HOME: + case ACTION_PROJECTIVY_PICK_ICON: return ICON_PICKER; case Intent.ACTION_PICK: case Intent.ACTION_GET_CONTENT: diff --git a/library/src/main/java/candybar/lib/helpers/LauncherHelper.java b/library/src/main/java/candybar/lib/helpers/LauncherHelper.java index 43169771d..094b4e111 100644 --- a/library/src/main/java/candybar/lib/helpers/LauncherHelper.java +++ b/library/src/main/java/candybar/lib/helpers/LauncherHelper.java @@ -138,6 +138,11 @@ public enum Launcher { R.drawable.ic_launcher_pixel, new String[]{"com.google.android.apps.nexuslauncher"}, false), + PROJECTIVY( + "Projectivy", + R.drawable.ic_launcher_projectivy, + new String[]{"com.spocky.projengmenu"}, + true), SMART( "Smart", R.drawable.ic_launcher_smart, @@ -690,6 +695,26 @@ private static void applyLauncher(@NonNull Context context, String launcherPacka case POCO: applyManual(context, launcherPackage, launcherName, "com.miui.home.settings.HomeSettingsActivity"); break; + case PROJECTIVY: + try { + final Intent projectivy = new Intent("com.spocky.projengmenu.APPLY_ICONPACK"); + projectivy.setPackage("com.spocky.projengmenu"); + projectivy.putExtra("com.spocky.projengmenu.extra.ICONPACK_PACKAGENAME", context.getPackageName()); + projectivy.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(projectivy); + ((AppCompatActivity) context).finish(); + CandyBarApplication.getConfiguration().getAnalyticsHandler().logEvent( + "click", + new HashMap() {{ + put("section", "apply"); + put("action", "confirm"); + put("launcher", launcherPackage); + }} + ); + } catch (ActivityNotFoundException | NullPointerException e) { + openGooglePlay(context, launcherPackage, launcherName); + } + break; case ONEUI: applyOneUI(context, launcherName); break; diff --git a/library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png b/library/src/main/res/drawable-xxxhdpi/ic_launcher_projectivy.png new file mode 100644 index 0000000000000000000000000000000000000000..4b66f79c71ece0c8558367d3a455e1c2e0e5304a GIT binary patch literal 6734 zcmeHM=QrHZ7X6LUnULs&5E)&FmLNJo^v;N0qj%AXh=^{45IqE=cSbMKdyP)?5hY5- zDC2p5!u$R{oORDWU(Q{7-L==<=R|3$D?*6ri2(qBC@aZp0|4kQ1p$QkcgGu#BHRBW zPi;k6pnUY<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SK8$?1fW0i*gyCzy$0e4=D*9x5X0r_(yuDL61NdPtE2GYk``CiacCn+DT zE`@zZ*%f)2<>w@m0oOPaYDuG&xf_Swha{h2?oIvT3{J&L>o~d$J+p1ZUcQkofGQPM zzo`k`>{|H5DLSUOr`6balApEpuwbIT3OSt;xm`oR%w!MkYk5b?*tgBo6wCX!m;%_5 z{`Bv+SmYov?4~MuY>3+lvq1wozbW)N;B&4gaQ(*X@s=i=6lJcwv#rPYaa1%xmL2Dx zOb4GQn#H*7m!5Dj_?y`8{G1+PSB}wpY6ss8CskXQs}q$r@V!HD*7R*s5$jYX39E)| zqg1QWCV?#pA|Oo)Boxygenos pixel poco + projectivy realme_ui samsung_one_ui smart diff --git a/library/src/main/res/xml/dashboard_contributors.xml b/library/src/main/res/xml/dashboard_contributors.xml index f840baad3..07cc8f5d5 100644 --- a/library/src/main/res/xml/dashboard_contributors.xml +++ b/library/src/main/res/xml/dashboard_contributors.xml @@ -49,6 +49,12 @@ image="https://github.com/maxtron95.png" link="https://github.com/maxtron95" /> + +