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

Commit 82cee4bd authored by Alison Cichowlas's avatar Alison Cichowlas Committed by Automerger Merge Worker
Browse files

Merge "Sharesheet: be more defensive about un-unparcelable intents." into sc-dev am: a1d1a382

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15374840

Change-Id: I24bf7607ee67bfba322f0f03a62eb58745b98a79
parents b2e78267 a1d1a382
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.BadParcelableException;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -109,6 +110,7 @@ public abstract class AbstractResolverComparator implements Comparator<ResolvedC

    // get annotations of content from intent.
    private void getContentAnnotations(Intent intent) {
        try {
            ArrayList<String> annotations = intent.getStringArrayListExtra(
                    Intent.EXTRA_CONTENT_ANNOTATIONS);
            if (annotations != null) {
@@ -121,6 +123,10 @@ public abstract class AbstractResolverComparator implements Comparator<ResolvedC
                    mAnnotations[i] = annotations.get(i);
                }
            }
        } catch (BadParcelableException e) {
            Log.i(TAG, "Couldn't unparcel intent annotations. Ignoring.");
            mAnnotations = new String[0];
        }
    }

    /**