当我的应用程序与此无关时,为什么我将"设置airplane_mode_on已从android.provider.Settings.System [...]"移至logcat?

den*_*tex 13 eclipse android logcat

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

在Eclipse中开发我的Android应用程序,我偶尔会在LogCat视图中使用我的应用程序包名称进行自动过滤.所以它似乎来自我的应用程序,或者至少是由我的应用程序引起的.

完整的一行是: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value

该应用与此类Android全局设置无关.

任何提示?

谢谢.

den*_*tex 30

这是毕加索的图书馆.

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

import static android.provider.Settings.System.AIRPLANE_MODE_ON;
Run Code Online (Sandbox Code Playgroud)

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

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