Skip to content

Commit ade43f3

Browse files
committed
Merge pull request #598 from SecUpwN/revert-594-development
Revert "Recheck cell after OCID download", see NPE comment in #598.
2 parents c6b9f4d + 5051658 commit ade43f3

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.SecUpwN.AIMSICD"
44
android:versionCode="33"
5-
android:versionName="0.1.33-alpha-b01">
5+
android:versionName="0.1.33-alpha-b00">
66

77
<!-- If we ever wanna make this a system app, we can add the following 2 lines above:
88
coreApp="true"

app/src/main/java/com/SecUpwN/AIMSICD/utils/RequestTask.java

+2-13
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import android.content.Context;
1111
import android.content.Intent;
1212
import android.support.v4.content.LocalBroadcastManager;
13-
import android.telephony.CellLocation;
14-
import android.telephony.TelephonyManager;
1513
import android.util.Log;
1614

1715
import com.SecUpwN.AIMSICD.AIMSICD;
@@ -20,7 +18,6 @@
2018
import com.SecUpwN.AIMSICD.activities.MapViewerOsmDroid;
2119
import com.SecUpwN.AIMSICD.adapters.AIMSICDDbAdapter;
2220
import com.SecUpwN.AIMSICD.constants.TinyDbKeys;
23-
import com.SecUpwN.AIMSICD.service.AimsicdService;
2421
import com.SecUpwN.AIMSICD.service.CellTracker;
2522

2623
import org.apache.http.HttpResponse;
@@ -116,9 +113,6 @@ public class RequestTask extends BaseAsyncTask<String, Integer, String> {
116113
private final Context mAppContext;
117114
private final char mType;
118115
private int mTimeOut;
119-
private CellTracker mCellTracker;
120-
private AimsicdService mAimsicdService;
121-
private static TelephonyManager tm;
122116

123117
public RequestTask(Context context, char type) {
124118
super((Activity)context);
@@ -320,8 +314,6 @@ protected void onPostExecute(String result) {
320314
super.onPostExecute(result);
321315
AIMSICD.mProgressBar.setProgress(0);
322316
TinyDB tinydb = TinyDB.getInstance();
323-
tm = (TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
324-
CellLocation cellLocation = tm.getCellLocation();
325317

326318
switch (mType) {
327319
case DBE_DOWNLOAD_REQUEST:
@@ -332,9 +324,8 @@ protected void onPostExecute(String result) {
332324
}
333325

334326
mDbAdapter.checkDBe();
335-
tinydb.putBoolean("ocid_downloaded", true);
336327

337-
mAimsicdService.getCellTracker().compareLac(cellLocation);
328+
tinydb.putBoolean("ocid_downloaded", true);
338329
} else {
339330
Helpers.msgLong(mAppContext, mAppContext.getString(R.string.error_retrieving_opencellid_data));
340331
}
@@ -349,8 +340,6 @@ protected void onPostExecute(String result) {
349340

350341
mDbAdapter.checkDBe();
351342
tinydb.putBoolean("ocid_downloaded", true);
352-
353-
mAimsicdService.getCellTracker().compareLac(cellLocation);
354343
}
355344
} else {
356345
Helpers.msgLong(mAppContext, mAppContext.getString(R.string.error_retrieving_opencellid_data));
@@ -451,4 +440,4 @@ public static String getOCDBDownloadDirectoryPath(Context context) {
451440
public static String getOCDBDownloadFilePath(Context context) {
452441
return getOCDBDownloadDirectoryPath(context) + OCDB_File_Name;
453442
}
454-
}
443+
}

0 commit comments

Comments
 (0)