Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38d868ce authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Fix NPE when ignoring License request

parent cbb7d41d
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ public class LicenseServiceNotificationRunnable implements Runnable {
        ignoreIntent.putExtra(INTENT_KEY_IGNORE_PACKAGE_NAME, callerPackageName);
        ignoreIntent.putExtra(INTENT_KEY_NOTIFICATION_ID, callerUid);
        PendingIntent ignorePendingIntent = PendingIntent.getBroadcast(
            context, callerUid * 2 + 1, ignoreIntent, PendingIntent.FLAG_IMMUTABLE
            context, callerUid * 2 + 1, ignoreIntent, PendingIntent.FLAG_MUTABLE
        );

        Notification notification = new NotificationCompat.Builder(context, CHANNEL_ID)
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class LicensingService extends Service {
                PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);
                notificationRunnable.callerUid = packageInfo.applicationInfo.uid;
                notificationRunnable.callerAppName = packageManager.getApplicationLabel(packageInfo.applicationInfo);
                notificationRunnable.callerPackageName = packageName;
            } catch (PackageManager.NameNotFoundException e) {
                Log.e(TAG, "ignored license request, but package name " + packageName + " was not known!");
                notificationRunnable.callerAppName = packageName;