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
This commit is contained in:
SongFerngWang
2023-04-06 18:32:28 +08:00
committed by Tom Hsu
parent b29aa72fae
commit fd531d6a07

View File

@@ -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