Here you can find the source of isActionEquals(Intent intent, String expected)
public static boolean isActionEquals(Intent intent, String expected)
//package com.java2s; import android.content.Intent; public class Main { public static boolean isActionEquals(Intent intent, String expected) { if (expected == null) { return false; } else {//from ww w.j a v a 2 s . c o m String action = getAction(intent); return action != null && action.equals(expected); } } public static String getAction(Intent intent) { if (intent != null) { return intent.getAction(); } return null; } }