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

Commit aeb6be66 authored by Chun Zhang's avatar Chun Zhang Committed by Android (Google) Code Review
Browse files

Merge "Check intent null before calling" into main

parents 1c4317a7 bc903e8e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static com.android.settings.biometrics.combination.BiometricsSettingsBase

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.UserManager;
import android.safetycenter.SafetyEvent;

@@ -91,13 +92,19 @@ public final class WearSafetySource {
                summary = getSummaryFromContentProvider(context, authority);
            }

            Intent activeUnlockIntent = activeUnlockStatusUtils.getIntent();
            if (activeUnlockIntent == null) {
                sendNullData(context, safetyEvent);
                return;
            }

            BiometricSourcesUtils.setBiometricSafetySourceData(
                    SAFETY_SOURCE_ID,
                    context,
                    activeUnlockStatusUtils.getTitleForActiveUnlockOnly(),
                    summary,
                    PendingIntent.getActivity(context, ACTIVE_UNLOCK_REQUEST,
                            activeUnlockStatusUtils.getIntent(),
                            activeUnlockIntent,
                            PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT),
                    /* enabled= */ true,
                    hasEnrolled,