am skip reason: Change-Id Ie3c15ed25ef3088d3b9b650ffc7f34f49efa6b81 with SHA-1 77c7660522 is in history
Change-Id: Ia94c32fbc0e2aee1fd8d860b0ffc7068a5deb94d
am skip reason: Change-Id Ie3c15ed25ef3088d3b9b650ffc7f34f49efa6b81 with SHA-1 77c7660522 is in history
Change-Id: I55ddfc307214b110c223d91b3cc0cdd601d0aca1
am skip reason: Change-Id Ie3c15ed25ef3088d3b9b650ffc7f34f49efa6b81 with SHA-1 77c7660522 is in history
Change-Id: I08107ba6c907bae11c1f304d82cde94d7ce2e306
am skip reason: Change-Id I3e17211c03bc74426bf5e2e414ec322d73b0060b with SHA-1 380318053b is in history
Change-Id: Icab560cf608837222727b6176155d96498838870
am skip reason: Change-Id I3e17211c03bc74426bf5e2e414ec322d73b0060b with SHA-1 380318053b is in history
Change-Id: I2fcb07147f02fd51c2ae145c9278930b439b71c9
am skip reason: Change-Id I3e17211c03bc74426bf5e2e414ec322d73b0060b with SHA-1 380318053b is in history
Change-Id: I041a05e6f01033bb559628ae8b18f169e551c3fd
Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).
Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I0d9b8cb8f8dcb587b9430b486b863efb9e9e77ef
Merged-In: I3e17211c03bc74426bf5e2e414ec322d73b0060b
(cherry picked from commit 827d7ceea1e83cca9ba3f6189e20b6780c0194ed, aosp/1277595)
Currently, the addEntry method is used in constructor of test,
which is not correct since there is no such method in Q devices.
Thus, initialize of NetworkStats variables outside of constructor.
Test: atest NetworkStatsApiTest
Test: atest CtsNetTestCasesLatestSdk:NetworkStatsApiTest on Q device
Bug: 150644692
Change-Id: Ibf2f8118c459a8d7a0992deca8f0f339ccd1bcea
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 0d6e50a29d is in history
Change-Id: I67f2aa65a97322ae21c0d97cba2bafaf4ff32aae
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 0d6e50a29d is in history
Change-Id: I8c089ff672fc8f986adcc79e79ba92105f966fd0
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 0d6e50a29d is in history
Change-Id: I27d77c0e0cc88c015cfe1012d4b83a1159b1b05b
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 6c0cbccf96 is in history
Change-Id: Ic85370f7dd42d5c3b38058363538b9563d6acce8
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 d523d1416d is in history
Change-Id: I605e7b6f6f1a63b90cf48f2ceba7778aa8571e90
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 d523d1416d is in history
Change-Id: I4646da7aaeb7844ef2c0dc9e3a15b15607f095ea
This makes the code easier to understand by making state
transitions more explicit. It also makes it easier to address a
TODO to turn the class into a StateMachine.
This should be an exact no-op refactoring. The current cases
covered by the code (all mutually exclusive) are:
1. requiresClat && !isPrefixDiscoveryStarted
Action: startPrefixDiscovery()
Equivalent to IDLE && requiresClat, because
isPrefixDiscoveryStarted returns true for every state except
IDLE.
2. requiresClat && isPrefixDiscoveryStarted && shouldStartClat
Action: start()
Equivalent to DISCOVERING && shouldStartClat,
because isPrefixDiscoveryStarted is true in DISCOVERING,
STARTING, and RUNNING, but start() does nothing if mState is
STARTING or RUNNING.
3. requiresClat && isPrefixDiscoveryStarted && !shouldStartClat
Action: stop()
Equivalent to (STARTING or RUNNING) && !shouldStartClat,
because isPrefixDiscoveryStarted is true in DISCOVERING,
STARTING, and RUNNING, but stop() does nothing if mState is
not STARTING or RUNNING.
4. !requiresClat && isStarted
Action: stop()
Equivalent to (STARTING or RUNNING) && !requiresClat,
because isStarted() is only true in STARTING and RUNNING.
5. !requiresClat && !isStarted && isPrefixDiscoveryStarted
Action: leaveStartedState()
Equivalent to DISCOVERING && !requiresClat, because
the only state with isPrefixDiscoveryStarted and !isStarted
is DISCOVERING.
Also, simplify case #5. In this case, calling leaveStartedState
is superfluous, because in the DISCOVERING state:
- There is no need to call unregisterObserver, since the observer
is only registered when entering STARTING and is unregistered
when going back to DISCOVERING or IDLE.
- mIface and mBaseIface don't need to be set to null because they
are only set to non-null when entering STARTING and nulled out
when going back to DISCOVERING or IDLE.
Bug: 126113090
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
This just a rename with no functional changes at all. It is
preparation for supporting getting the NAT64 prefix from the
RA.
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ia9a09a708870827b1e4cf068f930fa9542dd116c
Change-Id: Ia9a09a708870827b1e4cf068f930fa9542dd116c
am skip reason: Change-Id I3e437f0fe2eb28f1d621551a8daf164a06af83fc with SHA-1 26fc3f31ff is in history
Change-Id: I565a7396eb1d42edfaea3bb71ddb77f0618c43ad