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

Commit 98bb72b5 authored by Gary Jian's avatar Gary Jian
Browse files

Bug fix for isEmpty() api

As long as there is a specfic rat info with a value,
it cannot be regarded as empty data

Bug: 260655203
Test: manual
Change-Id: I4895e64057a1954cb279845fac15e1dfcd9766db
parent 6a27e5b0
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -567,14 +567,14 @@ public final class ModemActivityInfo implements Parcelable {
    /** @hide */
    @TestApi
    public boolean isEmpty() {
        boolean isTxPowerEmpty = false;
        boolean isRxPowerEmpty = false;
        boolean isTxPowerEmpty = true;
        boolean isRxPowerEmpty = true;
        for (int i = 0; i < getSpecificInfoLength(); i++) {
            if (mActivityStatsTechSpecificInfo[i].isTxPowerEmpty()) {
                isTxPowerEmpty = true;
            if (!mActivityStatsTechSpecificInfo[i].isTxPowerEmpty()) {
                isTxPowerEmpty = false;
            }
            if (mActivityStatsTechSpecificInfo[i].isRxPowerEmpty()) {
                isRxPowerEmpty = true;
            if (!mActivityStatsTechSpecificInfo[i].isRxPowerEmpty()) {
                isRxPowerEmpty = false;
            }
        }
        return isTxPowerEmpty