Skip to content

Commit

Permalink
Fixed error caused after denying location permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasrafael committed Feb 7, 2020
1 parent f981051 commit 51929f6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "br.edu.uepb.nutes.ocariot"
minSdkVersion 21
targetSdkVersion 28
versionCode 13
versionName "1.10.1"
versionCode 14
versionName "1.10.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

manifestPlaceholders = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ public void setFitBitAccess(UserAccess fitBitAccess) {
public boolean isFitbitAccessValid() {
if (this.fitbitStatus == null) return false;
return fitbitStatus.equalsIgnoreCase(UserAccess.TokenStatus.VALID) ||
fitbitStatus.equalsIgnoreCase(UserAccess.TokenStatus.EXPIRED) ||
fitbitStatus.equalsIgnoreCase(UserAccess.TokenStatus.RATE_LIMIT);
fitbitStatus.equalsIgnoreCase(UserAccess.TokenStatus.EXPIRED);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,8 @@ public void onResume() {
if (!hasLocationPermissions()) {
requestLocationPermission();
return;
} else {
mBoxEnableLocation.setVisibility(View.GONE);
}
mBoxEnableLocation.setVisibility(View.GONE);
if (mHRManager.isConnected()) mBoxHRLoading.setVisibility(View.GONE);
else mBoxHRLoading.setVisibility(View.VISIBLE);
mScanner.stopScan();
Expand Down Expand Up @@ -570,8 +569,8 @@ public void onReceive(Context context, Intent intent) {
case BluetoothAdapter.STATE_ON:
Timber.d("BluetoothAdapter.STATE_ON");
mBoxEnableBluetooth.setVisibility(View.GONE);
mBoxHRLoading.setVisibility(View.VISIBLE);
if (!hasLocationPermissions()) requestLocationPermission();
else mBoxHRLoading.setVisibility(View.VISIBLE);
mScanner.stopScan();
mScanner.startScan(mScannerCallback);
break;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_iot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
android:background="@color/colorWarning"
android:orientation="vertical"
android:padding="@dimen/default_padding"
android:visibility="visible">
android:visibility="gone">

<TextView
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<string name="key_signout" translatable="false">key_signout</string>
<string name="key_sync_data" translatable="false">key_sync_data</string>
<string name="key_children" translatable="false">key_children_manager</string>
<string name="settings_summary_version" translatable="false">1.10.1</string>
<string name="settings_summary_version" translatable="false">1.10.2</string>
<string name="login_with_fitbit">Provide access to Fitbit</string>
<string name="login_do_not_user_fitbit">Do not currently use Fitbit</string>
<string name="settings_title">Settings</string>
Expand Down

0 comments on commit 51929f6

Please sign in to comment.