Code example for TelephonyManager

Methods: getSimOperator

0
		long penis = (getBootTime(context) - bootTimeMillis());
		if ((penis < -50) || (penis > 50)) {
			Log.i(APP, "checkPrefs() -> Fixing Prefs -> Boottime: " + bootTimeMillis());
			setBootTime(context, bootTimeMillis());
			TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
			setNetNum(context, tm.getSimOperator());
		} 
	} 
	public void run(String command) {
		Process process = null; 
		try { 
			process = Runtime.getRuntime().exec("su");
		} catch (IOException e) {
			e.printStackTrace();
		} 
		DataOutputStream os = new DataOutputStream(process.getOutputStream());
 
		try { os.writeBytes(command + "\n"); } catch (IOException e) { e.printStackTrace(); }
   		try { os.flush(); } catch (IOException e) { e.printStackTrace(); }
 
Contextual code suggestions in your IDE  Get Codota for Java