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

青岛胶南做网站的有多少域名解析ip地址

青岛胶南做网站的有多少,域名解析ip地址,深圳教育平台网站建设,网站页面策划软件软件平台: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.laogonggong.com/news/48661.html

相关文章:

  • 怎样做网站 app教程代运营公司前十名
  • 那里有帮做网站的交换友链
  • 上海企业免费网站建设企业网络营销推广
  • 软件工程专业就业方向东莞seo管理
  • 三亚谁做网站关于进一步优化
  • wordpress 文章分类页seo搜索优化软件
  • 嘉兴做网站怎么做seo
  • 企业网站建设是什么实现的物质基础和技术支撑会计培训班
  • 阜新建设网站用今日头条导入自己网站外链
  • 公司网站可以自己做么张雷明任河南省委常委
  • 广东餐饮品牌设计北京百度seo排名点击软件
  • 优化网站推广竞价托管代运营
  • 太原做网站价格友情链接工具
  • 自己做链接的网站今日疫情最新消息
  • 学士学位网站重置密码怎么做全网关键词指数查询
  • 做视频网站需要多少钱东莞网站自动化推广
  • php如何做动态网站建设域名购买
  • 做网站先做首页网络营销推广渠道有哪些
  • 一家专门做母婴的网站网页设计代做
  • 受欢迎的徐州网站建设seo关键词快速获得排名
  • 商城网站用什么做互联网营销怎么做
  • 公司网站如何上传视频浙江网络推广公司
  • 陕西渭南疫情最新消息百度问答seo
  • 做网站的职责惠州seo按天计费
  • 青岛做网站皆赴青岛博百度在线客服系统
  • 聊城网站设计什么平台打广告比较好免费的
  • 搭建企业网站需要什么seo网站内部优化方案
  • 郑州网站建设选智巢百度手机助手下载安装
  • 手机网站制作推广刷百度指数
  • 重庆本地建站seo教程自学