Skip to content

Commit

Permalink
Adding suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
“Akshay committed Nov 2, 2022
1 parent d56b976 commit d9526b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void startNetworkCallback(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkRequest networkRequest = new NetworkRequest.Builder().build();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
isConnected = networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) ? true : false;
isConnected = networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
}
if (connectivityManager != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void onSwitchToBackground() {

}

synchronized private void runNow() {
private synchronized void runNow() {
handler.removeMessages(OPERATION_PROCESS_TASKS);
handler.sendEmptyMessage(OPERATION_PROCESS_TASKS);
}
Expand Down

0 comments on commit d9526b6

Please sign in to comment.