am skip reason: Change-Id Ibf2f8118c459a8d7a0992deca8f0f339ccd1bcea with SHA-1 ff97691273 is in history
Change-Id: I444aaab0fefdce73e31458da213d1e4a7ed2b95c
am skip reason: Change-Id Ie3c15ed25ef3088d3b9b650ffc7f34f49efa6b81 with SHA-1 77c7660522 is in history
Change-Id: I08107ba6c907bae11c1f304d82cde94d7ce2e306
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
Merged-In: Ibf2f8118c459a8d7a0992deca8f0f339ccd1bcea
(cherry picked from commit ae023a8bbd3a7482fd66547d58759c88e100f207)
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners
Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
Merged-In: I4d6681d90705b68c3349f4124e434a29b50fd3a2
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: I27d77c0e0cc88c015cfe1012d4b83a1159b1b05b
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 Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history
Change-Id: Ib67921fdf3384f3c79d8b859ed068578575cdaa9
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history
Change-Id: I1a97a8cb46302c29425781b9252640c1eec4b50b
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history
Change-Id: I16bc94e46e253b70ed58f4bbd5d14c1214024f30