Skip to content

Commit

Permalink
Merge pull request #518 from Donnnno/omega-launcher
Browse files Browse the repository at this point in the history
omega launcher support #499
  • Loading branch information
Donnnno committed Oct 7, 2021
2 parents 5c6450d + 6e23ba9 commit 92a98a9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/res/values/launchers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<item>next</item>
<item>nougat</item>
<item>nova</item>
<item>omega</item>
<item>pixel</item>
<item>poco</item>
<item>posidon</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private enum Launcher {
UNKNOWN, ACTION, ADW, APEX, ATOM, AVIATE, CMTHEME, GO, HOLO, HOLOHD, LAWNCHAIR,
LGHOME, LGHOME3, LUCID, MINI, NEXT, NOVA, PIXEL, SMART, SOLO, ZENUI, NOUGAT, M,
ZERO, V, ABC, EVIE, POCO, POSIDON, MICROSOFT, FLICK, BLACKBERRY, SQUARE, NIAGARA,
HYPERION
HYPERION, OMEGA
}

private static Launcher getLauncher(String packageName) {
Expand Down Expand Up @@ -124,6 +124,9 @@ private static Launcher getLauncher(String packageName) {
return Launcher.BLACKBERRY;
case "projekt.launcher":
return Launcher.HYPERION;
case "com.saggitt.omega":
case "com.saggitt.omega.OmegaLauncher":
return Launcher.OMEGA;
default:
return Launcher.UNKNOWN;
}
Expand Down Expand Up @@ -393,6 +396,16 @@ private static void applyLauncher(@NonNull Context context, String launcherPacka
openGooglePlay(context, launcherPackage, launcherName);
}
break;
case OMEGA:
try {
final Intent omega = new Intent("com.saggitt.omega.APPLY_ICONS", null);
omega.putExtra("packageName", context.getPackageName());
context.startActivity(omega);
((AppCompatActivity) context).finish();
} catch (ActivityNotFoundException | NullPointerException e) {
openGooglePlay(context, launcherPackage, launcherName);
}
break;
case NOUGAT:
try {
/*
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions libs/candybar/src/main/res/values/dashboard_launchers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<item>Square</item> <!-- 30 -->
<item>Niagara</item> <!-- 31 -->
<item>Hyperion</item> <!-- 32 -->
<item>Omega</item> <!-- 33 -->
</string-array>

<array name="launcher_icons">
Expand Down Expand Up @@ -71,6 +72,7 @@
<item>@drawable/ic_launcher_square</item> <!-- 30 -->
<item>@drawable/ic_launcher_niagara</item> <!-- 31 -->
<item>@drawable/ic_launcher_hyperion</item> <!-- 32 -->
<item>@drawable/ic_launcher_omega</item> <!-- 33 -->
</array>

<!-- Launcher Packages -->
Expand Down Expand Up @@ -108,6 +110,7 @@
<item>com.ss.squarehome2</item> <!-- 30 -->
<item>bitpit.launcher</item> <!-- 31 -->
<item>projekt.launcher</item> <!-- 32 -->
<item>com.saggitt.omega.OmegaLauncher</item> <!-- 33 -->
</string-array>

<string-array name="launcher_packages_2">
Expand Down Expand Up @@ -144,6 +147,7 @@
<item>none</item> <!-- 30 -->
<item>none</item> <!-- 31 -->
<item>none</item> <!-- 32 -->
<item>com.saggitt.omega</item> <!-- 33 -->
</string-array>

<string-array name="launcher_packages_3">
Expand Down Expand Up @@ -180,6 +184,7 @@
<item>none</item> <!-- 30 -->
<item>none</item> <!-- 31 -->
<item>none</item> <!-- 32 -->
<item>none</item> <!-- 33 -->
</string-array>

</resources>
2 changes: 2 additions & 0 deletions libs/candybar/src/main/res/values/launchers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<item>holo</item>
<item>holo_hd</item>
<item>hyperion</item>
<item>kiss</item>
<item>lawnchair</item>
<item>lg_home</item>
<item>lucid</item>
Expand All @@ -28,6 +29,7 @@
<item>next</item>
<item>nougat</item>
<item>nova</item>
<item>omega</item>
<item>pixel</item>
<item>poco</item>
<item>posidon</item>
Expand Down

0 comments on commit 92a98a9

Please sign in to comment.