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]);
 }
 private static final String getActionForIntent(Context context, Action action) {
   return context.getPackageName() + "." + action.toString();
 }