From be9c267a053bc1d073a6948f5c644151f83cbfe7 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Fri, 30 Nov 2018 20:53:11 +0100 Subject: fix apk name detection --- src/main/java/de/pixart/messenger/persistance/FileBackend.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/pixart/messenger') 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); -- cgit v1.2.3