Add a null check before accessing int[] parameter in ModemActivityInfo
Bug: 26842468 Change-Id: I3a5f7c8e454e7b9ace20f8082ee3fd1d0a24eb64
This commit is contained in:
@@ -48,7 +48,9 @@ public class ModemActivityInfo implements Parcelable {
|
||||
mTimestamp = timestamp;
|
||||
mSleepTimeMs = sleepTimeMs;
|
||||
mIdleTimeMs = idleTimeMs;
|
||||
System.arraycopy(txTimeMs, 0, mTxTimeMs, 0, Math.min(txTimeMs.length, TX_POWER_LEVELS));
|
||||
if (txTimeMs != null) {
|
||||
System.arraycopy(txTimeMs, 0, mTxTimeMs, 0, Math.min(txTimeMs.length, TX_POWER_LEVELS));
|
||||
}
|
||||
mRxTimeMs = rxTimeMs;
|
||||
mEnergyUsed = energyUsed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user