From a68931e941023762b6965c53a4800bfc2cb66cae Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Sun, 21 Feb 2016 23:30:06 +0100 Subject: [PATCH 01/87] fix travis --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e36a18a9..f7f4613a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,10 +53,7 @@ addons: branch_pattern: master before_deploy: - - cd AIMSICD/build/outputs/apk - - md5sum *-normal-release.apk > md5sum.txt - - sha1sum *-normal-release.apk > sha1sum.txt - - cd - + - cd AIMSICD/build/outputs/apk; md5sum *-normal-release.apk > md5sum.txt; sha1sum *-normal-release.apk > sha1sum.txt; cd - deploy: skip_cleanup: true From 02dff7929bf5e9e5ae011968f3c9ee17c7bd30d5 Mon Sep 17 00:00:00 2001 From: "Security: PWNED" Date: Sun, 21 Feb 2016 22:50:02 +0000 Subject: [PATCH 02/87] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72be8bfc4..68d576bb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # CHANGELOG of 'AIMSICD' ------------------------ +#### [21.02.2016 - WIP-Release v0.1.40.1-alpha](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/releases/tag/v0.1.40-alpha) + +* Fixed: Travis-CI does now attach the correctly signed APK again + +--- + #### [21.02.2016 - WIP-Release v0.1.40-alpha](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/releases/tag/v0.1.40-alpha) * Removed: Purged unused imports and `ATCommandActivity` From 7955ca17db70227bdf8fbafe15964950bfd181ee Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Mon, 22 Feb 2016 00:50:44 +0100 Subject: [PATCH 03/87] fix auto-versioning fix #781 --- build.gradle | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 0b45aa10b..65e4f92b2 100644 --- a/build.gradle +++ b/build.gradle @@ -10,16 +10,15 @@ buildscript { } } -apply plugin: 'io.freefair.git-version' - -gitVersion { - tagPrefix 'v' -} - allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } - version = rootProject.version + + apply plugin: 'io.freefair.git-version' + + gitVersion { + tagPrefix 'v' + } } From 789df6b92258a7460b893332648bef03d4711e1e Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Mon, 22 Feb 2016 16:14:30 +0100 Subject: [PATCH 04/87] move CONTRIBUTING.md --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md From c970df917274eda2a3e0f8931948798695ac9fd1 Mon Sep 17 00:00:00 2001 From: naofum Date: Thu, 21 Jan 2016 16:39:21 +0100 Subject: [PATCH 05/87] Translated using Weblate (Japanese) Currently translated at 100.0% (302 of 302 strings) --- AIMSICD/src/main/res/values-ja/translatable_strings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AIMSICD/src/main/res/values-ja/translatable_strings.xml b/AIMSICD/src/main/res/values-ja/translatable_strings.xml index 6ed86bb37..8a3aecdfa 100644 --- a/AIMSICD/src/main/res/values-ja/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-ja/translatable_strings.xml @@ -1,4 +1,4 @@ - + 追跡中 電話/SIM 詳細 アンテナ地図ビューアー @@ -338,4 +338,5 @@ 基地局追跡の GPS を有効にします N/A + データベースの設定 From 3f8e942ce46469d33cee136aaad6f021b01643ae Mon Sep 17 00:00:00 2001 From: VladThodo Date: Tue, 23 Feb 2016 20:57:57 +0200 Subject: [PATCH 06/87] Update AboutActivity.java --- .../AIMSICD/activities/AboutActivity.java | 51 +++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java index 41895e72e..08dd6da6d 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java @@ -6,13 +6,18 @@ package com.SecUpwN.AIMSICD.activities; import android.content.Intent; +import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; import android.support.annotation.DrawableRes; import android.support.annotation.StringRes; import android.support.v7.app.AlertDialog; import android.view.View; +import android.view.ViewGroup; +import android.view.animation.Animation; +import android.view.animation.AnimationUtils; import android.widget.Button; +import android.widget.ScrollView; import android.widget.TextView; import com.SecUpwN.AIMSICD.BuildConfig; @@ -22,6 +27,7 @@ import io.freefair.android.injection.annotation.XmlLayout; import io.freefair.android.injection.app.InjectionAppCompatActivity; + @XmlLayout(R.layout.activity_about) public class AboutActivity extends InjectionAppCompatActivity { @@ -50,7 +56,7 @@ public class AboutActivity extends InjectionAppCompatActivity { private TextView dangerTextView; @InjectView(R.id.textViewSkull) private TextView skullTextView; - + private boolean closeAfterFinish = true; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -137,14 +143,51 @@ public void onClick(View view) { }); btncredits.setOnClickListener(new View.OnClickListener() { + AlertDialog mCreditsDialog; @Override public void onClick(View view) { - - new AlertDialog.Builder(AboutActivity.this) + final TextView mCreditsText = new TextView(getApplicationContext()); + mCreditsText.setText(R.string.about_credits_content); + mCreditsText.setTextSize(18); + mCreditsText.setMaxLines(50); + final ScrollView mScrollView = new ScrollView(getApplicationContext()); + mScrollView.addView(mCreditsText); + Animation scrollTo = (Animation)AnimationUtils.loadAnimation(getApplicationContext(), R.anim.credits_dialog_scroll); + mCreditsText.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + closeAfterFinish = false; + mCreditsText.clearAnimation(); + } + }); + scrollTo.setAnimationListener(new Animation.AnimationListener() { + @Override + public void onAnimationStart(Animation animation) { + + } + @Override + public void onAnimationEnd(Animation animation) { + if (closeAfterFinish) { + mCreditsDialog.cancel(); + } else { + } + } + @Override + public void onAnimationRepeat(Animation animation) { + } + }); + ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) mCreditsText.getLayoutParams(); + mlp.setMargins(50, 20, 20, 0); + mCreditsText.setTypeface(Typeface.DEFAULT_BOLD); + mCreditsText.startAnimation(scrollTo); + closeAfterFinish = true; + mCreditsDialog = new AlertDialog.Builder(AboutActivity.this) .setTitle(R.string.about_credits) - .setMessage(R.string.about_credits_content) .setPositiveButton(android.R.string.ok, null) + .setView(mScrollView) .show(); + + } }); } From 7ff7e71da46b889cd73551755feec74c279cbe89 Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Tue, 23 Feb 2016 23:38:20 +0100 Subject: [PATCH 07/87] update gradle plugin version --- .../androidTest/java/com/SecUpwN/AIMSICD/test/GetProp.java | 7 +++++-- build.gradle | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/AIMSICD/src/androidTest/java/com/SecUpwN/AIMSICD/test/GetProp.java b/AIMSICD/src/androidTest/java/com/SecUpwN/AIMSICD/test/GetProp.java index 64c548f75..3aa35b22a 100644 --- a/AIMSICD/src/androidTest/java/com/SecUpwN/AIMSICD/test/GetProp.java +++ b/AIMSICD/src/androidTest/java/com/SecUpwN/AIMSICD/test/GetProp.java @@ -23,9 +23,12 @@ public GetProp() { public void testGetPropsReturnsValue() throws IOException { DebugLogs activity = (DebugLogs) getActivity(); - try { Thread.sleep(1000); } catch (Exception e) {} + try { + Thread.sleep(1000); + } catch (Exception e) { + } String props = activity.getProp(); Log.d("getprop", props); assertTrue(props.trim().length() > 0); } -} \ No newline at end of file +} diff --git a/build.gradle b/build.gradle index 65e4f92b2..4dcd8a46b 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' - classpath 'io.freefair:gradle-plugins:2.0.0-beta3' + classpath 'io.freefair:gradle-plugins:2.0.0-beta4' } } From 631dbb224de097ac61a1a38d14cbf447d2df59db Mon Sep 17 00:00:00 2001 From: naofum Date: Mon, 22 Feb 2016 16:16:02 +0100 Subject: [PATCH 08/87] Translated using Weblate (Japanese) Currently translated at 100.0% (302 of 302 strings) --- AIMSICD/src/main/res/values-ja/translatable_strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AIMSICD/src/main/res/values-ja/translatable_strings.xml b/AIMSICD/src/main/res/values-ja/translatable_strings.xml index 8a3aecdfa..21430dade 100644 --- a/AIMSICD/src/main/res/values-ja/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-ja/translatable_strings.xml @@ -338,5 +338,5 @@ 基地局追跡の GPS を有効にします N/A - データベースの設定 + データベース設定 From 3386cfe078bafc3e340a8123643534e6eeb04948 Mon Sep 17 00:00:00 2001 From: Vlad Todosin Date: Wed, 24 Feb 2016 06:45:52 +0200 Subject: [PATCH 09/87] Create credits_dialog_scroll.xml --- AIMSICD/src/main/res/anim/credits_dialog_scroll.xml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 AIMSICD/src/main/res/anim/credits_dialog_scroll.xml diff --git a/AIMSICD/src/main/res/anim/credits_dialog_scroll.xml b/AIMSICD/src/main/res/anim/credits_dialog_scroll.xml new file mode 100644 index 000000000..18fe360fd --- /dev/null +++ b/AIMSICD/src/main/res/anim/credits_dialog_scroll.xml @@ -0,0 +1,7 @@ + + From e8f94c7e1b3c8975bdd1408d082742a3a981ee99 Mon Sep 17 00:00:00 2001 From: Vlad Todosin Date: Wed, 24 Feb 2016 07:04:52 +0200 Subject: [PATCH 10/87] Update AboutActivity.java --- .../com/SecUpwN/AIMSICD/activities/AboutActivity.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java index 08dd6da6d..aa2805979 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java @@ -152,7 +152,7 @@ public void onClick(View view) { mCreditsText.setMaxLines(50); final ScrollView mScrollView = new ScrollView(getApplicationContext()); mScrollView.addView(mCreditsText); - Animation scrollTo = (Animation)AnimationUtils.loadAnimation(getApplicationContext(), R.anim.credits_dialog_scroll); + Animation scrollTo = (Animation)AnimationUtils.loadAnimation(getApplicationContext(), R.anim.credits_dialog_scroll); mCreditsText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -162,9 +162,7 @@ public void onClick(View v) { }); scrollTo.setAnimationListener(new Animation.AnimationListener() { @Override - public void onAnimationStart(Animation animation) { - - } + public void onAnimationStart(Animation animation) {} @Override public void onAnimationEnd(Animation animation) { if (closeAfterFinish) { @@ -173,8 +171,7 @@ public void onAnimationEnd(Animation animation) { } } @Override - public void onAnimationRepeat(Animation animation) { - } + public void onAnimationRepeat(Animation animation) {} }); ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) mCreditsText.getLayoutParams(); mlp.setMargins(50, 20, 20, 0); @@ -186,8 +183,6 @@ public void onAnimationRepeat(Animation animation) { .setPositiveButton(android.R.string.ok, null) .setView(mScrollView) .show(); - - } }); } From c32b8897288ac51c0849b97ef8bcdbd3d228372b Mon Sep 17 00:00:00 2001 From: tt3mm Date: Thu, 25 Feb 2016 00:27:41 +0100 Subject: [PATCH 11/87] Quick fix for #783 --- .../java/com/SecUpwN/AIMSICD/AIMSICD.java | 20 ++++++++++++++++--- .../AIMSICD/utils/StackOverflowXmlParser.java | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index 347c27588..db9f5851f 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -59,9 +59,12 @@ import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; +import org.json.JSONException; +import org.json.JSONObject; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import io.freefair.android.injection.annotation.Inject; @@ -306,7 +309,7 @@ void selectDrawerItem(int position) { sb.append("&cellid=").append(mAimsicdService.getCell().getCID()); } - sb.append("&format=xml"); + sb.append("&format=json"); Request request = new Request.Builder() .url(sb.toString()) @@ -323,9 +326,20 @@ public void onFailure(Request request, IOException e) { @Override public void onResponse(Response response) throws IOException { try { - List cellList = new StackOverflowXmlParser().parse(response.body().byteStream()); + JSONObject jsonCell = new JSONObject(response.body().string()); + Cell cell = new Cell(); + cell.setLat(jsonCell.getDouble("lat")); + cell.setLon(jsonCell.getDouble("lon")); + cell.setMCC(jsonCell.getInt("mcc")); + cell.setMNC(jsonCell.getInt("mnc")); + cell.setCID(jsonCell.getInt("cellid")); + cell.setLAC(jsonCell.getInt("lac")); + + List cellList = new ArrayList<>(); + cellList.add(cell); + AIMSICD.this.processFinish(cellList); - } catch (XmlPullParserException e) { + } catch (JSONException e) { e.printStackTrace(); } } diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java index 58d9a34b0..00bc06216 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java @@ -58,7 +58,7 @@ private List readCells(XmlPullParser parser) throws XmlPullParserException // to their respective "read" methods for processing. Otherwise, skips the tag. private Cell readCell(XmlPullParser parser) throws XmlPullParserException, IOException { Cell cell = new Cell(); - parser.require(XmlPullParser.START_TAG, ns, "cell"); + //parser.require(XmlPullParser.START_TAG, ns, "cell"); while (parser.next() != XmlPullParser.END_TAG) { if (parser.getEventType() != XmlPullParser.START_TAG) { continue; From 96078a2ffee3e3fab1c1c9cfe37355a5eb8aaa00 Mon Sep 17 00:00:00 2001 From: Justin Bull Date: Thu, 25 Feb 2016 23:06:19 -0500 Subject: [PATCH 12/87] Fix link to CONTRIBUTING --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3177a429..59d39e0bb 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ AIMSICD is an app to detect [IMSI-Catchers](https://en.wikipedia.org/wiki/IMSI-c * [What it does](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector#what-it-does) * [Why use it](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector#why-use-it) -* [**Contributing**](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/blob/development/CONTRIBUTING.md) -* [Bug Tracker](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/blob/development/CONTRIBUTING.md#debugging) +* [**Contributing**](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/blob/development/.github/CONTRIBUTING.md) +* [Bug Tracker](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/blob/development/.github/CONTRIBUTING.md#debugging) * [Warnings](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector#warnings) * [Research](https://spideroak.com/browse/share/AIMSICD/GitHub) * [Support](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector#support) From c814c97efa1dc9bbcb6be74385eee93bb38dd93f Mon Sep 17 00:00:00 2001 From: Justin Bull Date: Fri, 26 Feb 2016 00:00:50 -0500 Subject: [PATCH 13/87] Don't truncate MNC integer after 2 chars in OCID download This was causing issues, obviously, where OCID would provide a HTTP 200 response of an empty dataset for devices with an MNC length greater than 2 chars Refs #790 --- AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index 347c27588..effa8dc11 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -379,9 +379,9 @@ private void downloadBtsDataIfApiKeyAvailable() { if (networkOperator != null) { int mcc = Integer.parseInt(networkOperator.substring(0, 3)); - cell.setMCC(Integer.parseInt(networkOperator.substring(0, 3))); + cell.setMCC(mcc); int mnc = Integer.parseInt(networkOperator.substring(3)); - cell.setMNC(Integer.parseInt(networkOperator.substring(3, 5))); + cell.setMNC(mnc); log.debug("CELL:: mcc=" + mcc + " mnc=" + mnc); } From e82b38df38a84f9d7f8897dff7b9bdbb81b16b98 Mon Sep 17 00:00:00 2001 From: Nordlenningen Date: Thu, 25 Feb 2016 23:28:57 +0100 Subject: [PATCH 14/87] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (302 of 302 strings) --- .../res/values-nb/translatable_strings.xml | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/AIMSICD/src/main/res/values-nb/translatable_strings.xml b/AIMSICD/src/main/res/values-nb/translatable_strings.xml index 3ddaac667..d9b9698f7 100644 --- a/AIMSICD/src/main/res/values-nb/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-nb/translatable_strings.xml @@ -1,7 +1,7 @@ Sporing Telefon/SIM-detaljer - Antennekart-fremviser + Antenne Kart Databasefremviser Avslutt OK @@ -12,51 +12,51 @@ VIKTIG "Ved å bruke AIMSICD har du forstått og godtatt at AIMSICD er en experimentell og informativ Android applikasjon som kan feile i å oppdage sporing og overvåkning av flere årsaker. Du er også klar over at den kan bli lurt og slått av årsaker ukjent for utviklerne. Du forstår og at utviklerne og selskap tilknyttet denne gratisappen ikke kan holdes ansvarlig for resultater og konsekvenser vedrørende bruken av denne applikasjonen. " - Styr angrepsoppdaging - Styr cellesporing - Sikkerhetskopier database - Nullstill database + Styr Angrepsoppdaging + Styr Cellesporing + Sikkerhetskopier Database + Nullstill Database Alle data vil slettes.\nEr du sikker? - Tilbakefør database - Trykk på nytt for å gå ut. - Alle Nåværende celledetaljer + Tilbakefør Database + Trykk på nytt for å Avslutte. + Alle Nåværende Celledetaljer Feilsøking - Ingen Internett-forbindelse - Klarte ikke laste ned OpenCellID-data uten Internettilkobling, vennligst slå på datatilkobling! + Ingen Internettforbindelse + Klarte ikke laste ned OpenCellID data uten Internettilkobling, vennligst slå på datatilgang! - Last ned BTS-data + Last ned BTS Data Enhetsinformasjon - SIM-informasjon + SIM Informasjon Nettverksinformasjon Nåværende Trusselnivå Naboceller Krypterings Indikator Total: Land: - Operatør-ID: + Operatør ID: Operatørnavn: - IMSI: - Seriell: + Simkortnummer: + Serienummer: Telefontype: - IMEI: + TelefonSerienummer: Radio Version: Operatørnavn: Operatørkode: Type: - LAC: - CID: + OmrådeCelleID: + CelleID: Dataaktivitet: Datastatus: Søker: TA (LTE): Oppdater - Åpne navigasjons skuffe + Åpne Navigasjons Skuffe Innstillinger - Lukk navigasjons skuffe + Lukk Navigasjons Skuffe PSC: - Last opp BTS-data + Last Opp BTS Data Om AIMSICD Versjon: %s @@ -72,51 +72,51 @@ Aktiv sporing nær deg! Allt OK. Du blir sporet! - "Utrygt Område. Forlat det!" + Utrygt Område. Forlat det! "SPRING! Håndsettet er manipulert!" - Trykk status-ikonet under for detaljert informasjon: + Trykk Status Ikonet under for detaljert informasjon: - Nettverk-ID: - System-ID: - Basestasjon-ID: + Nettverks ID: + System ID: + Base Stasjon ID: GPS avslått Du kan ikke spore GPS data uten GPS. Slå på GPS nå? - Systemoppsett - Start automatisk - Start tjenesten automatisk ved oppstart + System Oppsett + Start Automatisk + Start tjenesten Automatisk ved oppstart Kjørende Tjenester Tjenester vil fortsette å kjøre etter du avslutter appen (hak av for å totalt avslutte) Beskyttelses Instillinger Meldingsoppsett Cellesporing - Slå på automatisk cellesporing + Slå på Automatisk Cellesporing Femtocell Oppdaging (foreløpig KUN CDMA telefoner) Femtocell Beskyttelse Fremtving Fly Modus når Femtocell oppdages (slå på igjen nettverk manuellt) Grensesnittoppsett Status-ikoner - Icon utseende Utvalg + Icon Utseende Utvalg Oppfriskningsrate Kontroler intervall av enhetsoppdateringer\nNåværende intervall:%s OpenCellID Instillinger OpenCellID API Nøkkel - Skriv inn din OpenCellID API nøkkel hær + Skriv inn din OpenCellID API Nøkkel hær Celle Overvåkning Slå på Automatisk Celle Overvåkning - Be om OpenCellID API nøkkel - Be om API nøkkel for OpenCellID datatilgang + Be om OpenCellID API Nøkkel + Be om API nøkkel for OpenCellID Datatilgang - Kartfremvisningsinnstillinger + Kart Innstillinger Karttype Vis Kart i flere utgaver - "CID: " - "LAC: " - "MCC: " - "MNC: " + "CelleID: " + "OmrådeCelle: " + "Landskode: " + "Nettverkskode: " "PC: " "Eksempler: " OpenCellID Data @@ -168,7 +168,7 @@ Velg minimum trusselnivå å vibrere på Pause OK - Medium + Middels Fare Flat @@ -257,7 +257,7 @@ Denne menyen er kun for spesialister!\nFor å slette en oppdaget SMS trykk lenge på listevisning. Slett Oppdaget SMS - Spesialist Bruker Instillinger + Spesialist Instillinger "Oppdagelses Strenger" Slett SMS Legg til og slett oppdagelses strenger @@ -278,7 +278,7 @@ AIMSICD trusselbilde, naboceller, krypterings metode indikator. - SIM kort detaljer, IMEI, TMSI. + SIM Leverandør detaljer, IMEI, TMSI. Vis detaljert sammenligning av nåværende tilknyttet celle, med data (hvis noen) funnet i OpenCellID og merk forskjellen. Se de forskjellige DB listene vi har. Kart med fargekodede antenner i nærheten. From 609fdf46e2a53c0b375c8de07614e7a1a391ab65 Mon Sep 17 00:00:00 2001 From: Vlad Todosin Date: Fri, 26 Feb 2016 15:18:55 +0200 Subject: [PATCH 15/87] Update AboutActivity.java --- .../main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java | 1 - 1 file changed, 1 deletion(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java index aa2805979..3c80086ac 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/activities/AboutActivity.java @@ -167,7 +167,6 @@ public void onAnimationStart(Animation animation) {} public void onAnimationEnd(Animation animation) { if (closeAfterFinish) { mCreditsDialog.cancel(); - } else { } } @Override From 13fd0a3c2bd674e39198dcb14e2aa1df7fb355e3 Mon Sep 17 00:00:00 2001 From: tt3mm Date: Sat, 27 Feb 2016 00:49:56 +0100 Subject: [PATCH 16/87] DetailsFragment OpenCellId resfresh - Bugfix - Navdrawer item changed to SwipeRefreshLayout --- .../java/com/SecUpwN/AIMSICD/AIMSICD.java | 85 +- .../SecUpwN/AIMSICD/constants/DrawerMenu.java | 24 +- .../DrawerMenuActivityConfiguration.java | 7 +- .../AIMSICD/drawer/DrawerMenuItem.java | 37 +- .../AIMSICD/fragments/DeviceFragment.java | 144 ++- .../AIMSICD/utils/StackOverflowXmlParser.java | 2 +- .../src/main/res/layout/fragment_device.xml | 1123 +++++++++-------- .../res/values-de/translatable_strings.xml | 2 +- .../res/values-es/translatable_strings.xml | 2 +- .../res/values-fr/translatable_strings.xml | 2 +- .../res/values-ja/translatable_strings.xml | 2 +- .../res/values-nb/translatable_strings.xml | 2 +- .../res/values-nl/translatable_strings.xml | 2 +- .../res/values-pl/translatable_strings.xml | 2 +- .../res/values-ru/translatable_strings.xml | 2 +- .../res/values-uk/translatable_strings.xml | 2 +- .../res/values-vi/translatable_strings.xml | 2 +- .../main/res/values/translatable_strings.xml | 2 +- 18 files changed, 720 insertions(+), 724 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index db9f5851f..c6522d4e9 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -53,21 +53,8 @@ import com.SecUpwN.AIMSICD.utils.Icon; import com.SecUpwN.AIMSICD.utils.LocationServices; import com.SecUpwN.AIMSICD.utils.RequestTask; -import com.SecUpwN.AIMSICD.utils.StackOverflowXmlParser; -import com.squareup.okhttp.Callback; -import com.squareup.okhttp.OkHttpClient; -import com.squareup.okhttp.Request; -import com.squareup.okhttp.Response; - -import org.json.JSONException; -import org.json.JSONObject; -import org.xmlpull.v1.XmlPullParserException; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import io.freefair.android.injection.annotation.Inject; +import java.util.List; public class AIMSICD extends BaseActivity implements AsyncResponse { @@ -95,9 +82,6 @@ public class AIMSICD extends BaseActivity implements AsyncResponse { private DrawerMenuActivityConfiguration mNavConf; - @Inject - OkHttpClient okHttpClient; - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -266,18 +250,18 @@ void selectDrawerItem(int position) { openFragment(mapFragment); title = getString(R.string.app_name_short); break; - case DrawerMenu.ID.SETTINGS.BACKUP_DB: + case DrawerMenu.ID.DATABASE_SETTINGS.BACKUP_DB: new RequestTask(this, RequestTask.BACKUP_DATABASE).execute(); break; } - if (selectedItem.getId() == DrawerMenu.ID.SETTINGS.RESTORE_DB) { + if (selectedItem.getId() == DrawerMenu.ID.DATABASE_SETTINGS.RESTORE_DB) { if (CellTracker.LAST_DB_BACKUP_VERSION < AIMSICDDbAdapter.DATABASE_VERSION) { Helpers.msgLong(this, getString(R.string.unable_to_restore_backup_from_previous_database_version)); } else { new RequestTask(this, RequestTask.RESTORE_DATABASE).execute(); } - } else if (selectedItem.getId() == DrawerMenu.ID.SETTINGS.RESET_DB) { + } else if (selectedItem.getId() == DrawerMenu.ID.DATABASE_SETTINGS.RESET_DB) { // WARNING! This deletes the entire database, thus any subsequent DB access will FC app. // Therefore we need to either restart app or run AIMSICDDbAdapter, to rebuild DB. // See: https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/581 and Helpers.java @@ -286,67 +270,6 @@ void selectDrawerItem(int position) { } else if (selectedItem.getId() == DrawerMenu.ID.APPLICATION.DOWNLOAD_LOCAL_BTS_DATA) { downloadBtsDataIfApiKeyAvailable(); - } else if (selectedItem.getId() == DrawerMenu.ID.MAIN.ALL_CURRENT_CELL_DETAILS) { - if (CellTracker.OCID_API_KEY != null && !CellTracker.OCID_API_KEY.equals("NA")) { - - //TODO: Use Retrofit for that - StringBuilder sb = new StringBuilder(); - sb.append("http://www.opencellid.org/cell/get?key=").append(CellTracker.OCID_API_KEY); - - if (mAimsicdService.getCell().getMCC() != Integer.MAX_VALUE) { - sb.append("&mcc=").append(mAimsicdService.getCell().getMCC()); - } - - if (mAimsicdService.getCell().getMNC() != Integer.MAX_VALUE) { - sb.append("&mnc=").append(mAimsicdService.getCell().getMNC()); - } - - if (mAimsicdService.getCell().getLAC() != Integer.MAX_VALUE) { - sb.append("&lac=").append(mAimsicdService.getCell().getLAC()); - } - - if (mAimsicdService.getCell().getCID() != Integer.MAX_VALUE) { - sb.append("&cellid=").append(mAimsicdService.getCell().getCID()); - } - - sb.append("&format=json"); - - Request request = new Request.Builder() - .url(sb.toString()) - .get() - .build(); - - okHttpClient.newCall(request) - .enqueue(new Callback() { - @Override - public void onFailure(Request request, IOException e) { - - } - - @Override - public void onResponse(Response response) throws IOException { - try { - JSONObject jsonCell = new JSONObject(response.body().string()); - Cell cell = new Cell(); - cell.setLat(jsonCell.getDouble("lat")); - cell.setLon(jsonCell.getDouble("lon")); - cell.setMCC(jsonCell.getInt("mcc")); - cell.setMNC(jsonCell.getInt("mnc")); - cell.setCID(jsonCell.getInt("cellid")); - cell.setLAC(jsonCell.getInt("lac")); - - List cellList = new ArrayList<>(); - cellList.add(cell); - - AIMSICD.this.processFinish(cellList); - } catch (JSONException e) { - e.printStackTrace(); - } - } - }); - } else { - Helpers.sendMsg(this, getString(R.string.no_opencellid_key_detected)); - } } else if (selectedItem.getId() == DrawerMenu.ID.APPLICATION.QUIT) { try { if (mAimsicdService.isSmsTracking()) { diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/constants/DrawerMenu.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/constants/DrawerMenu.java index d028a2298..6efa5ac38 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/constants/DrawerMenu.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/constants/DrawerMenu.java @@ -21,7 +21,6 @@ public static class ID { * Constants of section of menu */ public static final int SECTION_MAIN = 10; - public static final int SECTION_TRACKING = 20; public static final int SECTION_DATABASE_SETTINGS = 30; public static final int SECTION_APPLICATION = 40; @@ -39,23 +38,11 @@ public static class MAIN { } - /** - * Constants of item of 'tracking' section of menu - */ - public static class TRACKING { - - public static final int TOGGLE_ATTACK_DETECTION = 200; //Toggle Attack Detection - public static final int TOGGLE_CELL_TRACKING = 210; //Toggle Cell Tracking - public static final int TRACK_FEMTOCELL = 220; //Track Femtocell - - } - /** * Constants of item of 'settings' section of menu */ - public static class SETTINGS { + public static class DATABASE_SETTINGS { - public static final int PREFERENCES = 300; public static final int BACKUP_DB = 310; //Backup DataBase public static final int RESTORE_DB = 320; //Restore DataBase public static final int RESET_DB = 330; //Reset DataBase @@ -70,15 +57,10 @@ public static class SETTINGS { * Constants of item of 'application' section of menu */ public static class APPLICATION { - //FIXME Is this should be "Download Local OCID Data" ? - public static final int DOWNLOAD_LOCAL_BTS_DATA = 400; //Download Local BST Data + public static final int DOWNLOAD_LOCAL_BTS_DATA = 400; //Download Local BST Data FIXME Is this should be "Download Local OCID Data" ? public static final int UPLOAD_LOCAL_BTS_DATA = 410; //Upload Local BST Data - //TODO need to implement public static final int ADD_GET_OCID_API_KEY = 420; // Add/Get OCID API key - public static final int ABOUT = 430; //About AIMSICD - public static final int SEND_DEBUGGING_LOG = 440; //Debugging - //TODO need to implement - public static final int FAQ = 450; // Help/FAQ + public static final int FAQ = 450; // TODO Help/FAQ public static final int QUIT = 460; //Quit } diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuActivityConfiguration.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuActivityConfiguration.java index 0b4235163..a604f236f 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuActivityConfiguration.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuActivityConfiguration.java @@ -106,16 +106,15 @@ public DrawerMenuActivityConfiguration build() { menu.add(DrawerMenuSection.create(DrawerMenu.ID.SECTION_MAIN, mContext.getString(R.string.main))); menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.PHONE_SIM_DETAILS, mContext.getString(R.string.device_info), R.drawable.ic_action_phone, true)); // Phone/SIM Details menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.CURRENT_TREAT_LEVEL, mContext.getString(R.string.cell_info_title), R.drawable.cell_tower, true)); // Cell Information (Neighboring cells etc) - menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.ALL_CURRENT_CELL_DETAILS, mContext.getString(R.string.cell_lookup), R.drawable.stat_sys_download_anim0, false)); // Lookup "All Current Cell Details (ALL_CURRENT_CELL_DETAILS)" menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.DB_VIEWER, mContext.getString(R.string.db_viewer), R.drawable.ic_action_storage, true)); // Database Viewer menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.ANTENNA_MAP_VIEW, mContext.getString(R.string.map_view), R.drawable.ic_action_map, false)); // Antenna Map Viewer menu.add(DrawerMenuItem.create(DrawerMenu.ID.MAIN.AT_COMMAND_INTERFACE, mContext.getString(R.string.at_command_title), R.drawable.ic_action_computer, true)); // AT Command Interface //Section Settings menu.add(DrawerMenuSection.create(DrawerMenu.ID.SECTION_DATABASE_SETTINGS, mContext.getString(R.string.database_settings))); - menu.add(DrawerMenuItem.create(DrawerMenu.ID.SETTINGS.BACKUP_DB, mContext.getString(R.string.backup_database), R.drawable.ic_action_import_export, false)); // Backup Database - menu.add(DrawerMenuItem.create(DrawerMenu.ID.SETTINGS.RESTORE_DB, mContext.getString(R.string.restore_database), R.drawable.ic_action_import_export, false)); // Restore Database - menu.add(DrawerMenuItem.create(DrawerMenu.ID.SETTINGS.RESET_DB, mContext.getString(R.string.clear_database), R.drawable.ic_action_delete_database, false)); // Reset Database + menu.add(DrawerMenuItem.create(DrawerMenu.ID.DATABASE_SETTINGS.BACKUP_DB, mContext.getString(R.string.backup_database), R.drawable.ic_action_import_export, false)); // Backup Database + menu.add(DrawerMenuItem.create(DrawerMenu.ID.DATABASE_SETTINGS.RESTORE_DB, mContext.getString(R.string.restore_database), R.drawable.ic_action_import_export, false)); // Restore Database + menu.add(DrawerMenuItem.create(DrawerMenu.ID.DATABASE_SETTINGS.RESET_DB, mContext.getString(R.string.clear_database), R.drawable.ic_action_delete_database, false)); // Reset Database //Section Application menu.add(DrawerMenuSection.create(DrawerMenu.ID.SECTION_APPLICATION, mContext.getString(R.string.application))); diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuItem.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuItem.java index a328ee9e9..e4e34b13c 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuItem.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/drawer/DrawerMenuItem.java @@ -8,8 +8,7 @@ import com.SecUpwN.AIMSICD.R; import com.SecUpwN.AIMSICD.constants.DrawerMenu.ID.APPLICATION; import com.SecUpwN.AIMSICD.constants.DrawerMenu.ID.MAIN; -import com.SecUpwN.AIMSICD.constants.DrawerMenu.ID.SETTINGS; -import com.SecUpwN.AIMSICD.constants.DrawerMenu.ID.TRACKING; +import com.SecUpwN.AIMSICD.constants.DrawerMenu.ID.DATABASE_SETTINGS; public class DrawerMenuItem implements NavDrawerItem { @@ -104,9 +103,6 @@ public int getHelpStringId() { case MAIN.CURRENT_TREAT_LEVEL: return R.string.help_main_current_threat_level; - case MAIN.ALL_CURRENT_CELL_DETAILS: - return R.string.help_main_acd; - case MAIN.DB_VIEWER: return R.string.help_main_database_viewer; @@ -116,45 +112,30 @@ public int getHelpStringId() { case MAIN.AT_COMMAND_INTERFACE: return R.string.help_main_at_command_interface; - case TRACKING.TOGGLE_CELL_TRACKING: - return R.string.help_tracking_toggle_cell_tracking; - - case TRACKING.TOGGLE_ATTACK_DETECTION: - return R.string.help_tracking_toggle_attack_detection; - - case SETTINGS.PREFERENCES: - return R.string.help_settings_preferences; - - case SETTINGS.BACKUP_DB: + case DATABASE_SETTINGS.BACKUP_DB: return R.string.help_settings_backup_db; - case SETTINGS.RESTORE_DB: + case DATABASE_SETTINGS.RESTORE_DB: return R.string.help_settings_restore_db; - case SETTINGS.RESET_DB: + case DATABASE_SETTINGS.RESET_DB: return R.string.help_settings_reset_db; - case SETTINGS.EXPORT_DB_TO_CVS: + case DATABASE_SETTINGS.EXPORT_DB_TO_CVS: return R.string.help_settings_export_db_to_csv; - case SETTINGS.IMPORT_DB_FROM_CVS: + case DATABASE_SETTINGS.IMPORT_DB_FROM_CVS: return R.string.help_settings_import_db_from_csv; - case APPLICATION.ADD_GET_OCID_API_KEY: - return R.string.help_app_add_get_ocid_api_key; - - case APPLICATION.ABOUT: - return R.string.help_app_about; - case APPLICATION.DOWNLOAD_LOCAL_BTS_DATA: return R.string.help_app_download_local_bts; + case APPLICATION.ADD_GET_OCID_API_KEY: + return R.string.help_app_add_get_ocid_api_key; + case APPLICATION.UPLOAD_LOCAL_BTS_DATA: return R.string.help_app_upload_local_bts; - case APPLICATION.SEND_DEBUGGING_LOG: - return R.string.help_app_debugging; - case APPLICATION.QUIT: return R.string.help_app_quit; diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/DeviceFragment.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/DeviceFragment.java index 8f48093e4..b30318a44 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/DeviceFragment.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/DeviceFragment.java @@ -5,36 +5,56 @@ */ package com.SecUpwN.AIMSICD.fragments; -import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.content.IntentFilter; import android.content.ServiceConnection; import android.os.Bundle; +import android.os.Handler; import android.os.IBinder; +import android.os.Looper; +import android.support.annotation.NonNull; +import android.support.v4.widget.SwipeRefreshLayout; import android.telephony.TelephonyManager; import android.view.View; import android.widget.TableRow; import com.SecUpwN.AIMSICD.R; import com.SecUpwN.AIMSICD.service.AimsicdService; +import com.SecUpwN.AIMSICD.service.CellTracker; +import com.SecUpwN.AIMSICD.utils.Cell; import com.SecUpwN.AIMSICD.utils.Device; import com.SecUpwN.AIMSICD.utils.Helpers; import com.SecUpwN.AIMSICD.widget.HighlightTextView; import com.kaichunlin.transition.animation.AnimationManager; +import com.squareup.okhttp.Callback; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.Response; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; import io.freefair.android.injection.annotation.Inject; +import io.freefair.android.injection.annotation.InjectView; import io.freefair.android.injection.annotation.XmlLayout; import io.freefair.android.injection.app.InjectionFragment; import io.freefair.android.util.logging.Logger; @XmlLayout(R.layout.fragment_device) -public class DeviceFragment extends InjectionFragment { +public class DeviceFragment extends InjectionFragment implements SwipeRefreshLayout.OnRefreshListener{ @Inject private Logger log; + @Inject + OkHttpClient okHttpClient; + + @InjectView(R.id.swipeRefresLayout) + private SwipeRefreshLayout swipeRefreshLayout; + private AimsicdService mAimsicdService; private boolean mBound; private Context mContext; @@ -46,6 +66,8 @@ public void onViewCreated(View view, Bundle savedInstanceState) { // Bind to LocalService Intent intent = new Intent(mContext, AimsicdService.class); mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); + + swipeRefreshLayout.setOnRefreshListener(this); } @Override @@ -57,15 +79,12 @@ public void onResume() { Intent intent = new Intent(mContext, AimsicdService.class); mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); } - - mContext.registerReceiver(mMessageReceiver, new IntentFilter(AimsicdService.UPDATE_DISPLAY)); updateUI(); } @Override public void onPause() { super.onPause(); - mContext.unregisterReceiver(mMessageReceiver); } @Override @@ -97,22 +116,11 @@ public void onServiceDisconnected(ComponentName arg0) { } }; - private final BroadcastReceiver mMessageReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - final Bundle bundle = intent.getExtras(); - if (bundle != null && bundle.getBoolean("update")) { - Helpers.msgShort(mContext, context.getString(R.string.refreshing_display)); - updateUI(); - } - } - }; - private void updateUI() { HighlightTextView content; TableRow tr; if (mBound) { - final AnimationManager ani=new AnimationManager(); + final AnimationManager ani = new AnimationManager(); mAimsicdService.getCellTracker().refreshDevice(); Device mDevice = mAimsicdService.getCellTracker().getDevice(); @@ -200,4 +208,104 @@ private void updateUI() { ani.startAnimation(5000); } } + + @Override + public void onRefresh() { + if (CellTracker.OCID_API_KEY != null && !CellTracker.OCID_API_KEY.equals("NA")) { + Request request = createOpenCellIdApiCall(); + okHttpClient.newCall(request).enqueue(getOpenCellIdResponseCallback()); + } else { + Handler refresh = new Handler(Looper.getMainLooper()); + refresh.post(new Runnable() { + public void run() { + Helpers.sendMsg(getActivity(), getString(R.string.no_opencellid_key_detected)); + swipeRefreshLayout.setRefreshing(false); + } + }); + } + } + + @NonNull + private Callback getOpenCellIdResponseCallback() { + return new Callback() { + @Override + public void onFailure(Request request, IOException e) { + Handler refresh = new Handler(Looper.getMainLooper()); + refresh.post(new Runnable() { + public void run() { + refreshFailed(); + } + }); + } + + @Override + public void onResponse(final Response response) throws IOException { + Handler refresh = new Handler(Looper.getMainLooper()); + refresh.post(new Runnable() { + public void run() { + Cell cell = responseToCell(response); + processFinish(cell); + } + }); + } + }; + } + + //TODO: Use Retrofit for this + private Request createOpenCellIdApiCall() { + StringBuilder sb = new StringBuilder(); + sb.append("http://www.opencellid.org/cell/get?key=").append(CellTracker.OCID_API_KEY); + + if (mAimsicdService.getCell().getMCC() != Integer.MAX_VALUE) { + sb.append("&mcc=").append(mAimsicdService.getCell().getMCC()); + } + if (mAimsicdService.getCell().getMNC() != Integer.MAX_VALUE) { + sb.append("&mnc=").append(mAimsicdService.getCell().getMNC()); + } + if (mAimsicdService.getCell().getLAC() != Integer.MAX_VALUE) { + sb.append("&lac=").append(mAimsicdService.getCell().getLAC()); + } + if (mAimsicdService.getCell().getCID() != Integer.MAX_VALUE) { + sb.append("&cellid=").append(mAimsicdService.getCell().getCID()); + } + sb.append("&format=json"); + return new Request.Builder() + .url(sb.toString()) + .get() + .build(); + } + + private Cell responseToCell(Response response) { + try { + JSONObject jsonCell = new JSONObject(response.body().string()); + Cell cell = new Cell(); + cell.setLat(jsonCell.getDouble("lat")); + cell.setLon(jsonCell.getDouble("lon")); + cell.setMCC(jsonCell.getInt("mcc")); + cell.setMNC(jsonCell.getInt("mnc")); + cell.setCID(jsonCell.getInt("cellid")); + cell.setLAC(jsonCell.getInt("lac")); + return cell; + }catch(JSONException | IOException e){ + e.printStackTrace(); + } + return null; + } + + private void processFinish(Cell cell) { + if (cell != null) { + log.info("processFinish - Cell =" + cell.toString()); + if (cell.isValid()) { + mAimsicdService.setCell(cell); + Helpers.msgShort(mContext, getActivity().getString(R.string.refreshed_cell_id_info)); // TODO re-translating other languages + updateUI(); + swipeRefreshLayout.setRefreshing(false); + } + } + } + + private void refreshFailed(){ + Helpers.msgShort(mContext, "Failed to refresh CellId. Check network connection."); + swipeRefreshLayout.setRefreshing(false); + } } diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java index 00bc06216..58d9a34b0 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/utils/StackOverflowXmlParser.java @@ -58,7 +58,7 @@ private List readCells(XmlPullParser parser) throws XmlPullParserException // to their respective "read" methods for processing. Otherwise, skips the tag. private Cell readCell(XmlPullParser parser) throws XmlPullParserException, IOException { Cell cell = new Cell(); - //parser.require(XmlPullParser.START_TAG, ns, "cell"); + parser.require(XmlPullParser.START_TAG, ns, "cell"); while (parser.next() != XmlPullParser.END_TAG) { if (parser.getEventType() != XmlPullParser.START_TAG) { continue; diff --git a/AIMSICD/src/main/res/layout/fragment_device.xml b/AIMSICD/src/main/res/layout/fragment_device.xml index 385b5831f..d9ed6c51a 100644 --- a/AIMSICD/src/main/res/layout/fragment_device.xml +++ b/AIMSICD/src/main/res/layout/fragment_device.xml @@ -1,571 +1,574 @@ - - - android:id="@+id/mainView" + - + - + - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + android:layout_width="fill_parent" + android:gravity="center_horizontal" + android:tag="network"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AIMSICD/src/main/res/values-de/translatable_strings.xml b/AIMSICD/src/main/res/values-de/translatable_strings.xml index 1adb42f46..0e0d3d23d 100644 --- a/AIMSICD/src/main/res/values-de/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-de/translatable_strings.xml @@ -264,7 +264,7 @@ Datenbank wurde erfolgreich gesichert nach: Fehler beim Sichern der Datenbank. Kein OpenCellID API-Schlüssel erkannt!\nBitte Schlüssel in Einstellungen eingeben. - Aktualisiere Anzeige + Aktualisiere Anzeige Kein ROOT-Zugriff auf Gerät möglich.\nAT-Befehle setzen ROOT-Zugriff voraus.\nBitte prüfen ob das gerät GEROOTET ist und erneut versuchen. Busybox konnte nicht erkannt werden.\nAT-Befehle setzen Busybox-Komponenten für korrekte Funktion voraus.\nBitte prüfen ob Busybox installiert ist und erneut versuchen. Ein unbekannter Fehler trat beim Zugriffsversuch auf die serielle Schnittstelle auf.\nBitte Fehlerprotokoll prüfen und auf unserem GitHub veröffentlichen. diff --git a/AIMSICD/src/main/res/values-es/translatable_strings.xml b/AIMSICD/src/main/res/values-es/translatable_strings.xml index f854bafd8..e291d1596 100644 --- a/AIMSICD/src/main/res/values-es/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-es/translatable_strings.xml @@ -226,7 +226,7 @@ Backup de base de datos guardado con éxito en: Error de copia de seguridad de base de datos. Ninguna llave OpenCellID API detectada.\nIntroduzca primero su clave en el menu de configuración. - Display de Actualizacion + Display de Actualizacion "No se pudo obtener acceso ROOT en el dispositivo.\nLa inyección de comando AT requiere acceso ROOT Terminal.\nPor favor, compruebe que el dispositivo esta ROOTEADO y vuelva a intentarlo." No se ha podido detectar Busybox en el dispositivo.\nLa inyección de comando AT requiere componentes de Busybox para funcionar correctamente.\nPor favor compruebe que su dispositivo tiene Busybox instalado y vuelva a intentarlo. Se ha producido un error desconocido tratando de adquirir el dispositivo de serie.\nBusca los errores en logcat y publicalos en nuestro Github. diff --git a/AIMSICD/src/main/res/values-fr/translatable_strings.xml b/AIMSICD/src/main/res/values-fr/translatable_strings.xml index df8d7fc69..788c10425 100755 --- a/AIMSICD/src/main/res/values-fr/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-fr/translatable_strings.xml @@ -264,7 +264,7 @@ Sauvegarde de la base de donnée réussi, emplacement : Erreur lors de la sauvegarde de la Base De Donnée. Clé de l’API d’OpenCellID non trouvée!\nEntrez d’abord une clé dans les paramètres. - Rafraîchissement de l\'écran + Rafraîchissement de l\'écran Impossible d\'obtenir l\'accès ROOT.\nL\'injection de commandes AT à besoin d\'un accès terminal en tant que ROOT.\nVéréfiez que votre téléphone est rooté et réessayez. Busybox non trouvé.\nL\'injection de commandes AT a besoin de Busybox pour fonctionner correctement.\nVéréfiez que votre appareil possède Busybox et ressayez. Une erreur inconnue s’est produite lors de l’accès au périphérique série.\nVérifiez les messages d’erreurs de vos journaux et postez-les sur notre dépôt GitHub. diff --git a/AIMSICD/src/main/res/values-ja/translatable_strings.xml b/AIMSICD/src/main/res/values-ja/translatable_strings.xml index 21430dade..9c30fa514 100644 --- a/AIMSICD/src/main/res/values-ja/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-ja/translatable_strings.xml @@ -230,7 +230,7 @@ データベースのバックアップを正常に保存しました: データベースのバックアップ中にエラー。 OpenCellID API キーは検出しませんでした!\n最初に、設定でキーを入力してください。 - 表示の更新中 + 表示の更新中 お使いのデバイスで ROOT アクセスを取得できません。\nAT コマンド インジェクションで ROOT ターミナル アクセスが必要です。\nお使いのデバイスを ROOT 化していることを確認して、もう一度試してください。 お使いのデバイスで Busybox を検出できません。\n正しく機能するために、AT コマンド インジェクションで Busybox コンポーネントが必要です。\nお使いのデバイスに Busybox がインストールされていることを確認して、もう一度試してください。 シリアル デバイスを取得しようとして、不明なエラーが発生しました。\nlogcat のすべてのエラーを確認して、私たちの Github 上にそれを投稿してください。 diff --git a/AIMSICD/src/main/res/values-nb/translatable_strings.xml b/AIMSICD/src/main/res/values-nb/translatable_strings.xml index 3ddaac667..84a494310 100644 --- a/AIMSICD/src/main/res/values-nb/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-nb/translatable_strings.xml @@ -236,7 +236,7 @@ Database vellykket sikkerhetskopiert til: Feil under sikkerhetskopiering av database. Ingen OpenCellID API nøkkel oppdaget!\nVennligst skriv inn din nøkkel under innstillinger først. - Oppdaterer Skjerm + Oppdaterer Skjerm Klarte ikke å få ROOT tilgang på din enhet.\nAT kommando injection krever ROOT Terminal tilgang.\nVennligst undersøk om din enhet er ROOTET og prøv igjen. Kunne ikke oppdage BusyBox på din enhet.\nAT kommando Injection krever BusyBoks komponenter for å virke korrekt.\nVennligst undersøk om din enhet har BusyBoks installert og prøv igen. En ukjent feil har oppstått under forsøk på å nå serielenheten.\nVennligst undersøk din logcat for feil og post dem på vår Github. diff --git a/AIMSICD/src/main/res/values-nl/translatable_strings.xml b/AIMSICD/src/main/res/values-nl/translatable_strings.xml index e7ba7e75a..f28d89e15 100644 --- a/AIMSICD/src/main/res/values-nl/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-nl/translatable_strings.xml @@ -226,7 +226,7 @@ BTS gegevens succesvol verstuurd naar OpenCellID. Fout bij het opsturen van BTS gegevens naar OpenCellID servers! Geen OpenCellID API sleutel gevonden!\nStel uw sleutel eerst in de instellingen in. - Scherm verversen + Scherm verversen Kan geen ROOT toegang op uw toestel krijgen.\nVersturen van AT commando\'s vereist ROOT terminal toegang.\nControleer of uw apparaat ROOT toegang heeft en probeer opnieuw. Kan busybox niet vinden op uw apparaat.\nHet versturen van AT commando\'s vereist busybox componenten.\nControleer of busybox geïnstalleerd is en probeer opnieuw. Er is een onbekende fout opgetreden met het serieel apparaat.\nCheck uw logcat voor foutmeldingen en post ze op onze Github. diff --git a/AIMSICD/src/main/res/values-pl/translatable_strings.xml b/AIMSICD/src/main/res/values-pl/translatable_strings.xml index 38e5e4a0a..ae1fabef0 100644 --- a/AIMSICD/src/main/res/values-pl/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-pl/translatable_strings.xml @@ -257,7 +257,7 @@ Kopia zapasowa zapisana do: Błąd tworzenia kopii zapasowej. Brak klucza API OpenCellID. Musisz najpierw wpisać lub pobrać swój klucz. - Odświeżanie ekranu + Odświeżanie ekranu Nie udało się usyskać praw ROOTa. Interface komend AT wymaga praw ROOTa. Sprawdź swoje urządzenie i spróbuj ponownie. Nie udało się odnaleźć BusyBox na Twoim urządzeniu. Interface komend AT wymaga BusyBoxa! Sprawdź swoje urządzenie i spróbuj ponownie. Wystąpił nieznany bład przy próbie uzyskania klucza seryjnego urządzenia. Prosimy o sprawdzenie logów i przesłanie ich do nas na Github. diff --git a/AIMSICD/src/main/res/values-ru/translatable_strings.xml b/AIMSICD/src/main/res/values-ru/translatable_strings.xml index 52ab89992..ccfcaa023 100644 --- a/AIMSICD/src/main/res/values-ru/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-ru/translatable_strings.xml @@ -278,7 +278,7 @@ Резервная копия базы данных успешна сохранена в: Ошибка резервного копирования базы данных. Не обнаружен ключ API OpenCellID!\nПожалуйста, введите Ваш ключ в настройках. - Обновление дисплея + Обновление дисплея Невозможно получить РУТ-доступ на Вашем устройстве.\nДля AT-команд требуется ROOT доступ к терминалу.\nПожалуйста, проверьте наличие прав РУТ на Вашем устройстве и попробуйте еще раз. Невозможно обнаружить Busybox на Вашем устройстве.\nДля правильной работы с AT-командами требуются компоненты Busybox.\nПожалуйста, проверьте, что Busybox установлен на Ваше устройство, и попробуйте снова. Произошла неизвестная ошибка при попытке получения Serial Device.\nПожалуйста, проверьте логкат на возможные ошибки и отправьте их на Github. diff --git a/AIMSICD/src/main/res/values-uk/translatable_strings.xml b/AIMSICD/src/main/res/values-uk/translatable_strings.xml index b45e4aad1..8850cfe65 100644 --- a/AIMSICD/src/main/res/values-uk/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-uk/translatable_strings.xml @@ -238,7 +238,7 @@ Відновлення вдало завершено. Відновлення бази даних успішно завершено. Не виявлено ключа до OpenCellID API!\nБудь ласка, спершу введіть ваш ключ в налаштуваннях. - Оновлення дисплею + Оновлення дисплею Не вдалося отримати root-права на вашому пристрої.\nВони потрібні для ін\'єкцій AT-команд до терміналу.\nБудь ласка, надайте root-права додатку, та спробуйте ще раз. "Не виявлено Busybox на вашому пристрої.\nДля правильної роботи ін\'єкції AT-команд потрібні компоненти Busybox.\nБудь ласка, перевірте, чи встановлений Busybox на вашому пристрої та спробуйте ще раз." Трапилась невідома помилка під час доступу до послідовного пристрою.\nБудь ласка, перевірте вивід logcat на наявність помилок, та відзвітуйте їх на нашу сторінку на Github. diff --git a/AIMSICD/src/main/res/values-vi/translatable_strings.xml b/AIMSICD/src/main/res/values-vi/translatable_strings.xml index 2093b6386..9dbfa164f 100644 --- a/AIMSICD/src/main/res/values-vi/translatable_strings.xml +++ b/AIMSICD/src/main/res/values-vi/translatable_strings.xml @@ -240,7 +240,7 @@ Sao lưu thành công CSDL vào: Lỗi khi sao lưu CSDL. Không phát hiện khóa API OpenCellID nào!\nXin nhập khoá của bạn trong cài đặt trước đã. - Đang làm mới hiển thị + Đang làm mới hiển thị Không thể nhận quyền truy cập ROOT trên thiết bị của bạn.\nNhập lệnh AT yêu cầu quyền truy cập ROOT cho Trạm .\nHãy kiểm tra nếu thiết bị ĐÃ ROOT và thử lại. Không thấy Busybox trên thiết bị của bạn.\nNhập lệnh AT cần các thành phần của Busybox để có thể hoạt động chính xác.\nHãy kiểm tra xem thiết bị đã cài đặt Busybox chưa và thử lại. Đã xảy lỗi lạ cố chiếm dụng các thiết bị nối tiếp.\nXin kiểm tra logcat cho bất kỳ lỗi gì và gửi lên Github của chúng tôi. diff --git a/AIMSICD/src/main/res/values/translatable_strings.xml b/AIMSICD/src/main/res/values/translatable_strings.xml index be31670ee..1c3a083c9 100644 --- a/AIMSICD/src/main/res/values/translatable_strings.xml +++ b/AIMSICD/src/main/res/values/translatable_strings.xml @@ -279,7 +279,7 @@ Database backup successfully saved to: Error backing up database. No OpenCellID API Key detected!\nPlease enter your key in settings first. - Refreshing display + Refreshed CellId info Unable to acquire ROOT access on your device.\nAT Command Injection requires ROOT Terminal access.\nPlease check your device is ROOTED and try again. Unable to detect Busybox on your device.\nAT Command Injection requires Busybox components to function correctly.\nPlease check your device has Busybox installed and try again. An unknown error has occurred trying to acquire the Serial Device.\nPlease check your logcat for any errors and post them on our Github. From 7ae389cc0118ef91d17a63faefdc8100da732fb7 Mon Sep 17 00:00:00 2001 From: tt3mm Date: Sat, 27 Feb 2016 01:10:48 +0100 Subject: [PATCH 17/87] Fixed #794 --- AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index effa8dc11..9d433111b 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -525,9 +525,9 @@ public boolean onCreateOptionsMenu(Menu menu) { inflater.inflate(R.menu.main_menu, menu); MenuItem toggleAttackDetectionMenuItem = menu.findItem(R.id.toggle_attack_detection); - toggleAttackDetectionMenuItem.setChecked(true); + toggleAttackDetectionMenuItem.setChecked(mAimsicdService.isMonitoringCell()); MenuItem toggleCellTrackingMenuItem = menu.findItem(R.id.toggle_cell_tracking); - toggleCellTrackingMenuItem.setChecked(true); + toggleCellTrackingMenuItem.setChecked(mAimsicdService.isTrackingCell()); return true; } @@ -535,12 +535,12 @@ public boolean onCreateOptionsMenu(Menu menu) { public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ case R.id.toggle_attack_detection: - item.setChecked(!item.isChecked()); monitorCell(); + item.setChecked(mAimsicdService.isMonitoringCell()); break; case R.id.toggle_cell_tracking: - item.setChecked(!item.isChecked()); trackCell(); + item.setChecked(mAimsicdService.isTrackingCell()); break; case R.id.settings: Intent settingsIntent = new Intent(this, SettingsActivity.class); @@ -606,7 +606,7 @@ private void SmsDetection() { * Cell Information Tracking - Enable/Disable */ private void trackCell() { - mAimsicdService.setCellTracking(mAimsicdService.isTrackingCell()); + mAimsicdService.setCellTracking(!mAimsicdService.isTrackingCell()); } /** From 9e55e9a05085d96cdaee388e28e086c00c36efbf Mon Sep 17 00:00:00 2001 From: tt3mm Date: Sat, 27 Feb 2016 01:40:31 +0100 Subject: [PATCH 18/87] CellInfoFragment refresh button changed to swiperefreshlayout --- .../java/com/SecUpwN/AIMSICD/AIMSICD.java | 3 - .../AIMSICD/fragments/CellInfoFragment.java | 44 +++---- .../main/res/layout/fragment_cell_info.xml | 112 +++++++++--------- 3 files changed, 76 insertions(+), 83 deletions(-) diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index effa8dc11..a1a5dcb45 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -230,9 +230,6 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } } - - - void selectDrawerItem(int position) { NavDrawerItem selectedItem = mNavConf.getNavItems().get(position); String title = selectedItem.getLabel(); diff --git a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/CellInfoFragment.java b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/CellInfoFragment.java index 1caee6d5b..02bf9f4a9 100644 --- a/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/CellInfoFragment.java +++ b/AIMSICD/src/main/java/com/SecUpwN/AIMSICD/fragments/CellInfoFragment.java @@ -27,6 +27,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.IBinder; +import android.support.v4.widget.SwipeRefreshLayout; import android.text.TextUtils; import android.view.View; import android.widget.Button; @@ -71,7 +72,7 @@ * */ @XmlLayout(R.layout.fragment_cell_info) -public class CellInfoFragment extends InjectionFragment { +public class CellInfoFragment extends InjectionFragment implements SwipeRefreshLayout.OnRefreshListener{ public static final int STOCK_REQUEST = 1; public static final int SAMSUNG_MULTIRIL_REQUEST = 2; @@ -80,7 +81,6 @@ public class CellInfoFragment extends InjectionFragment { private RilExecutor rilExecutor; private boolean mBound; private Context mContext; - private Activity mActivity; private final Handler timerHandler = new Handler(); private List neighboringCells; @@ -103,8 +103,8 @@ public class CellInfoFragment extends InjectionFragment { @InjectView(R.id.ciphering_indicator) private TextView mCipheringIndicator; - @InjectView(R.id.button_refresh) - private Button refresh; + @InjectView(R.id.swipeRefreshLayout) + private SwipeRefreshLayout swipeRefreshLayout; private final Runnable timerRunnable = new Runnable() { @@ -116,19 +116,6 @@ public void run() { } }; - public CellInfoFragment() { - } - - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - mContext = activity.getBaseContext(); - mActivity = activity; - // Bind to LocalService - Intent intent = new Intent(mContext, AimsicdService.class); - mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); - } - @Override public void onPause() { super.onPause(); @@ -158,7 +145,12 @@ public void onResume() { public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - refresh.setOnClickListener(new btnClick()); + mContext = getActivity().getBaseContext(); + // Bind to LocalService + Intent intent = new Intent(mContext, AimsicdService.class); + mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); + + swipeRefreshLayout.setOnRefreshListener(this); } @Override @@ -191,15 +183,13 @@ public void onServiceDisconnected(ComponentName arg0) { } }; - private class btnClick implements View.OnClickListener { - - @Override - public void onClick(View v) { - Helpers.msgShort(mContext, mAimsicdService.getString(R.string.refreshing_now)); - updateUI(); - } + @Override + public void onRefresh() { + updateUI(); + swipeRefreshLayout.setRefreshing(false); } + @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); @@ -218,7 +208,7 @@ private void updateUI() { void updateCipheringIndicator() { final List list = rilExecutor.getCipheringInfo(); - mActivity.runOnUiThread(new Runnable() { + getActivity().runOnUiThread(new Runnable() { @Override public void run() { if (list != null) { @@ -259,7 +249,7 @@ void updateStockNeighbouringCells() { void updateNeighbouringCells() { final List list = rilExecutor.getNeighbours(); - mActivity.runOnUiThread(new Runnable() { + getActivity().runOnUiThread(new Runnable() { @Override public void run() { if (list != null) { diff --git a/AIMSICD/src/main/res/layout/fragment_cell_info.xml b/AIMSICD/src/main/res/layout/fragment_cell_info.xml index 70609c0e5..738db5d1b 100644 --- a/AIMSICD/src/main/res/layout/fragment_cell_info.xml +++ b/AIMSICD/src/main/res/layout/fragment_cell_info.xml @@ -1,26 +1,27 @@ - + -