Пример #1
0
 private Action getActionFromIntent(Intent intent) {
   final String actionString = intent.getAction();
   if (actionString == null) {
     return null;
   }
   final String[] split = actionString.split("\\.");
   if (split.length <= 0) {
     return null;
   }
   return Action.valueOf(split[split.length - 1]);
 }
Пример #2
0
 private static final String getActionForIntent(Context context, Action action) {
   return context.getPackageName() + "." + action.toString();
 }