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

Commit 33b5e30f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Handle the case of null intent type when obtaining target intent filter."

parents 12240fce e2c0b5fe
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1805,6 +1805,10 @@ public class ChooserActivity extends ResolverActivity implements
            if (!TextUtils.isEmpty(dataString)) {
                return new IntentFilter(intent.getAction(), dataString);
            }
            if (intent.getType() == null) {
                Log.e(TAG, "Failed to get target intent filter: intent data and type are null");
                return null;
            }
            IntentFilter intentFilter = new IntentFilter(intent.getAction(), intent.getType());
            List<Uri> contentUris = new ArrayList<>();
            if (Intent.ACTION_SEND.equals(intent.getAction())) {
@@ -1825,7 +1829,7 @@ public class ChooserActivity extends ResolverActivity implements
            }
            return intentFilter;
        } catch (Exception e) {
            Log.e(TAG, "failed to get target intent filter", e);
            Log.e(TAG, "Failed to get target intent filter", e);
            return null;
        }
    }