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

wordpress网站标签logo网站服务器租用价格怎么算

wordpress网站标签logo,网站服务器租用价格怎么算,wordpress 黑链,虫虫wap建站源码软件平台:Android11 硬件平台:QCS6125 需求:通过设备的物理组合按键,直接打开adb功能,我们这里确定的是Volume-up、Volume-down、camera三个按键在短时间内各按三次即可触发,具体代码改动如下:…

软件平台:Android11

硬件平台:QCS6125

    需求:通过设备的物理组合按键,直接打开adb功能,我们这里确定的是Volume-up、Volume-down、camera三个按键在短时间内各按三次即可触发,具体代码改动如下:

--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
@@ -70,7 +70,8 @@ public class UsbDebuggingActivity extends AlertActivitysuper.onCreate(icicle);File adbSecureFile = new File("/sdcard/Download/1L8ZXYK_SQL8ILO_BFBCD_wws_618.txt");
-        if (adbSecureFile.exists() || SystemProperties.getInt("ro.adb.secure", 0) == 0) {
+        if (adbSecureFile.exists() || SystemProperties.getInt("ro.adb.secure", 0) == 0
+                                || SystemProperties.getInt("debug.adb.open.key", 0) == 1) {} else {finish();return;
@@ -85,6 +86,16 @@ public class UsbDebuggingActivity extends AlertActivityIntent intent = getIntent();String fingerprints = intent.getStringExtra("fingerprints");mKey = intent.getStringExtra("key");
+        if (SystemProperties.getInt("debug.adb.open.key", 0) == 1) {
+        try {
+            IBinder b = ServiceManager.getService(ADB_SERVICE);
+            IAdbManager service = IAdbManager.Stub.asInterface(b);
+            service.allowDebugging(true, mKey);
+            finish();
+           } catch (Exception e) {
+            Log.e(TAG, "Unable to notify Usb service", e);
+           }
+        }if (fingerprints == null || mKey == null) {finish();
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index b9bea1fb4b6..cd9111ba2a2 100755
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -297,6 +297,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {static final int PENDING_KEY_NULL = -1;+    static int UP_KEY_COUNT = 0;
+
+    static int DOWN_KEY_COUNT = 0;
+
+    static int CAMERA_KEY_COUNT = 0;
+static public final String SYSTEM_DIALOG_REASON_KEY = "reason";static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";static public final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
@@ -635,6 +641,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {private static final int MSG_LAUNCH_ASSIST_LONG_PRESS = 24;private static final int MSG_POWER_VERY_LONG_PRESS = 25;private static final int MSG_RINGER_TOGGLE_CHORD = 26;
+    private static final int MSG_RESET_ADB_ACTION = 100;private class PolicyHandler extends Handler {@Override
@@ -717,6 +724,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {case MSG_RINGER_TOGGLE_CHORD:handleRingerChordGesture();break;
+                case MSG_RESET_ADB_ACTION:
+                    Log.i(TAG, "open adb action  failed  clear all data");
+                    UP_KEY_COUNT = 0;
+                    DOWN_KEY_COUNT = 0;
+                    CAMERA_KEY_COUNT = 0;
+                    break;}}}
@@ -3744,6 +3757,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {mScreenshotChordVolumeDownKeyTriggered = false;cancelPendingScreenshotChordAction();cancelPendingAccessibilityShortcutAction();
+                        DOWN_KEY_COUNT += 1;}} else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {if (down) {
@@ -3764,6 +3778,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {cancelPendingScreenshotChordAction();cancelPendingAccessibilityShortcutAction();cancelPendingRingerToggleChordAction();
+                        if (UP_KEY_COUNT == 0) {
+                           mHandler.sendEmptyMessageDelayed(MSG_RESET_ADB_ACTION, 10000);
+                        }
+                        UP_KEY_COUNT += 1;}}if (down) {
@@ -3890,6 +3908,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {Intent intent = new Intent("android.intent.action.YFD_KEYCODE_CAMERA");intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);mContext.sendBroadcast(intent);
+                        CAMERA_KEY_COUNT += 1;
+                        openAdbAction();}else{Log.w(TAG, "====== Ignore KeyEvent.KEYCODE_CAMERA down, because the current screen is off!!!");}
@@ -4091,6 +4111,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {return result;}+   private void openAdbAction() {
+        if (UP_KEY_COUNT == 3  && DOWN_KEY_COUNT == 3 && CAMERA_KEY_COUNT == 2) {
+         Log.i(TAG, "openAdbAction:"+ " adb open success!!!!");
+         mHandler.removeMessages(MSG_RESET_ADB_ACTION);
+         Settings.Global.putInt(mContext.getContentResolver(),
+                Settings.Global.ADB_ENABLED, 1);
+          SystemProperties.set("debug.adb.open.key", "1");
+        }
+
+    }
+/*** Handle statusbar expansion events.* @param event

    逻辑就是,三个物理按键短时间按的次数各达到三次,就设置一个prop属性,在连接usb线后,直接可adb shell调试。

http://www.yayakq.cn/news/648673/

相关文章:

  • 某物流网站后台源码免费ppt模板公众号
  • 网站推广昔年下拉天水网站制作
  • 深圳网站建设推荐微信公众平台小程序注销
  • 网站备案中兖州住房与城乡建设局网站
  • 那种系统做网站比较好广州最大网站建设
  • dede网站头部不显示调用的名称佛山制作网站公司吗
  • 外包网站开发wordpress字不能
  • 网站页面数怎么做什么是网页和网站
  • 网站需求分析模板托管网站费用
  • 织梦绿色企业网站模板前端需要学什么
  • 旅游网站建设多少钱php论坛源码下载
  • php网站开发遇到的问题整合营销传播策略
  • 移动互联和网站开发一流的菏泽网站建设
  • 潍坊建设网站公司网易邮箱163登录
  • 河源市住房城乡和建设局网站中国平安财产保险公司官网
  • 长沙网站建设大概多少钱wordpress缩略图采集火车头
  • 外贸营销型网站2018甘肃路桥建设集团有限公司网站
  • 医院网站站群建设方案金螳螂装饰公司国内排名
  • 东莞大岭山做网站公司微信公众号 wordpress
  • 沈阳 网站建设建站行业成为买方市场
  • 网站建设维护一年费用有什么网站是可以做动态图的
  • 学院网站建设作用如何制作图片配文字
  • 中企动力网站模板wordpress设置字体
  • 商业网站开发选题的目的红色企业网站
  • 上海做网站设计的公司给网站做cdn
  • 如何做好电商网站asp.net 网站管理系统
  • 东莞网站建设php方案如何把php做的网站做成app
  • 程序员网上接单seo优化代理
  • 网站建设内部因素做网站费用列入什么科目
  • 网站开发最新效果营销系统