public Animation getResourceAnimation(int animation) {
   String animationResource = mResourcePreferenceManager.getAnimation(animation);
   if (animationResource.length() > 0) {
     String[] args = animationResource.split(":");
     if (args.length == 2) {
       try {
         Context context =
             mContext.get().createPackageContext(args[0], Context.CONTEXT_IGNORE_SECURITY);
         if (context != null) {
           return AnimationUtils.loadAnimation(context, Integer.parseInt(args[1]));
         }
       } catch (PackageManager.NameNotFoundException e) {
         e.printStackTrace();
       }
     }
   }
   return null;
 }