Added cancel buttons to permissions dialogs. Fixed crash from issue #45
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="96"
|
||||
android:versionName="4.0.0t">
|
||||
android:versionCode="97"
|
||||
android:versionName="4.0.0v">
|
||||
<!-- android:allowBackup="false" -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
||||
@@ -240,8 +240,12 @@ public class LogManager {
|
||||
+ DatabaseUtils.sqlEscapeString(sdData.toJSON(true)) + ","
|
||||
+ 0
|
||||
+ ")";
|
||||
if (mOsdDb != null) {
|
||||
mOsdDb.execSQL(SQLStr);
|
||||
Log.v(TAG, "data written to database");
|
||||
Log.v(TAG, "writeDatapointToLocalDb(): data written to database");
|
||||
} else {
|
||||
Log.e(TAG,"writeDatapointToLocalDb(): mOsdDb is null");
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
Log.e(TAG, "writeToLocalDb(): Error Writing Data: " + e.toString());
|
||||
|
||||
@@ -646,6 +646,11 @@ public class StartupActivity extends AppCompatActivity {
|
||||
SMS_PERMISSIONS_1,
|
||||
45);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancelBtnTxt), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
}).create().show();
|
||||
}
|
||||
}
|
||||
@@ -666,12 +671,18 @@ public class StartupActivity extends AppCompatActivity {
|
||||
.setPositiveButton(getString(R.string.okBtnTxt), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
Log.i(TAG,"requestLocationPermissions1(): Launching ActivityCompat.requestPermissions()");
|
||||
Log.i(TAG, "requestLocationPermissions1(): Launching ActivityCompat.requestPermissions()");
|
||||
ActivityCompat.requestPermissions(StartupActivity.this,
|
||||
LOCATION_PERMISSIONS_1,
|
||||
43);
|
||||
}
|
||||
}).create().show();
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancelBtnTxt), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
})
|
||||
.create().show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,6 +707,11 @@ public class StartupActivity extends AppCompatActivity {
|
||||
LOCATION_PERMISSIONS_2,
|
||||
44);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancelBtnTxt), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
}).create().show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<string name="app_name">OpenSeizureDetector</string>
|
||||
<string name="changelog">
|
||||
"\n
|
||||
\nV4.0.0v - Added BLE Characteristic changes for PineWatch, added cancel buttons to permissions dialogs.
|
||||
\nV4.0.0t - Fixed issue with occasional crashes when network disrupted. Improved 'Prominent Disclosure' of SMS and Location permissions to satisfy Google Play Store requirements.
|
||||
\nV4.0.0s - Fixed problem with Android 11 not sending SMS Location alerts.
|
||||
\nV4.0.0p - Restored compatibility with Android V6
|
||||
|
||||
Reference in New Issue
Block a user