Search in sources :

Example 1 with HSOsuProvidersElement

use of com.android.anqp.HSOsuProvidersElement in project platform_frameworks_base by android.

the class OSUCache method putResult.

private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
    for (AnqpInformationElement ie : elements) {
        if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
            try {
                HSOsuProvidersElement providers = new HSOsuProvidersElement(Constants.ANQPElementType.HSOSUProviders, ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
                putProviders(scanResult, providers);
            } catch (ProtocolException pe) {
                Log.w(OSUManager.TAG, "Failed to parse OSU element: " + pe);
            }
        }
    }
}
Also used : ProtocolException(java.net.ProtocolException) AnqpInformationElement(android.net.wifi.AnqpInformationElement) HSOsuProvidersElement(com.android.anqp.HSOsuProvidersElement)

Example 2 with HSOsuProvidersElement

use of com.android.anqp.HSOsuProvidersElement in project android_frameworks_base by DirtyUnicorns.

the class OSUCache method putResult.

private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
    for (AnqpInformationElement ie : elements) {
        if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
            try {
                HSOsuProvidersElement providers = new HSOsuProvidersElement(Constants.ANQPElementType.HSOSUProviders, ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
                putProviders(scanResult, providers);
            } catch (ProtocolException pe) {
                Log.w(OSUManager.TAG, "Failed to parse OSU element: " + pe);
            }
        }
    }
}
Also used : ProtocolException(java.net.ProtocolException) AnqpInformationElement(android.net.wifi.AnqpInformationElement) HSOsuProvidersElement(com.android.anqp.HSOsuProvidersElement)

Example 3 with HSOsuProvidersElement

use of com.android.anqp.HSOsuProvidersElement in project android_frameworks_base by AOSPA.

the class OSUCache method putResult.

private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
    for (AnqpInformationElement ie : elements) {
        if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
            try {
                HSOsuProvidersElement providers = new HSOsuProvidersElement(Constants.ANQPElementType.HSOSUProviders, ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
                putProviders(scanResult, providers);
            } catch (ProtocolException pe) {
                Log.w(OSUManager.TAG, "Failed to parse OSU element: " + pe);
            }
        }
    }
}
Also used : ProtocolException(java.net.ProtocolException) AnqpInformationElement(android.net.wifi.AnqpInformationElement) HSOsuProvidersElement(com.android.anqp.HSOsuProvidersElement)

Example 4 with HSOsuProvidersElement

use of com.android.anqp.HSOsuProvidersElement in project android_frameworks_base by crdroidandroid.

the class OSUCache method putResult.

private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
    for (AnqpInformationElement ie : elements) {
        if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
            try {
                HSOsuProvidersElement providers = new HSOsuProvidersElement(Constants.ANQPElementType.HSOSUProviders, ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
                putProviders(scanResult, providers);
            } catch (ProtocolException pe) {
                Log.w(OSUManager.TAG, "Failed to parse OSU element: " + pe);
            }
        }
    }
}
Also used : ProtocolException(java.net.ProtocolException) AnqpInformationElement(android.net.wifi.AnqpInformationElement) HSOsuProvidersElement(com.android.anqp.HSOsuProvidersElement)

Example 5 with HSOsuProvidersElement

use of com.android.anqp.HSOsuProvidersElement in project android_frameworks_base by ResurrectionRemix.

the class OSUCache method putResult.

private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
    for (AnqpInformationElement ie : elements) {
        if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
            try {
                HSOsuProvidersElement providers = new HSOsuProvidersElement(Constants.ANQPElementType.HSOSUProviders, ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
                putProviders(scanResult, providers);
            } catch (ProtocolException pe) {
                Log.w(OSUManager.TAG, "Failed to parse OSU element: " + pe);
            }
        }
    }
}
Also used : ProtocolException(java.net.ProtocolException) AnqpInformationElement(android.net.wifi.AnqpInformationElement) HSOsuProvidersElement(com.android.anqp.HSOsuProvidersElement)

Aggregations

AnqpInformationElement (android.net.wifi.AnqpInformationElement)5 HSOsuProvidersElement (com.android.anqp.HSOsuProvidersElement)5 ProtocolException (java.net.ProtocolException)5