Пример #1
0
 private AttributeCache.Entry getCachedAnimations(String packageName, int resId) {
   if (DEBUG_ANIM)
     Slog.v(
         TAG,
         "Loading animations: package=" + packageName + " resId=0x" + Integer.toHexString(resId));
   if (packageName != null) {
     if ((resId & 0xFF000000) == 0x01000000) {
       packageName = "android";
     }
     if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package=" + packageName);
     return AttributeCache.instance()
         .get(
             packageName, resId, com.android.internal.R.styleable.WindowAnimation, mCurrentUserId);
   }
   return null;
 }
Пример #2
0
 private AttributeCache.Entry getCachedAnimations(WindowManager.LayoutParams lp) {
   if (DEBUG_ANIM)
     Slog.v(
         TAG,
         "Loading animations: layout params pkg="
             + (lp != null ? lp.packageName : null)
             + " resId=0x"
             + (lp != null ? Integer.toHexString(lp.windowAnimations) : null));
   if (lp != null && lp.windowAnimations != 0) {
     // If this is a system resource, don't try to load it from the
     // application resources.  It is nice to avoid loading application
     // resources if we can.
     String packageName = lp.packageName != null ? lp.packageName : "android";
     int resId = lp.windowAnimations;
     if ((resId & 0xFF000000) == 0x01000000) {
       packageName = "android";
     }
     if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package=" + packageName);
     return AttributeCache.instance()
         .get(
             packageName, resId, com.android.internal.R.styleable.WindowAnimation, mCurrentUserId);
   }
   return null;
 }