Why I have “Setting airplane_mode_on has moved from android.provider.Settings.System […]” into the logcat when my app has nothing to do with that?

非 Y 不嫁゛ 提交于 2019-11-30 02:36:06

问题


I didn't found any reference on-line. Just some logcat with the same line, apparently from Android 4.2+ and possibly from CyanogenMod devices, like the GT-I9100 I own.

Developing my android App in Eclipse, I keep getting this line, once in a while, into the LogCat view, auto-filtered with my app's package name. So it seems to be coming from, or at least caused by, my app.

The complete line is: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value

The app doesn't have nothing to do with such Android global setting.

Any hint?

Thanks.


回答1:


It was the Picasso library.

And the calls generating the warning (for API level > 17) are:

import static android.provider.Settings.System.AIRPLANE_MODE_ON;

and

static boolean isAirplaneModeOn(Context context) {
  ContentResolver contentResolver = context.getContentResolver();
  return Settings.System.getInt(contentResolver, AIRPLANE_MODE_ON, 0) != 0;
}

See docs ref: https://developer.android.com/reference/android/provider/Settings.System.html#AIRPLANE_MODE_ON



来源:https://stackoverflow.com/questions/19164389/why-i-have-setting-airplane-mode-on-has-moved-from-android-provider-settings-sy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!