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

Commit 6cc8d47c authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Removes setters from ContextHubInfo

No longer needed after JNI code is removed.

Bug: 66965339
Test: Compile only
Change-Id: I160b5a621fd15dd8509ce779d5ff9b98c6395c94
parent 7a23a968
Loading
Loading
Loading
Loading
+1 −157
Original line number Diff line number Diff line
@@ -48,8 +48,7 @@ public class ContextHubInfo {
    private MemoryRegion[] mMemoryRegions;

    /*
     * TODO(b/66965339): Deprecate this constructor and the setter methods, and mark private fields
     * as final when the ContextHubService JNI code is removed.
     * TODO(b/67734082): Deprecate this constructor and mark private fields as final.
     */
    public ContextHubInfo() {
    }
@@ -88,17 +87,6 @@ public class ContextHubInfo {
        return mMaxPacketLengthBytes;
    }

    /**
     * set the context hub unique identifer
     *
     * @param bytes - Maximum number of bytes per message
     *
     * @hide
     */
    public void setMaxPacketLenBytes(int bytes) {
        mMaxPacketLengthBytes = bytes;
    }

    /**
     * get the context hub unique identifer
     *
@@ -108,17 +96,6 @@ public class ContextHubInfo {
        return mId;
    }

    /**
     * set the context hub unique identifer
     *
     * @param id - unique system wide identifier for the hub
     *
     * @hide
     */
    public void setId(int id) {
        mId = id;
    }

    /**
     * get a string as a hub name
     *
@@ -128,17 +105,6 @@ public class ContextHubInfo {
        return mName;
    }

    /**
     * set a string as the hub name
     *
     * @param name - the name for the hub
     *
     * @hide
     */
    public void setName(String name) {
        mName = name;
    }

    /**
     * get a string as the vendor name
     *
@@ -148,17 +114,6 @@ public class ContextHubInfo {
        return mVendor;
    }

    /**
     * set a string as the vendor name
     *
     * @param vendor - a name for the vendor
     *
     * @hide
     */
    public void setVendor(String vendor) {
        mVendor = vendor;
    }

    /**
     * get tool chain string
     *
@@ -168,17 +123,6 @@ public class ContextHubInfo {
        return mToolchain;
    }

    /**
     * set tool chain string
     *
     * @param toolchain - description of the tool chain
     *
     * @hide
     */
    public void setToolchain(String toolchain) {
        mToolchain = toolchain;
    }

    /**
     * get platform version
     *
@@ -188,17 +132,6 @@ public class ContextHubInfo {
        return mPlatformVersion;
    }

    /**
     * set platform version
     *
     * @param platformVersion - platform version number
     *
     * @hide
     */
    public void setPlatformVersion(int platformVersion) {
        mPlatformVersion = platformVersion;
    }

    /**
     * get static platform version number
     *
@@ -208,15 +141,6 @@ public class ContextHubInfo {
        return (mChreApiMajorVersion << 24) | (mChreApiMinorVersion << 16) | (mChrePatchVersion);
    }

    /**
     * set platform software version
     *
     * @param staticSwVersion - platform static s/w version number
     *
     * @hide
     */
    public void setStaticSwVersion(int staticSwVersion) {}

    /**
     * get the tool chain version
     *
@@ -226,17 +150,6 @@ public class ContextHubInfo {
        return mToolchainVersion;
    }

    /**
     * set the tool chain version number
     *
     * @param toolchainVersion - tool chain version number
     *
     * @hide
     */
    public void setToolchainVersion(int toolchainVersion) {
        mToolchainVersion = toolchainVersion;
    }

    /**
     * get the peak processing mips the hub can support
     *
@@ -246,17 +159,6 @@ public class ContextHubInfo {
        return mPeakMips;
    }

    /**
     * set the peak mips that this hub can support
     *
     * @param peakMips - peak mips this hub can deliver
     *
     * @hide
     */
    public void setPeakMips(float peakMips) {
        mPeakMips = peakMips;
    }

    /**
     * get the stopped power draw in milliwatts
     * This assumes that the hub enter a stopped state - which is
@@ -270,17 +172,6 @@ public class ContextHubInfo {
        return mStoppedPowerDrawMw;
    }

    /**
     * Set the power consumed by the hub in stopped state
     *
     * @param stoppedPowerDrawMw - stopped power in milli watts
     *
     * @hide
     */
    public void setStoppedPowerDrawMw(float stoppedPowerDrawMw) {
        mStoppedPowerDrawMw = stoppedPowerDrawMw;
    }

    /**
     * get the power draw of the hub in sleep mode. This assumes
     * that the hub supports a sleep mode in which the power draw is
@@ -296,17 +187,6 @@ public class ContextHubInfo {
        return mSleepPowerDrawMw;
    }

    /**
     * Set the sleep power draw in milliwatts
     *
     * @param sleepPowerDrawMw - sleep power draw in milliwatts.
     *
     * @hide
     */
    public void setSleepPowerDrawMw(float sleepPowerDrawMw) {
        mSleepPowerDrawMw = sleepPowerDrawMw;
    }

    /**
     * get the peak powe draw of the hub. This is the power consumed
     * by the hub at maximum load.
@@ -317,18 +197,6 @@ public class ContextHubInfo {
        return mPeakPowerDrawMw;
    }

    /**
     * set the peak power draw of the hub
     *
     * @param peakPowerDrawMw - peak power draw of the hub in
     *                        milliwatts.
     *
     * @hide
     */
    public void setPeakPowerDrawMw(float peakPowerDrawMw) {
        mPeakPowerDrawMw = peakPowerDrawMw;
    }

    /**
     * get the sensors supported by this hub
     *
@@ -351,30 +219,6 @@ public class ContextHubInfo {
        return Arrays.copyOf(mMemoryRegions, mMemoryRegions.length);
    }

    /**
     * set the supported sensors on this hub
     *
     * @param supportedSensors - supported sensors on this hub
     *
     * @hide
     */
    public void setSupportedSensors(int[] supportedSensors) {
        mSupportedSensors = Arrays.copyOf(supportedSensors, supportedSensors.length);
    }

    /**
     * set memory regions for this hub
     *
     * @param memoryRegions - memory regions information
     *
     * @see MemoryRegion
     *
     * @hide
     */
    public void setMemoryRegions(MemoryRegion[] memoryRegions) {
        mMemoryRegions = Arrays.copyOf(memoryRegions, memoryRegions.length);
    }

    /**
     * @return the CHRE platform ID as defined in chre/version.h
     *