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

Commit c343e8de authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix NullPointerException in AppServiceFinder" into main

parents 21029c9b 934a3b4e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -194,6 +194,10 @@ public abstract class AppServiceFinder<TServiceType, TServiceInterfaceType exten
            AppBindingConstants constants, String targetPackage) {
        synchronized (mLock) {
            HashMap<String, TargetServiceInfo> currServiceInfo = mServiceInfos.get(userId);
            if (currServiceInfo == null) {
                currServiceInfo = new HashMap<>();
                mServiceInfos.put(userId, currServiceInfo);
            }
            if (DEBUG) {
                Slog.d(TAG, getAppDescription() + " package=" + targetPackage);
            }
@@ -245,7 +249,7 @@ public abstract class AppServiceFinder<TServiceType, TServiceInterfaceType exten
            AppBindingConstants constants) {
        final Set<String> targetPackages = getTargetPackages(userId);
        synchronized (mLock) {
            mServiceInfos.put(userId, new HashMap<String, TargetServiceInfo>());
            mServiceInfos.put(userId, new HashMap<>());

            if (DEBUG) {
                Slog.d(TAG, getAppDescription() + " packages=" + targetPackages);