Skip to content

Commit

Permalink
Fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Jun 16, 2019
1 parent df460d3 commit 0be82a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/gianlu/aria2app/LoadingActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private void connectToInAppDownloader(@NonNull MultiProfile profile) {
public void permissionGranted(@NonNull String permission) {
connecting.setVisibility(View.VISIBLE);
picker.setVisibility(View.GONE);
pickerSpacing.setVisibility(View.VISIBLE);
if (pickerSpacing != null) pickerSpacing.setVisibility(View.VISIBLE);
seeError.setVisibility(View.GONE);
cancel.setVisibility(View.GONE);

Expand Down Expand Up @@ -302,7 +302,7 @@ private void tryConnecting(@Nullable MultiProfile profile) {

connecting.setVisibility(View.VISIBLE);
picker.setVisibility(View.GONE);
pickerSpacing.setVisibility(View.VISIBLE);
if (pickerSpacing != null) pickerSpacing.setVisibility(View.VISIBLE);
seeError.setVisibility(View.GONE);
cancel.setVisibility(View.GONE);

Expand Down Expand Up @@ -352,7 +352,7 @@ private void showErrorDialog(@NonNull final Throwable ex) {
private void displayPicker(boolean share) {
connecting.setVisibility(View.GONE);
picker.setVisibility(View.VISIBLE);
pickerSpacing.setVisibility(View.GONE);
if (pickerSpacing != null) pickerSpacing.setVisibility(View.GONE);

if (share) pickerHint.setText(R.string.pickProfile_someAction);
else pickerHint.setText(R.string.pickProfile);
Expand Down

0 comments on commit 0be82a4

Please sign in to comment.