Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在Android上以编程方式更改屏幕锁定声音设置(从设置->声音->屏幕锁定声音)复选框?
例如,如果我想更改触觉反馈设置,我会这样做:
Settings.System.putInt(m_context.getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, bEnable ? 1 : 0);
屏幕锁定声音的定义是什么?
根据Android Source code,它的常量是“LOCKSCREEN_SOUNDS_ENABLED”
http://androidxref.com/4.2_r1/xref/packages/apps/Settings/src/com/android/settings/SoundSettings.java#301