Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mmy attempt
- ********************************
- private static class ResourcesKey {
- final private String mResDir;
- final private int mDisplayId;
- final private Configuration mOverrideConfiguration;
- final private float mScale;
- final private boolean mIsThemeable;
- final private int mHash;
- ResourcesKey(String resDir, int displayId, Configuration overrideConfiguration, float scale) {
- this(resDir, displayId, overrideConfiguration, scale, true);
- }
- ResourcesKey(String resDir, int displayId, Configuration overrideConfiguration, float scale, boolean isThemeable) {
- mResDir = resDir;
- mDisplayId = displayId;
- if (overrideConfiguration != null) {
- if (Configuration.EMPTY.equals(overrideConfiguration)) {
- overrideConfiguration = null;
- }
- }
- mOverrideConfiguration = overrideConfiguration;
- mScale = scale;
- int hash = 17;
- hash = 31 * hash + mResDir.hashCode();
- hash = 31 * hash + mDisplayId;
- hash = 31 * hash + (mOverrideConfiguration != null
- ? mOverrideConfiguration.hashCode() : 0);
- hash = 31 * hash + Float.floatToIntBits(mScale);
- mHash = hash;
- mIsThemeable = isThemeable;
- mHash = mResDir.hashCode() << 3 + ((mIsThemeable ? 1 : 0) << 2) + (int) (mScale * 2);
- }
- **************
- method from 4.1.2
- *****************
- private static class ResourcesKey {
- final private String mResDir;
- final private float mScale;
- final private boolean mIsThemeable;
- final private int mHash;
- ResourcesKey(String resDir, float scale, boolean isThemeable) {
- mResDir = resDir;
- mScale = scale;
- mIsThemeable = isThemeable;
- mHash = mResDir.hashCode() << 3 + ((mIsThemeable ? 1 : 0) << 2) + (int) (mScale * 2);
- }
- AmG zHaLpZ!!!!!!!!111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement