Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 325b7f5a authored by Robert Quattlebaum's avatar Robert Quattlebaum
Browse files

android.net.lowpan: Build/syntax fixes and review changes

This commit fixes some build problems that weren't noticed by Tree
Hugger. It also addresses some formatting issues, as well as
corrects a few issues noticed from the last review.

Change-Id: Icab67ba2c40bc02968e3f8ed2da5a4a3be6cf77f
parent e5ef6769
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class LowpanBeaconInfo extends LowpanIdentity {
    }

    public Collection<Integer> getFlags() {
        return mFlags.clone();
        return (Collection<Integer>) mFlags.clone();
    }

    public boolean isFlagSet(int flag) {
+1 −4
Original line number Diff line number Diff line
@@ -16,14 +16,12 @@

package android.net.lowpan;


/** Provides detailed information about a given channel. */
// @SystemApi
public class LowpanChannelInfo {

    public static final int UNKNOWN_POWER = Integer.MAX_VALUE;

    //////////////////////////////////////////////////////////////////////////
    // Instance Variables

    private String mName = null;
@@ -33,7 +31,6 @@ public class LowpanChannelInfo {
    private float mSpectrumBandwidth = 0.0f;
    private int mMaxTransmitPower = UNKNOWN_POWER;

    //////////////////////////////////////////////////////////////////////////
    // Public Getters and Setters

    public String getName() {
+2 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.net.lowpan;


import java.util.Map;

/**
@@ -84,8 +83,7 @@ public class LowpanCredential {
    void addToMap(Map<String, Object> parameters) throws LowpanException {
        if (isMasterKey()) {
            LowpanProperties.KEY_NETWORK_MASTER_KEY.putInMap(parameters, getMasterKey());
            LowpanProperties.KEY_NETWORK_MASTER_KEY_INDEX.putInMap(
                    parameters, getMasterKeyIndex());
            LowpanProperties.KEY_NETWORK_MASTER_KEY_INDEX.putInMap(parameters, getMasterKeyIndex());
        } else {
            throw new LowpanException("Unsupported Network Credential");
        }
+1 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.net.lowpan;


/**
 * Describes the result from one channel of an energy scan.
 *
+4 −10
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import java.util.Map;
// @SystemApi
public class LowpanIdentity {

    //////////////////////////////////////////////////////////////////////////
    // Constants

    /** @hide */
@@ -41,7 +40,6 @@ public class LowpanIdentity {

    public static final int UNKNOWN = Integer.MAX_VALUE;

    //////////////////////////////////////////////////////////////////////////
    // Builder

    /** @hide */
@@ -102,7 +100,6 @@ public class LowpanIdentity {

    LowpanIdentity() {}

    //////////////////////////////////////////////////////////////////////////
    // Instance Variables

    private String mName = null;
@@ -111,7 +108,6 @@ public class LowpanIdentity {
    private int mPanid = UNKNOWN;
    private int mChannel = UNKNOWN;

    //////////////////////////////////////////////////////////////////////////
    // Public Getters and Setters

    public String getName() {
@@ -140,12 +136,10 @@ public class LowpanIdentity {
            LowpanProperties.KEY_NETWORK_NAME.putInMap(parameters, networkInfo.getName());
        }
        if (networkInfo.getPanid() != LowpanIdentity.UNKNOWN) {
            LowpanProperties.KEY_NETWORK_PANID.putInMap(
                    parameters, networkInfo.getPanid());
            LowpanProperties.KEY_NETWORK_PANID.putInMap(parameters, networkInfo.getPanid());
        }
        if (networkInfo.getChannel() != LowpanIdentity.UNKNOWN) {
            LowpanProperties.KEY_CHANNEL.putInMap(
                    parameters, networkInfo.getChannel());
            LowpanProperties.KEY_CHANNEL.putInMap(parameters, networkInfo.getChannel());
        }
        if (networkInfo.getXpanid() != null) {
            LowpanProperties.KEY_NETWORK_XPANID.putInMap(parameters, networkInfo.getXpanid());
Loading