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

Commit cd38394a authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Prevent client got NPE crash if setIntent was set to null."

parents 504c19a4 70fb36f0
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -6191,6 +6191,7 @@ public class Activity extends ContextThemeWrapper
    @Nullable
    public Uri getReferrer() {
        Intent intent = getIntent();
        if (intent != null) {
            try {
                Uri referrer = intent.getParcelableExtra(Intent.EXTRA_REFERRER);
                if (referrer != null) {
@@ -6204,6 +6205,7 @@ public class Activity extends ContextThemeWrapper
                Log.w(TAG, "Cannot read referrer from intent;"
                        + " intent extras contain unknown custom Parcelable objects");
            }
        }
        if (mReferrer != null) {
            return new Uri.Builder().scheme("android-app").authority(mReferrer).build();
        }