为什么我有“设置airplane_mode_on已经从android.provider.Settings.System [...]进入logcat当我的应用程序与此无关 [英] 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?

查看:520
本文介绍了为什么我有“设置airplane_mode_on已经从android.provider.Settings.System [...]进入logcat当我的应用程序与此无关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在线找到任何参考。只有一些logcat与同一行,显然是从Android 4.2+,可能来自CyanogenMod设备,像我自己的GT-I9100。



在Eclipse中开发我的Android应用程序,我继续这一行,一段时间后,进入LogCat视图,自动过滤我的应用程序的包名称。所以似乎是来自或至少是由我的应用程序引起的。



完整的行是:设置airplane_mode_on已经从android移动。 provider.Settings.System to android.provider.Settings.Global,返回只读值



应用程序没有什么可做的有这样的Android全局设置。



任何提示?



谢谢。

解决方案

这是毕加索图书馆。



生成警告的呼叫(API级别> 17)为:

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

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

请参阅docs ref:


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.

解决方案

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

这篇关于为什么我有“设置airplane_mode_on已经从android.provider.Settings.System [...]进入logcat当我的应用程序与此无关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