android8.1- Show virtual keyboard 默认打开

修改路径:android-8.1\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
将 :
false
改成 :true

  
    300

    
 -  false
 +  true
    
    0

    
    true
    


命令:

settings put secure show_ime_with_hard_keyboard 1 打开 
settings put secure show_ime_with_hard_keyboard 0 关闭

frameworks\base\core\java\android\provider\Settings.java

public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard";
 @Override
    public boolean isChecked() {
		return Settings.Secure.getInt(mContext.getContentResolver(), SHOW_IME_WITH_HARD_KEYBOARD , 1)==1;
    } 

    @Override
    public boolean setChecked(boolean isChecked) {
		Settings.Secure.putInt(mContext.getContentResolver(), SHOW_IME_WITH_HARD_KEYBOARD ,
                isChecked ? 1 : 0);
        return true;
    }

你可能感兴趣的:(android)