Skip to content

Commit

Permalink
Home icon&name
Browse files Browse the repository at this point in the history
  • Loading branch information
lianglixin committed Nov 27, 2020
1 parent 2c1bdce commit 69f0450
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "io.virtualapp.sandvxposed"
minSdkVersion 21
targetSdkVersion 28
versionCode 89
versionName "1.2.5.1.3.1.7.7"
versionCode 90
versionName "1.2.5.1.3.1.7.8"
multiDexEnabled true
android {
defaultConfig {
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/java/io/virtualapp/home/HomePresenterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,13 @@ public String getName(String originName) {
public String getNameEx(String packageName, String origName, int uid)
{
if(origName==null||packageName==null)return null;
return (RenameAppUtils.getRenamedApp(packageName,uid,origName) + "(SVX)");
String customSuffix = "";
String customName = RenameAppUtils.getRenamedApp(packageName,uid,origName);
if(customName.equals(origName))
{
customSuffix += "("+ uid +")";
}
return (customName + customSuffix);
}
};
if (data instanceof PackageAppData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,12 @@ public boolean createShortcut(int userId, String packageName, Intent splash, OnE
}
ApplicationInfo appInfo = setting.getApplicationInfo(userId);
PackageManager pm = context.getPackageManager();
String name;
String name = "";
Bitmap icon;
try {
CharSequence sequence = appInfo.loadLabel(pm);
name = sequence.toString();
if(sequence != null)
name = sequence.toString();
icon = BitmapUtils.drawableToBitmap(appInfo.loadIcon(pm));
} catch (Throwable e) {
return false;
Expand Down

0 comments on commit 69f0450

Please sign in to comment.