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

Commit 34a80841 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Fix potential NPE

Test: manual
Change-Id: I8f6ed47e5c51ca138f4c0b57eccab41336984548
Fixes: 67716207
parent 174a48b5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1636,11 +1636,14 @@ public class NotificationManager {
        try {
            final ParceledListSlice<StatusBarNotification> parceledList
                    = service.getAppActiveNotifications(pkg, mContext.getUserId());
            if (parceledList != null) {
                final List<StatusBarNotification> list = parceledList.getList();
                return list.toArray(new StatusBarNotification[list.size()]);
            }
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return new StatusBarNotification[0];
    }

    /**