eclipse 当我的应用程序与此无关时,为什么我有“设置飞机模式已从 android.provider.Settings.System [...]”移动到 logcat 中?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19164389/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:14:13  来源:igfitidea点击:

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?

androideclipselogcat

提问by dentex

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.

我没有在网上找到任何参考资料。只是一些具有相同线路的 logcat,显然来自 Android 4.2+,也可能来自 CyanogenMod 设备,例如我拥有的 GT-I9100。

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.

在 Eclipse 中开发我的 android 应用程序时,我不断地将这条线放入 LogCat 视图中,并使用我的应用程序包名称自动过滤。所以它似乎来自我的应用程序,或者至少是由我的应用程序引起的。

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

完整的行是: 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.

该应用程序与此类 Android 全局设置无关。

Any hint?

任何提示?

Thanks.

谢谢。

回答by dentex

It was the Picasso library.

那是毕加索图书馆。

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

生成警告的调用(对于 API 级别 > 17)是:

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: //developer.android.com/reference/android/provider/Settings.System.html#AIRPLANE_MODE_ON