mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-31 14:16:10 +00:00
Code analysis - address @NotNull/@Nullable issues.
This commit is contained in:
@@ -22,6 +22,7 @@ import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
@@ -31,12 +32,12 @@ import com.google.android.gms.common.GooglePlayServicesUtil;
|
||||
public class PlayServicesProblemFragment extends DialogFragment {
|
||||
|
||||
@Override
|
||||
public @NonNull Dialog onCreateDialog(@NonNull Bundle bundle) {
|
||||
public @NonNull Dialog onCreateDialog(@Nullable Bundle bundle) {
|
||||
int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(getActivity());
|
||||
Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(getActivity(), code, 9111);
|
||||
|
||||
if (dialog == null) {
|
||||
return new AlertDialog.Builder(getActivity())
|
||||
return new AlertDialog.Builder(requireActivity())
|
||||
.setNegativeButton(android.R.string.ok, null)
|
||||
.setMessage(R.string.PlayServicesProblemFragment_the_version_of_google_play_services_you_have_installed_is_not_functioning)
|
||||
.create();
|
||||
|
||||
Reference in New Issue
Block a user