This file contains 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
import android.content.Context | |
import android.content.Context.CONNECTIVITY_SERVICE | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkCapabilities | |
import android.net.NetworkRequest | |
import androidx.lifecycle.Lifecycle | |
import androidx.lifecycle.LifecycleObserver | |
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.OnLifecycleEvent |
This file contains 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
<!--- Provide a general summary of your changes in the Title above --> | |
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning --> | |
## Description | |
<!--- Describe your changes in detail --> | |
## Motivation and Context | |
<!--- Why is this change required? What problem does it solve? --> |
This file contains 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
command | usage | |
---|---|---|
git init | Creates an empty Git repository in the specified directory. | |
git clone <repository name> | Clones a repository located at <repository name> onto your local machine. | |
git add <directory> | Stages only the specified changes for the next commit. Replace <directory> with a <file> to change a specific file. | |
git add . | Stages new files and modifications without deletions | |
git add -A | Stages all changes | |
git add -all | Equivalent to git add -A | |
git add -u | Stages modifications and deletions without adding new files | |
git add --update | Equivalent to git add -u | |
git commit -m ”<message>” | Commits the staged snapshot. replace <message> with the commit message. |
This file contains 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
/** | |
* Clean up the media player by releasing its resources. | |
*/ | |
private void releaseMediaPlayer() { | |
// If the media player is not null, then it may be currently playing a sound. | |
if (mMediaPlayer != null) { | |
// Regardless of the current state of the media player, release its resources | |
// because we no longer need it. | |
mMediaPlayer.release(); |