Code example for SwitchPreference

Methods: setSummaryisChecked

0
						this.getSystemService(Context.NOTIFICATION_SERVICE);
				notificationManager.cancelAll();
			} 
		} 
		if(pref == fast) {
			boolean value = fast.isChecked();
			if(value ==true) {
				fast.setSummary("Enabled");
				CMDProcessor.runSuCommand("busybox echo 1 > /sys/devices/platform/_battery/fast_charge"); 
			} 
			if(value==false) {
				fast.setSummary("Disabled");
				CMDProcessor.runSuCommand("busybox echo 0 > /sys/devices/platform/_battery/fast_charge"); 
			} 
		} 
 
		return false; 
	} 
 
	private void changegov(){ 
Experience pair programming with AI  Get Codota for Java