You are looking for Settings.System.AUTO_TIME
settings (which has been ported to Settings.Global.AUTO_TIME
in API 17). Prior to API level 17, you could read and change this value, but now this value is read-only for non-system applications.
private boolean isAutoTimeEnabled() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
ozbek source share