当前位置: 首页 > news >正文

有做任务赚赏金的网站吗怎么做仿制网站

有做任务赚赏金的网站吗,怎么做仿制网站,网站搭建需要的公司,wordpress调用网站标题外界实体物理键盘#xff0c;需要选择键盘布局#xff0c;不然会对应输入不正确#xff0c;某些平台是这样的。 实体键盘在插入设备中后会自动设置一个布局#xff0c;但是可能不是我们想要的。 修改两个功能#xff1a; 根据系统语言设置默认的键盘。 默认添加两个键盘…外界实体物理键盘需要选择键盘布局不然会对应输入不正确某些平台是这样的。 实体键盘在插入设备中后会自动设置一个布局但是可能不是我们想要的。 修改两个功能 根据系统语言设置默认的键盘。 默认添加两个键盘布局到选择键盘布局 的dialog界面 键盘的布局文件apk位置:   frameworks/base/packages/InputDevices/res/raw/ frameworks/base/packages/InputDevices/res/xml/keyboard_layouts.xml 追查设置中的布局找到这里选择键盘布局的Dialogpackages/apps/Settings/src/com/android/settings/inputmethod/KeyboardLayoutDialogFragment.java 点击设置键盘布局会走到  packages/apps/Settings/src/com/android/settings/inputmethod/KeyboardLayoutPickerController.java 查看到 addKeyboardLayoutForInputDevice 设置键盘布局所以利用这里我们添加。 Overridepublic boolean handlePreferenceTreeClick(Preference preference) {if(DEBUG)Log.d(testkeyboard,----handlePreferenceTreeClick---);if (!(preference instanceof SwitchPreference)) {return false;}final SwitchPreference switchPref (SwitchPreference) preference;final KeyboardLayout layout mPreferenceMap.get(switchPref);if (layout ! null) {final boolean checked switchPref.isChecked();if (checked) {mIm.addKeyboardLayoutForInputDevice(mInputDeviceIdentifier,layout.getDescriptor());if(DEBUG)Log.d(testkeyboard,layout.getDescriptor() layout.getDescriptor());} else {mIm.removeKeyboardLayoutForInputDevice(mInputDeviceIdentifier,layout.getDescriptor());}}return true;} 主要修改 frameworks/base/services/core/java/com/android/server/input/InputManagerService.java  addKeyboardLayoutForInputDevice(InputDeviceIdentifier identifier,String keyboardLayoutDescriptor) 如下修改 diff --git a/frameworks/base/services/core/java/com/android/server/input/InputManagerService.java b/frameworks/base/services/core/java/com/android/server/input/InputManagerService.java index 5fc3712d221..1bc1ee6cef7 100755 --- a/frameworks/base/services/core/java/com/android/server/input/InputManagerService.javab/frameworks/base/services/core/java/com/android/server/input/InputManagerService.java-1101,6 1101,7 public class InputManagerService extends IInputManager.StubString layout getCurrentKeyboardLayoutForInputDevice(inputDevice.getIdentifier());if (layout null) {if(DEBUG) Slog.d(testkeyboard, ---goto--getDefaultKeyboardLayout);layout getDefaultKeyboardLayout(inputDevice);if (layout ! null) {setCurrentKeyboardLayoutForInputDevice(-1134,6 1135,20 public class InputManagerService extends IInputManager.Stubfinal Locale systemLocale mContext.getResources().getConfiguration().locale;// If our locale doesnt have a language for some reason, then we dont really have a// reasonable default.if(DEBUG) Slog.d(testkeyboard, ---getDefaultKeyboardLayout---getLanguagesystemLocale.getLanguage());String russuan com.android.inputdevices/com.android.inputdevices.InputDeviceReceiver/keyboard_layout_russian;String english_us com.android.inputdevices/com.android.inputdevices.InputDeviceReceiver/keyboard_layout_english_us;//根据语言设置当前键盘if(systemLocale.getLanguage().equals(en)){return english_us;}if(systemLocale.getLanguage().equals(ru)){return russuan;}//这里就是添加的两个键盘addKeyboardLayoutForInputDevice(d.getIdentifier(),russuan);addKeyboardLayoutForInputDevice(d.getIdentifier(),english_us); if (TextUtils.isEmpty(systemLocale.getLanguage())) {return null;}-1150,6 1165,7 public class InputManagerService extends IInputManager.Stubfor (int localeIndex 0; localeIndex numLocales; localeIndex) {if (isCompatibleLocale(systemLocale, locales.get(localeIndex))) {layouts.add(layout);if(DEBUG) Slog.d(testkeyboard, ---getDefaultKeyboardLayout---for--getLanguagesystemLocale.getLanguage());break;}}-1386,10 1402,12 public class InputManagerService extends IInputManager.StubOverride // Binder callpublic KeyboardLayout[] getKeyboardLayoutsForInputDevice(final InputDeviceIdentifier identifier) {if(DEBUG) Slog.d(testkeyboard, ---getKeyboardLayoutsForInputDevice---);final String[] enabledLayoutDescriptors getEnabledKeyboardLayoutsForInputDevice(identifier);final ArrayListKeyboardLayout enabledLayouts new ArrayList(enabledLayoutDescriptors.length);if(DEBUG) Slog.d(testkeyboard, ---ArrayList enabledLayouts---);final ArrayListKeyboardLayout potentialLayouts new ArrayList();visitAllKeyboardLayouts(new KeyboardLayoutVisitor() {boolean mHasSeenDeviceSpecificLayout;-1402,6 1420,7 public class InputManagerService extends IInputManager.Stubfor (String s : enabledLayoutDescriptors) {if (s ! null s.equals(layout.getDescriptor())) {enabledLayouts.add(layout);if(DEBUG) Slog.d(testkeyboard, ---ArrayList enabledLayouts.add---);return;}}-1436,8 1455,10 public class InputManagerService extends IInputManager.Stubpublic KeyboardLayout getKeyboardLayout(String keyboardLayoutDescriptor) {Objects.requireNonNull(keyboardLayoutDescriptor,keyboardLayoutDescriptor must not be null);if(DEBUG) Slog.d(testkeyboard, ---getKeyboardLayout---keyboardLayoutDescriptorkeyboardLayoutDescriptor);final KeyboardLayout[] result new KeyboardLayout[1];if(result!null) Slog.d(testkeyboard, ---getKeyboardLayout---result.lengthresult.length);visitKeyboardLayout(keyboardLayoutDescriptor,(resources, keyboardLayoutResId, layout) - result[0] layout);if (result[0] null) {-1632,12 1653,15 public class InputManagerService extends IInputManager.StubOverride // Binder callpublic String[] getEnabledKeyboardLayoutsForInputDevice(InputDeviceIdentifier identifier) {String key getLayoutDescriptor(identifier);if(DEBUG) Slog.d(testkeyboard, ---getEnabledKeyboardLayoutsForInputDevice---keykey);synchronized (mDataStore) {String[] layouts mDataStore.getKeyboardLayouts(key);if(DEBUG) Slog.d(testkeyboard, ---getEnabledKeyboardLayoutsForInputDevice---getDescriptoridentifier.getDescriptor());if ((layouts null || layouts.length 0) !key.equals(identifier.getDescriptor())) {layouts mDataStore.getKeyboardLayouts(identifier.getDescriptor());}if(DEBUG) Slog.d(testkeyboard, ---getEnabledKeyboardLayoutsForInputDevice---lengthlayouts.length);return layouts;}}-1645,6 1669,7 public class InputManagerService extends IInputManager.StubOverride // Binder callpublic void addKeyboardLayoutForInputDevice(InputDeviceIdentifier identifier,String keyboardLayoutDescriptor) {if(DEBUG) Slog.d(testkeyboard, ---addKeyboardLayoutForInputDevice---keyboardLayoutDescriptorkeyboardLayoutDescriptor);if (!checkCallingPermission(android.Manifest.permission.SET_KEYBOARD_LAYOUT,addKeyboardLayoutForInputDevice())) {throw new SecurityException(Requires SET_KEYBOARD_LAYOUT permission);-1653,6 1678,7 public class InputManagerService extends IInputManager.StubkeyboardLayoutDescriptor must not be null);String key getLayoutDescriptor(identifier);if(DEBUG) Slog.d(testkeyboard, ---addKeyboardLayoutForInputDevice---keykey);synchronized (mDataStore) {try {String oldLayout mDataStore.getCurrentKeyboardLayout(key);
http://www.tj-hxxt.cn/news/221287.html

