From b98e2b835d4288c5909347a9937bfd62c70692b9 Mon Sep 17 00:00:00 2001 From: Paul Kinsella <paulkinsella29@yahoo.ie> Date: Thu, 23 Jul 2015 18:56:13 +0100 Subject: [PATCH] Fixes Dbe UI layout and #525 Fixes Layout issue in DBV for imported items From my test it also fixes filter for mcc and mnc This just needed to be moved up a few lines Cell cell = new Cell(); --- app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java | 8 +++++--- app/src/main/res/layout/dbe_import_items.xml | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java b/app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java index 104b02aa..f6b6f233 100644 --- a/app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java +++ b/app/src/main/java/com/SecUpwN/AIMSICD/AIMSICD.java @@ -313,7 +313,8 @@ public class AIMSICD extends BaseActivity implements AsyncResponse { // Trying to fix issue #525 by using DJaeger's comment in: // https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/543#issuecomment-121605064 - /* TODO: FIXME !! + // TODO: FIXME !! + Cell cell = new Cell(); TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String networkOperator = tm.getNetworkOperator(); @@ -322,13 +323,14 @@ public class AIMSICD extends BaseActivity implements AsyncResponse { cell.setMCC(Integer.parseInt(networkOperator.substring(0, 3))); int mnc = Integer.parseInt(networkOperator.substring(3)); cell.setMNC(Integer.parseInt(networkOperator.substring(3, 5))); + Log.d(TAG, "CELL:: mcc="+mcc+ " mnc="+mnc); } - */ + GeoLocation loc = mAimsicdService.lastKnownLocation(); if (loc != null) { Helpers.msgLong(mContext, mContext.getString(R.string.contacting_opencellid_for_data)); - Cell cell = new Cell(); + cell.setLon(loc.getLongitudeInDegrees()); cell.setLat(loc.getLatitudeInDegrees()); Helpers.getOpenCellData(mContext, cell, RequestTask.DBE_DOWNLOAD_REQUEST); diff --git a/app/src/main/res/layout/dbe_import_items.xml b/app/src/main/res/layout/dbe_import_items.xml index d7bb911e..dc72ac43 100644 --- a/app/src/main/res/layout/dbe_import_items.xml +++ b/app/src/main/res/layout/dbe_import_items.xml @@ -267,7 +267,8 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:textColor="@color/standard_grey" - android:textSize="12sp" /> + android:textSize="12sp" + android:layout_weight="0.1" /> <TextView android:layout_width="wrap_content" @@ -282,7 +283,8 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:textColor="@color/standard_grey" - android:textSize="12sp" /> + android:textSize="12sp" + android:layout_weight="0.1" /> </TableRow> -- GitLab