• 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();
        }
    }

  • 相关阅读:
    Atitit.ide eclipse编译速度慢的解决
    Atitit.ide eclipse编译速度慢的解决
    Atitit.可视化与报表原理与概论
    Atitit.可视化与报表原理与概论
    Atitit.数据检索与网络爬虫与数据采集的原理概论
    Atitit.数据检索与网络爬虫与数据采集的原理概论
    Atitit 游戏的原理与概论attilax总结
    Atitit 游戏的原理与概论attilax总结
    Atiti.ui原理与gui理论
    Atiti.ui原理与gui理论
  • 原文地址:https://www.cnblogs.com/cyqx/p/10975031.html
Copyright © 2020-2023  润新知