相关文章:

  • 泰州免费网站建站模板百度怎么注册店面地址
  • 网站标题是什么密码管理系统admin
  • 网页设计网站网站建设课程设计旅游网站效果图
  • 软件外包网站建设通网站查询单位
  • 注册免费微网站做网站需要哪些程序员
  • 湛江市住房和城乡建设网站o2o家电维修网站开发
  • 建站快车凡科犀牛建设网站
  • 网站优化怎么学本机建的网站打开却很慢
  • 网站开发环境配置难网上卖东西怎么才能卖得好
  • 网站主机哪买平台公司转型发展思路
  • 郑州网站建设廴汉狮网络那个网站开发三味
  • 建设的基本流程网站网站更新
  • 域名等于网站网址吗网站更换关键词怎么做好
  • 猪八戒网站做软件刷粉网站推广
  • 莱州网站建设价格wordpress彩色标签云插件
  • 网站页面制作建议wordpress不开放注册
  • 兰州新区建站百度百科官网
  • 合肥网站建设方案服务广西智能网站建设报价
  • 网站建设服务器是什么意思网页游戏制作软件
  • 云主机 多个网站天元建设集团有限公司商票拒付
  • 建设集团网站公司如何做网站代码
  • 做网站非法吗沈阳哪家网站做的好
  • 网站开发要服务器吗网站备案是怎么回事
  • 东莞建网站的公免费的电脑优化软件
  • 网站建设开票税率福州建站模板搭建
  • 郑州网站建设哪一家好浙江网站建设推广公司哪家好
  • 大连建设科技网站wordpress 相对路径
  • 网站短期培训能学什么网站模板预览
  • 信息类网站 wordpress网站开发软件培训
  • 喀喇沁旗网站建设公司6成都网站建设