am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history
Change-Id: I499cb4ab198cd203664d9c04fa394e3e2baa88cc
am skip reason: Change-Id Ib593708d5621ff20e6a0c31e5698b2b658f64d45 with SHA-1 5bf0d2de9d is in history
Change-Id: If07a38514039f836988794719ceaf5c1c6acce20
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 b80fe74899 is in history
Change-Id: I91c97fec88b2275764d5804523a39922c6257340
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 e47c7e42e5 is in history
Change-Id: I71a8317ba7e296356aee4d6e60c431d5c7836604
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 1052557f33 is in history
Change-Id: If3793def11b38b66cc7dd788af82f6c0f394cd99
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 24260d5e6d is in history
Change-Id: I6d2d3f2b568b39f0ae385a3aff63c84452bce28f
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history
Change-Id: I12f74893d28783a0299ddf24228e7695cfab667f
am skip reason: Change-Id I1b362660de9733bb9f0ede1ed5cf62279bf1c05e with SHA-1 824f80b129 is in history
Change-Id: I16bc94e46e253b70ed58f4bbd5d14c1214024f30
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.
However, change the behavior in the original NetworkStats
is considered risky in current stage.
Thus, this change provide a function that could remove these
empty entries in tests.
Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692
Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
Merged-In: I40a76935d55712b8083ee1e17e137a8a4ef5e029
(cherry picked from commit 6c7bef3064dbe949b7b213036b8e70c125ddd343)
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
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 7fb7c3e0bf is in history
Change-Id: I831d43cc9ba89ef8f632c2306b65378895d63499
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history
Change-Id: I28e2ff1095f168d1e3c7321ab52629b0a9391c1d
am skip reason: Change-Id I59cf48552bca98092d1212e3d718fd420add5458 with SHA-1 ab8cf306ea is in history
Change-Id: I46103ffe30615b2949cf9d600c32785b3c28b816
setAdministratorUids does not exist on Q, so such tests must be skipped
on Q devices.
Bug: 147903575
Test: atest CtsNetTestCasesLatestSdk on Q and AOSP devices
Merged-In: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
Change-Id: I1b362660de9733bb9f0ede1ed5cf62279bf1c05e
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 ccd5ba288a is in history
Change-Id: I4a36bd6fe06407f343fa6a518367c3b9630cbec9
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history
Change-Id: Ieef14cead5cecaa554553fda864c4275a85a3edb
am skip reason: Change-Id I38b0d83abf983b3bcc01fc6aea2e5cc307734198 with SHA-1 7988471ec9 is in history
Change-Id: I329d322e10096178ea82d213414c2866f596ff12