打开Android设备,然后设置>开发人员选项>指针位置和切换打开,

时间:2013-11-16 07:30:36

标签: android pointers location settings

我想知道指针位置的源代码在哪里,我尝试在设置中找到源代码,但我只得到以下代码,源代码在哪里实现切换指针位置的效果? ????

1.DevelopmentSettings.java

@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, 
  Preference preference) {
    if (preference == mEnableAdb) {
        .....................
     } else if (preference == mPointerLocation) {
        writePointerLocationOptions();
     } else if (................) {
         .....................
     } else {
         .....................
     }

}

2.writePointerLocationOptions()

private void writePointerLocationOptions() {
    Settings.System.putInt(getActivity().getContentResolver(),
            Settings.System.POINTER_LOCATION, mPointerLocation.isChecked() ? 1 : 0);
}

1 个答案:

答案 0 :(得分:0)

尝试在此处找到它:

com.android.internal.policy.impl.PhoneWindowManager.enablePointerLocation()