List of usage examples for android.content BroadcastReceiver getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.woodblockwithoutco.quickcontroldock.util.ReceiverUtil.java
public static void unregisterReceiverSafe(Context context, BroadcastReceiver receiver) { try {/*from ww w . j ava 2s . com*/ context.unregisterReceiver(receiver); } catch (IllegalArgumentException e) { Log.e(TAG, "Caught attempt to unregister inactive BroadcastReceiver [" + receiver.getClass().getName() + "]"); } }
From source file:com.woodblockwithoutco.quickcontroldock.util.ReceiverUtil.java
public static void unregisterLocalReceiverSafe(Context context, BroadcastReceiver receiver) { try {//from w w w .j ava 2 s . com LocalBroadcastManager.getInstance(context).unregisterReceiver(receiver); } catch (IllegalArgumentException e) { Log.e(TAG, "Caught attempt to unregister inactive local BroadcastReceiver [" + receiver.getClass().getName() + "]"); } }