FileDocCategorySizeDatePackage
DisplayAdjustments.javaAPI DocAndroid 5.1 API3155Thu Mar 12 22:22:10 GMT 2015android.view

DisplayAdjustments

public class DisplayAdjustments extends Object
hide

Fields Summary
public static final boolean
DEVELOPMENT_RESOURCES_DEPEND_ON_ACTIVITY_TOKEN
public static final DisplayAdjustments
DEFAULT_DISPLAY_ADJUSTMENTS
private volatile android.content.res.CompatibilityInfo
mCompatInfo
private volatile android.os.IBinder
mActivityToken
Constructors Summary
public DisplayAdjustments()


      
    
public DisplayAdjustments(android.os.IBinder token)

        mActivityToken = token;
    
public DisplayAdjustments(DisplayAdjustments daj)

        this (daj.getCompatibilityInfo(), daj.getActivityToken());
    
public DisplayAdjustments(android.content.res.CompatibilityInfo compatInfo, android.os.IBinder token)

        setCompatibilityInfo(compatInfo);
        mActivityToken = token;
    
Methods Summary
public booleanequals(java.lang.Object o)

        if (!(o instanceof DisplayAdjustments)) {
            return false;
        }
        DisplayAdjustments daj = (DisplayAdjustments)o;
        return Objects.equals(daj.mCompatInfo, mCompatInfo) &&
                Objects.equals(daj.mActivityToken, mActivityToken);
    
public android.os.IBindergetActivityToken()

        return mActivityToken;
    
public android.content.res.CompatibilityInfogetCompatibilityInfo()

        return mCompatInfo;
    
public inthashCode()

        int hash = 17;
        hash = hash * 31 + mCompatInfo.hashCode();
        if (DEVELOPMENT_RESOURCES_DEPEND_ON_ACTIVITY_TOKEN) {
            hash = hash * 31 + (mActivityToken == null ? 0 : mActivityToken.hashCode());
        }
        return hash;
    
public voidsetActivityToken(android.os.IBinder token)

        if (this == DEFAULT_DISPLAY_ADJUSTMENTS) {
            throw new IllegalArgumentException(
                    "setActivityToken: Cannot modify DEFAULT_DISPLAY_ADJUSTMENTS");
        }
        mActivityToken = token;
    
public voidsetCompatibilityInfo(android.content.res.CompatibilityInfo compatInfo)

        if (this == DEFAULT_DISPLAY_ADJUSTMENTS) {
            throw new IllegalArgumentException(
                    "setCompatbilityInfo: Cannot modify DEFAULT_DISPLAY_ADJUSTMENTS");
        }
        if (compatInfo != null && (compatInfo.isScalingRequired()
                || !compatInfo.supportsScreen())) {
            mCompatInfo = compatInfo;
        } else {
            mCompatInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
        }