List of usage examples for android.app PendingIntent getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.bluelinelabs.logansquare.typeconverters.PendingIntentConverter.java
@Nullable private Intent getIntent(PendingIntent pintent) { Intent intent = null;// w w w .ja va 2 s. c om try { Method getIntentMethod = pintent.getClass().getMethod("getIntent"); intent = (Intent) getIntentMethod.invoke(pintent); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return intent; }
From source file:com.bluelinelabs.logansquare.typeconverters.PendingIntentConverter.java
private boolean isActivity(PendingIntent pintent) { boolean isActivity = false; try {/* www . j av a 2 s .c o m*/ Method isActivityMethod = pintent.getClass().getMethod("isActivity"); isActivity = (boolean) isActivityMethod.invoke(pintent); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return isActivity; }