In all related discussions, people mentioned get/setMobileDataEnabled is private function and needs to be accessed by using reflection. For example, this one How to tell if 'Mobile Network Data' is enabled or disabled (even when connected by WiFi)?.
However, I found the Settings app (package/apps/Settings/src/com/android/settings/DataUsageSummary.java) does not use reflection at all. Anybody knows the reason?
private ConnectivityManager mConnService;
mConnService = ConnectivityManager.from(context);
private void setMobileDataEnabled(boolean enabled) {
if (LOGD) Log.d(TAG, "setMobileDataEnabled()");
mConnService.setMobileDataEnabled(enabled);
mMobileDataEnabled = enabled;
updatePolicy(false);
}