File tree Expand file tree Collapse file tree
src/main/java/uk/co/digitme/machinemonitoring/Helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ android {
66 applicationId " uk.samban.machinemonitoring"
77 minSdkVersion 24
88 targetSdkVersion 33
9- versionCode 9
10- versionName " 7.0 "
9+ versionCode 10
10+ versionName " 7.1 "
1111 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
1212 }
1313 buildTypes {
Original file line number Diff line number Diff line change @@ -88,23 +88,8 @@ public void saveServerAddress(String address){
8888
8989 @ SuppressLint ("Range" )
9090 public URI getServerURI () throws URISyntaxException {
91- SQLiteDatabase db = getReadableDatabase ();
92- String address ;
9391 URI uri ;
94-
95- Cursor cursor = db .rawQuery ("SELECT * FROM SETTINGS" ,null );
96- if (cursor .moveToFirst ()) {
97- try {
98- address = cursor .getString (cursor .getColumnIndex (COLUMN_SERVER_ADDRESS ));
99- cursor .close ();
100- } catch (CursorIndexOutOfBoundsException e ) {
101- Log .e (TAG , "Failed to get server address" );
102- address = "" ;
103- }
104- } else {
105- Log .e (TAG , "Failed to get server address" );
106- address = "" ;
107- }
92+ String address = this .getServerAddress ();
10893
10994 uri = new URI (address );
11095 String scheme ;
You can’t perform that action at this time.
0 commit comments