am skip reason: Change-Id I3e17211c03bc74426bf5e2e414ec322d73b0060b with SHA-1 c7e1877d1c is in history
Change-Id: Id6e3805ee9a49e9edc2a6a16e60c3f54ade2990a
am skip reason: Change-Id I3e17211c03bc74426bf5e2e414ec322d73b0060b with SHA-1 c7e1877d1c is in history
Change-Id: I2fcb07147f02fd51c2ae145c9278930b439b71c9
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)
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 5ce7a7e6e0 is in history
Change-Id: I5d54abd4194a413a8130e6cc7cfada672d8658ff
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 3f18aa996d is in history
Change-Id: I1780588f4062a9890ef2ba46f94e06d9e598184a
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 3f18aa996d is in history
Change-Id: I67f2aa65a97322ae21c0d97cba2bafaf4ff32aae
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 3f18aa996d is in history
Change-Id: I8c089ff672fc8f986adcc79e79ba92105f966fd0
am skip reason: Change-Id Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235 with SHA-1 3f18aa996d is in history
Change-Id: I27d77c0e0cc88c015cfe1012d4b83a1159b1b05b
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 b5a18f3d93 is in history
Change-Id: Idff24a949f33cf6b7484e17c1c4112de773177d6
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 fff75393c5 is in history
Change-Id: I51f9e4bdf9d4e7f2bedeb22a8d409e4fb0f1179f
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 b5a18f3d93 is in history
Change-Id: Ic85370f7dd42d5c3b38058363538b9563d6acce8
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 fff75393c5 is in history
Change-Id: I605e7b6f6f1a63b90cf48f2ceba7778aa8571e90
am skip reason: Change-Id Ia9a09a708870827b1e4cf068f930fa9542dd116c with SHA-1 fff75393c5 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 910aad052e is in history
Change-Id: Iab3109f7dc24bf24a536ab8f3871a48cc482eb97
am skip reason: Change-Id I3e437f0fe2eb28f1d621551a8daf164a06af83fc with SHA-1 910aad052e is in history
Change-Id: I34164f8dd29286f95f9e9285ca1e4d58779a42a7
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 c32a0619c2 is in history
Change-Id: I3dc4f923572d797e4091931e158ab09ce13b265c
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 c32a0619c2 is in history
Change-Id: I566153577a47dc9901288c5efed67e78beac2b7b
am skip reason: Change-Id I3e437f0fe2eb28f1d621551a8daf164a06af83fc with SHA-1 910aad052e is in history
Change-Id: I565a7396eb1d42edfaea3bb71ddb77f0618c43ad