Skip to content

Commit

Permalink
Device Class Updates
Browse files Browse the repository at this point in the history
Small updates to methods providing data from the device class, flow on changes made
to the Service and Device Fragment.

Gradle updated with the release of Android Studio 0.8.1
  • Loading branch information
xLaMbChOpSx committed Jun 30, 2014
1 parent 3f9d8e0 commit 06be2ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ private void updateUI() {
TableLayout tableLayout;
TableRow tr;
if (mBound) {
mAimsicdService.refreshDevice();
tableLayout = (TableLayout) mView.findViewById(R.id.mainView);
switch (mAimsicdService.mDevice.getPhoneID()) {
case TelephonyManager.PHONE_TYPE_GSM: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void onCreate() {
prefs.registerOnSharedPreferenceChangeListener(this);
loadPreferences();

mDevice.refreshDeviceInfo(tm, lm); //Telephony Manager, Location Manager
mDevice.refreshDeviceInfo(tm); //Telephony Manager
setNotification();

mRequestExecutor = new SamsungMulticlientRilExecutor();
Expand Down Expand Up @@ -500,6 +500,10 @@ public boolean handleMessage(Message msg) {
}
}

public void refreshDevice() {
mDevice.refreshDeviceInfo(tm);
}

/**
* Process User Preferences
*/
Expand Down
31 changes: 1 addition & 30 deletions app/src/main/java/com/SecUpwN/AIMSICD/utils/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,65 +26,36 @@ public class Device {
* Device Declarations
*/
private int mPhoneID = -1;

private int mMcc = -1;

private int mMnc = -1;

private int mSignalInfo = -1;

private int mNetID = -1;

private int mLac = -1;

private int mCellID = -1;

private int mSID = -1;

private int mPSC = -1;

private int mTimingAdvance = -1;

private double mLongitude = 0.0;

private double mLatitude = 0.0;

private String mNetType = "";

private String mCellInfo = "";

private String mDataState = "";

private String mDataStateShort = "";

private String mNetName = "";

private String mMmcmcc = "";

private String mSimCountry = "";

private String mPhoneType = "";

private String mIMEI = "";

private String mIMEIV = "";

private String mSimOperator = "";

private String mSimOperatorName = "";

private String mSimSerial = "";

private String mSimSubs = "";

private String mDataActivityType = "";

private String mDataActivityTypeShort = "";

private boolean mRoaming;

private final List<Cell> mNeighboringCells = new ArrayList<>();

private Location mLastLocation;

private static final int TWO_MINUTES = 1000 * 60 * 2;
Expand All @@ -93,7 +64,7 @@ public class Device {
/**
* Refreshes all device specific details
*/
public void refreshDeviceInfo(TelephonyManager tm, LocationManager lm) {
public void refreshDeviceInfo(TelephonyManager tm) {
//Phone type and associated details
mIMEI = tm.getDeviceId();
mIMEIV = tm.getDeviceSoftwareVersion();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
classpath 'com.android.tools.build:gradle:0.12.+'
}
}

Expand Down

0 comments on commit 06be2ca

Please sign in to comment.