Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd531d6a authored by SongFerngWang's avatar SongFerngWang Committed by Tom Hsu
Browse files

Unregister MobileNetworkRepository during onPause()

 - Move MobileNetworkRepository unregistration from onDestory() to onPause() for corresponding to its registration by onResume.

Bug: 275456375
Test: built pass and verified in bug
Change-Id: I4cd2f23501485d4f3cfcf867cdb8d81e0385794a
parent b29aa72f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -350,10 +350,15 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings impleme
        }
    }

    @Override
    public void onPause() {
        mMobileNetworkRepository.removeRegister(this);
        super.onPause();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mMobileNetworkRepository.removeRegister(this);
    }

    @VisibleForTesting