• MTK Android [输入法]客制化系统默认输入法-搜狗输入法


    1.frameworks/base/packages/SettingsProvider/res/values/defaults.xml


    <!--Sogou input method is used for system default input method by zfc-->
    <string name="config_default_input_method" translatable="false">com.sohu.inputmethod.sogou/.SogouIME</string>
    <string name="def_enabled_input_methods" translatable="false">com.sohu.inputmethod.sogou/.SogouIME</string>

    2.frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java


    private void loadSecureSettings(SQLiteDatabase db) {

      SQLiteStatement stmt = null;
      try {

        stmt = db.compileStatement("INSERT OR IGNORE INTO secure(name,value)"
        + " VALUES(?,?);");

        loadStringSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
        R.string.def_location_providers_allowed);

        String wifiWatchList = SystemProperties.get("ro.com.android.wifi-watchlist");
        if (!TextUtils.isEmpty(wifiWatchList)) {
          loadSetting(stmt, Settings.Secure.WIFI_WATCHDOG_WATCH_LIST, wifiWatchList);
        }

        //Sogou input method is used for system default input method by zfc
        loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD, R.string.config_default_input_method);
        loadStringSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS, R.string.def_enabled_input_methods);

        /*
        * IMPORTANT: Do not add any more upgrade steps here as the global,
        * secure, and system settings are no longer stored in a database
        * but are kept in memory and persisted to XML.
        *
        * See: SettingsProvider.UpgradeController#onUpgradeLocked
        */
        } finally {
          if (stmt != null) stmt.close();
        }
    }

  • 相关阅读:
    [转载]MATLAB 图像处理命令
    html Window与document区别(轉)
    ICMP数据包结构(转)
    CString,string,char*之间的转换(转)
    word或dword区别
    VS2010 皮肤扩展
    Unicode _T和L和_TXET
    转:git 的常用命令
    git fetch 和 git pull 的区别
    mac git 命令自动补全
  • 原文地址:https://www.cnblogs.com/cyqx/p/10975031.html
Copyright © 2020-2023  润新知