Skip to content
Commit 11becab6 authored by Chalard Jean's avatar Chalard Jean
Browse files

[NS A20] Cleanup

A lot of this code can't be triggered at all.
• newNetwork.created in l.6488 is implied by newNetwork.everConnected
  in l.6357
• !newNetwork.isVPN() in l.6488 is implied by the fact that VPNs are
  always foreground, so oldPermission can't != newPermission in l.6488
• updateUids in l.6502 is useless because uids can't change during a
  rematch (because there is no code doing that). Metered state and
  roaming state similarly can't change during a rematch, so
  meteredChanged and roamingChanged are always false
• updateAllVpnCapabilities in l.6537 is useless because VPN do not
  inherit the foreground state of their underlying networks, which
  would be the only reason to call that in l.6537
• Object.equals() in l.6480 is necessary false because at this line
  it is known that the foreground state has changed, which must have
  caused the NET_CAPABILITY_FOREGROUND to be different, so the objects
  can't be equal

Test: FrameworksNetTests NetworkStackTest
Change-Id: I2a52f7f4a085f3eea22a1dd170af8f04671250ff
parent 04872c7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment