-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added App Info Dialog Allow customizing app's display name, description, category, album App can be hidden via App Info Dialog Added preliminary shortcut system Added customization package support, yet not functional
- Loading branch information
1 parent
53779f5
commit 29420f8
Showing
27 changed files
with
1,081 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,4 @@ | ||
[CROSS_LAUNCHER_CUSTOMIZER] | ||
; Type of the customization, it can be SYSTEM, PLUGIN, GAME or APPS | ||
; SYSTEM : launcher's built-in icons | ||
; PLUGIN : Plugins | ||
; GAME or APPS : Android Game or Application (they behave the same) | ||
TYPE=GAME | ||
[PKG_METADATA] | ||
Name= | ||
|
||
; ID of the customized item icon | ||
; for Android apps / games, it's usually "app.packageName_activityName" | ||
; The activity name will have it's prefix removed in case the prefix is equals to app packageName | ||
; e.g "id.psw.vshlauncher_activities.XMB" (This app), "jp.co.bandainamcoent.BNEI0242_stage.StageUnityPlayerActivity" (iMAS CGSS) | ||
; for plugins, check the plugin icon customization guide, or find their icon ID | ||
TITLE_ID=id.psw.vshlauncher_activities.XMB | ||
|
||
; Author of the customization content | ||
; The one (or the corporation / company) who made the content, e.g Icons, Animated Icons, Backdrop, Background Sound | ||
AUTHOR=Icons by EmiyaSyahriel, Background Sound by PSW Software | ||
|
||
; Author of the package | ||
PACKAGER=EmiyaSyahriel | ||
|
||
; | ||
[P01] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[PKG_METADATA] | ||
; Title of this package file | ||
TITLE=CrossLauncher custom package | ||
|
||
; Author of the customization content | ||
; The one (or the corporation / company) who made the content, e.g Icons, Animated Icons, Backdrop, Background Sound | ||
AUTHOR=Icons by EmiyaSyahriel, Background Sound by PSW Software | ||
|
||
; Author of the package | ||
PACKAGER=EmiyaSyahriel | ||
|
||
; If present, Only installable if any of these apps is installed, separated by semicolon (';') | ||
CHECK_INSTALL=id.psw.crosslauncher;id.psw.xl | ||
|
||
; Main icon of this package file | ||
ICON=pkg/pkg_icon.png | ||
|
||
; Folder name, case sensitive | ||
[P01] | ||
|
||
; Type of the customization, it can be SYSTEM, PLUGIN, GAME or APPS | ||
; SYSTEM : launcher's built-in icons | ||
; PLUGIN : Plugins | ||
; GAME or APPS : Android Game or Application (they behave the same) | ||
TYPE=GAME | ||
|
||
; ID of the customized item icon | ||
; for Android apps / games, it's usually "app.packageName_activityName" | ||
; The activity name will have it's prefix removed in case the prefix is equals to app packageName | ||
; e.g "id.psw.vshlauncher_activities.XMB" (This app), "jp.co.bandainamcoent.BNEI0242_stage.StageUnityPlayerActivity" (iMAS CGSS) | ||
; for plugins, check the plugin icon customization guide, or find their icon ID | ||
TITLE_ID=id.psw.vshlauncher_activities.XMB | ||
|
||
; Where to unpack this folder's files, depending on specified type: | ||
; SYSTEM : relative to CrossLauncher's Virtual PS3 File System | ||
; PLUGIN : (fsroot)/home/00000000/plugins/(TITLE_ID) | ||
; GAME/APPS : (fsroot)/games/(TITLE_ID) | ||
; (fsroot) = CrossLauncher | ||
ROOT=/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Jan 13 08:34:12 ICT 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ plugins{ | |
} | ||
|
||
android { | ||
compileSdk = 32 | ||
compileSdk = 33 | ||
|
||
// buildToolVersion = "30.0.2" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
launcher_app/src/main/java/id/psw/vshlauncher/VSH.Customization.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
package id.psw.vshlauncher | ||
|
||
import android.content.Intent | ||
|
||
|
||
fun VSH.isXPKGIntent(intent:Intent) : Boolean{ | ||
return intent.action == Intent.ACTION_VIEW && intent.data?.path?.endsWith(".xpkg") == true | ||
} | ||
|
||
fun VSH.showInstallPkgDialog(intent: Intent) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
launcher_app/src/main/java/id/psw/vshlauncher/VSH.Shortcuts.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package id.psw.vshlauncher | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import android.content.pm.LauncherApps | ||
import android.os.Build | ||
import android.os.UserManager | ||
import android.util.Log | ||
import id.psw.vshlauncher.VSH.Companion.ITEM_CATEGORY_SHORTCUT | ||
import id.psw.vshlauncher.types.XMBItem | ||
import id.psw.vshlauncher.types.XMBShortcutInfo | ||
import id.psw.vshlauncher.types.items.XMBShortcutItem | ||
|
||
|
||
fun VSH.reloadShortcutList(){ | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | ||
Log.d("SHORTCUT", "Getting shortcuts...") | ||
val apl = getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps | ||
if(apl.hasShortcutHostPermission()){ | ||
for(p in apl.profiles){ | ||
val q = LauncherApps.ShortcutQuery() | ||
val ss = apl.getShortcuts(q, p) | ||
if( ss != null){ | ||
for(s in ss){ | ||
Log.d("SHORTCUT", "${s.id} - ${s.`package`} - ${s.intent} - ${s.activity?.packageName}") | ||
} | ||
} | ||
} | ||
} | ||
} else { | ||
TODO("VERSION.SDK_INT < LOLLIPOP") | ||
} | ||
|
||
threadPool.execute { | ||
val h = addLoadHandle() | ||
val c = categories.find { it.id == ITEM_CATEGORY_SHORTCUT }!! | ||
|
||
for(i in c.content){ | ||
if(i.icon != XMBItem.TRANSPARENT_BITMAP){ | ||
i.icon.recycle() | ||
} | ||
} | ||
|
||
c.content.clear() | ||
|
||
val paths = getAllPathsFor(VshBaseDirs.USER_DIR, "shortcuts") | ||
for(path in paths){ | ||
if(path.exists()){ | ||
val inis = path.listFiles { a, b -> | ||
b.endsWith("ini", true) | ||
} | ||
if(inis != null){ | ||
for(ini in inis){ | ||
if(ini.exists()){ | ||
c.content.add(XMBShortcutItem(vsh, ini)) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
if(c.content.isNotEmpty()){ | ||
if(hiddenCategories.contains(ITEM_CATEGORY_SHORTCUT)){ | ||
hiddenCategories.remove(ITEM_CATEGORY_SHORTCUT) | ||
} | ||
}else{ | ||
hiddenCategories.add(ITEM_CATEGORY_SHORTCUT) | ||
} | ||
|
||
setLoadingFinished(h) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.