ResourcesKeypublic final class ResourcesKey extends Object
Fields Summary |
---|
final String | mResDir | final float | mScale | private final int | mHash | private final android.os.IBinder | mToken | public final int | mDisplayId | public final Configuration | mOverrideConfiguration |
Constructors Summary |
---|
public ResourcesKey(String resDir, int displayId, Configuration overrideConfiguration, float scale, android.os.IBinder token)
mResDir = resDir;
mDisplayId = displayId;
if (overrideConfiguration != null) {
mOverrideConfiguration.setTo(overrideConfiguration);
}
mScale = scale;
mToken = token;
int hash = 17;
hash = 31 * hash + (mResDir == null ? 0 : mResDir.hashCode());
hash = 31 * hash + mDisplayId;
hash = 31 * hash + (mOverrideConfiguration != null
? mOverrideConfiguration.hashCode() : 0);
hash = 31 * hash + Float.floatToIntBits(mScale);
mHash = hash;
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (!(obj instanceof ResourcesKey)) {
return false;
}
ResourcesKey peer = (ResourcesKey) obj;
if ((mResDir == null) && (peer.mResDir != null)) {
return false;
}
if ((mResDir != null) && (peer.mResDir == null)) {
return false;
}
if ((mResDir != null) && (peer.mResDir != null)) {
if (!mResDir.equals(peer.mResDir)) {
return false;
}
}
if (mDisplayId != peer.mDisplayId) {
return false;
}
if (mOverrideConfiguration != peer.mOverrideConfiguration) {
if (mOverrideConfiguration == null || peer.mOverrideConfiguration == null) {
return false;
}
if (!mOverrideConfiguration.equals(peer.mOverrideConfiguration)) {
return false;
}
}
if (mScale != peer.mScale) {
return false;
}
return true;
| public boolean | hasOverrideConfiguration()
return !Configuration.EMPTY.equals(mOverrideConfiguration);
| public int | hashCode()
return mHash;
| public java.lang.String | toString()
return Integer.toHexString(mHash);
|
|