Up the history on SignalControllers

Also add a test for it, because despite the comment next to it, I
try to set it to an invalid value...

Bug: 19201696
Change-Id: I3c12c871c73ad5ab15f39a6b91b29c71101adad6
This commit is contained in:
Jason Monk
2015-02-11 09:03:02 -05:00
parent 5bb7255454
commit 7f9623f3dc
2 changed files with 6 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ public abstract class SignalController<T extends SignalController.State,
// Save the previous SignalController.States of all SignalControllers for dumps.
static final boolean RECORD_HISTORY = true;
// If RECORD_HISTORY how many to save, must be a power of 2.
static final int HISTORY_SIZE = 16;
static final int HISTORY_SIZE = 64;
protected static final boolean DEBUG = NetworkControllerImpl.DEBUG;
protected static final boolean CHATTY = NetworkControllerImpl.CHATTY;

View File

@@ -248,6 +248,11 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
}
}
public void testHistorySize() {
// Verify valid history size, otherwise it gits printed out the wrong order and whatnot.
assertEquals(0, SignalController.HISTORY_SIZE & (SignalController.HISTORY_SIZE - 1));
}
private void setCdma() {
setIsGsm(false);
updateDataConnectionState(TelephonyManager.DATA_CONNECTED,