import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
+import android.os.UserHandle;
import android.util.SparseArray;
import java.util.HashMap;
}
}
- public Entry get(String packageName, int resId, int[] styleable) {
+ public Entry get(String packageName, int resId, int[] styleable, int userId) {
synchronized (this) {
Package pkg = mPackages.get(packageName);
HashMap<int[], Entry> map = null;
} else {
Context context;
try {
- context = mContext.createPackageContext(packageName, 0);
+ context = mContext.createPackageContextAsUser(packageName, 0,
+ new UserHandle(userId));
if (context == null) {
return null;
}
launchMode = aInfo.launchMode;
AttributeCache.Entry ent = AttributeCache.instance().get(packageName,
- realTheme, com.android.internal.R.styleable.Window);
+ realTheme, com.android.internal.R.styleable.Window, userId);
fullscreen = ent != null && !ent.array.getBoolean(
com.android.internal.R.styleable.Window_windowIsFloating, false)
&& !ent.array.getBoolean(
private final Interpolator mDecelerateInterpolator;
private final Interpolator mThumbnailFadeoutInterpolator;
+ private int mCurrentUserId = 0;
+
AppTransition(Context context, Handler h) {
mContext = context;
mH = h;
if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package="
+ packageName);
return AttributeCache.instance().get(packageName, resId,
- com.android.internal.R.styleable.WindowAnimation);
+ com.android.internal.R.styleable.WindowAnimation, mCurrentUserId);
}
return null;
}
if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package="
+ packageName);
return AttributeCache.instance().get(packageName, resId,
- com.android.internal.R.styleable.WindowAnimation);
+ com.android.internal.R.styleable.WindowAnimation, mCurrentUserId);
}
return null;
}
pw.println(mNextAppTransitionCallback);
}
}
+
+ public void setCurrentUser(int newUserId) {
+ mCurrentUserId = newUserId;
+ }
}
+ Integer.toHexString(theme));
if (theme != 0) {
AttributeCache.Entry ent = AttributeCache.instance().get(pkg, theme,
- com.android.internal.R.styleable.Window);
+ com.android.internal.R.styleable.Window, mCurrentUserId);
if (ent == null) {
// Whoops! App doesn't exist. Um. Okay. We'll just
// pretend like we didn't see that.
public void setCurrentUser(final int newUserId) {
synchronized (mWindowMap) {
mCurrentUserId = newUserId;
+ mAppTransition.setCurrentUser(newUserId);
mPolicy.setCurrentUserLw(newUserId);
// Hide windows that should not be seen by the new user.