Last active
October 19, 2020 07:45
-
-
Save huuphuoc1396/5030801cc23e05abae1e9afc4d7222a9 to your computer and use it in GitHub Desktop.
Remove all callbacks when this activity is destroyed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onDestroy() { | |
// Remove all callbacks when this activity is destroyed | |
displayManagerHelper?.unregisterCoverDisplayEnabledCallback(applicationContext.packageName) | |
displayManagerHelper?.unregisterSmartCoverCallback(smartCoverCallback) | |
super.onDestroy() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment