Example usage for android.view Display getDisplayId

List of usage examples for android.view Display getDisplayId

Introduction

In this page you can find the example usage for android.view Display getDisplayId.

Prototype

public int getDisplayId() 

Source Link

Document

Gets the display id.

Usage

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectRotation(@NonNull Display display) {
    return display.getDisplayId() + ".rotation=" + rotationToString(display.getRotation()) + '\n';
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectIsValid(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        return display.getDisplayId() + ".isValid=" + display.isValid() + '\n';
    }//from w ww.j a  va 2 s .  c o  m
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectName(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        return display.getDisplayId() + ".name=" + display.getName() + '\n';
    }/*from  w w  w.  jav a  2 s  . c  o  m*/
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectMetrics(@NonNull Display display) {
    final DisplayMetrics metrics = new DisplayMetrics();
    display.getMetrics(metrics);/*from   w  w  w  .  j a  va  2 s.  co  m*/
    return collectMetrics(display.getDisplayId() + ".metrics", metrics);
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectSize(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
        final Point size = new Point();
        display.getSize(size);/*from w  w w.  j a va2  s. c om*/
        return display.getDisplayId() + ".size=[" + size.x + ',' + size.y + ']' + '\n';
    }
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectRectSize(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
        final Rect size = new Rect();
        display.getRectSize(size);//from  ww w .  j  a  va  2s . c om
        return display.getDisplayId() + ".rectSize=[" + size.top + ',' + size.left + ',' + size.width() + ','
                + size.height() + ']' + '\n';
    }
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

private static String collectRealSize(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        final Point size = new Point();
        display.getRealSize(size);//from   w w  w .  j  a  v  a  2  s .c  om
        return display.getDisplayId() + ".realSize=[" + size.x + ',' + size.y + ']' + '\n';
    }
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectRealMetrics(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        final DisplayMetrics metrics = new DisplayMetrics();
        display.getRealMetrics(metrics);
        return collectMetrics(display.getDisplayId() + ".realMetrics", metrics);
    }// w  w  w.  j  ava  2 s.  c om
    return "";
}

From source file:org.acra.collector.DisplayManagerCollector.java

@NonNull
private static String collectCurrentSizeRange(@NonNull Display display) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        final Point smallest = new Point();
        final Point largest = new Point();
        display.getCurrentSizeRange(smallest, largest);
        return display.getDisplayId() + ".currentSizeRange.smallest=[" + smallest.x + ',' + smallest.y + "]\n"
                + display.getDisplayId() + ".currentSizeRange.largest=[" + largest.x + ',' + largest.y + "]\n";
    }//from w ww  .ja  va2s . c  o  m
    return "";
}

From source file:org.xwalk.runtime.extension.api.device_capabilities.DeviceCapabilitiesDisplay.java

private void initDisplayList() {
    Display[] displays = mDisplayManager.getDisplays();

    for (Display disp : displays) {
        mDisplayList.put(disp.getDisplayId(), disp);
    }//  w  w  w .j a  v  a 2  s . c  om
}