Commit f9f35580 authored by Alan McNatty's avatar Alan McNatty
Browse files

Removed IMEI stuff

parent 2a81da1b
......@@ -29,7 +29,6 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.telephony.TelephonyManager;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
......@@ -45,11 +44,6 @@ public class EditPreferences extends PreferenceActivity implements OnSharedPrefe
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if ( prefs.getString(getString(R.string.pref_upload_token_key), null).trim().length() == 0 ) {
// set the token to the IMEI is null
prefs.edit().putString(getString(R.string.pref_upload_token_key), this.getDeviceId());
}
prefs.registerOnSharedPreferenceChangeListener(this);
}
......@@ -101,17 +95,10 @@ public class EditPreferences extends PreferenceActivity implements OnSharedPrefe
// reset defaults
PreferenceManager.setDefaultValues(this, R.xml.preferences, true);
// set the token to the IMEI is null
prefs.edit().putString(getString(R.string.pref_upload_token_key), this.getDeviceId());
// refresh displayed values by restarting activity (a hack, but apparently there
// isn't a nicer way)
finish();
startActivity(getIntent());
}
public String getDeviceId() {
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
return telephonyManager.getDeviceId();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment