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

Commit 5377c1e0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Perf: improve updateGlobalCellId"

parents a9863577 30c31997
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.telephony;

import static android.text.TextUtils.formatSimple;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
@@ -145,7 +147,7 @@ public final class CellIdentityCdma extends CellIdentity {
        if (mNetworkId == CellInfo.UNAVAILABLE || mSystemId == CellInfo.UNAVAILABLE
                || mBasestationId == CellInfo.UNAVAILABLE) return;

        mGlobalCellId = String.format("%04x%04x%04x", mSystemId, mNetworkId,  mBasestationId);
        mGlobalCellId = formatSimple("%04x%04x%04x", mSystemId, mNetworkId,  mBasestationId);
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.telephony;

import static android.text.TextUtils.formatSimple;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
@@ -147,7 +149,7 @@ public final class CellIdentityGsm extends CellIdentity {

        if (mLac == CellInfo.UNAVAILABLE || mCid == CellInfo.UNAVAILABLE) return;

        mGlobalCellId = plmn + String.format("%04x%04x", mLac, mCid);
        mGlobalCellId = plmn + formatSimple("%04x%04x", mLac, mCid);
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.telephony;

import static android.text.TextUtils.formatSimple;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
@@ -185,7 +187,7 @@ public final class CellIdentityLte extends CellIdentity {

        if (mCi == CellInfo.UNAVAILABLE) return;

        mGlobalCellId = plmn + String.format("%07x", mCi);
        mGlobalCellId = plmn + formatSimple("%07x", mCi);
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.telephony;

import static android.text.TextUtils.formatSimple;

import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -128,7 +130,7 @@ public final class CellIdentityNr extends CellIdentity {

        if (mNci == CellInfo.UNAVAILABLE_LONG) return;

        mGlobalCellId = plmn + String.format("%09x", mNci);
        mGlobalCellId = plmn + formatSimple("%09x", mNci);
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.telephony;

import static android.text.TextUtils.formatSimple;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
@@ -156,7 +158,7 @@ public final class CellIdentityTdscdma extends CellIdentity {

        if (mLac == CellInfo.UNAVAILABLE || mCid == CellInfo.UNAVAILABLE) return;

        mGlobalCellId = plmn + String.format("%04x%04x", mLac, mCid);
        mGlobalCellId = plmn + formatSimple("%04x%04x", mLac, mCid);
    }

    /**
Loading