Example usage for android.telephony CellIdentityLte getClass

List of usage examples for android.telephony CellIdentityLte getClass

Introduction

In this page you can find the example usage for android.telephony CellIdentityLte getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.restcomm.app.utillib.DataObjects.PhoneState.java

private String listCellInfoFields(CellIdentityLte cell) {
    if (cell != null) {
        String strCells = "";

        Field[] fields = null;//from w  w  w .ja va2s.co  m
        try {
            fields = cell.getClass().getDeclaredFields();
            int i;
            for (i = 0; i < fields.length; i++) {
                fields[i].setAccessible(true);
                if (!fields[i].getName().equals("CREATOR") && !fields[i].getName().equals("LOG_TAG")
                        && fields[i].getName().indexOf("INVALID") == -1
                        && fields[i].getName().indexOf("STRENGTH") == -1) {
                    strCells += fields[i].getName() + "=";
                    if (fields[i].get(cell) == null)
                        strCells += "null";
                    else
                        strCells += fields[i].get(cell).toString() + ",";
                }
            }

            //MMCLogger.logToFile(MMCLogger.Level.DEBUG, TAG, "listSignalFields", strSignals);
            return strCells;
        } catch (SecurityException e) {
            LoggerUtil.logToFile(LoggerUtil.Level.DEBUG, TAG, "listCellInfoFields", "SecurityException", e);
        } catch (Exception e) {
            LoggerUtil.logToFile(LoggerUtil.Level.DEBUG, TAG, "listCellInfoFields", "exception", e);
        }
    }
    return "";
}