aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-30 20:53:11 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-30 20:53:11 +0100
commitbe9c267a053bc1d073a6948f5c644151f83cbfe7 (patch)
tree7a4372700fa83548405b3554ab0556475e4bc720 /src/main
parent14fb5eefbcb4a9d7661e476cc2a05fe10da3f11a (diff)
fix apk name detection
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/persistance/FileBackend.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
index 6ea506692..ddc0e6ee8 100644
--- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java
+++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java
@@ -1032,13 +1032,14 @@ public class FileBackend {
pi.applicationInfo.publicSourceDir = file.toString();
AppName = (String) pi.applicationInfo.loadLabel(pm);
AppVersion = pi.versionName;
+ Log.d(Config.LOGTAG, "APK name: " + AppName);
+ APKName = " (" + AppName + " " + AppVersion + ")";
} catch (Exception e) {
e.printStackTrace();
- AppName = String.valueOf(R.string.apk);
- AppVersion = "0";
+ Log.d(Config.LOGTAG, "no APK name detected");
+ APKName = "";
}
- Log.d(Config.LOGTAG, "APK name: " + AppName);
- APKName = " (" + AppName + " " + AppVersion + ")";
+
try {
byte[] data = APKName.getBytes("UTF-8");
APKName = Base64.encodeToString(data, Base64.DEFAULT);