您的位置:首页 > 财经 > 产业 > 敬请期待造句_小程序设计要多少钱_廊坊网络推广优化公司_搜索引擎优化方法与技巧

敬请期待造句_小程序设计要多少钱_廊坊网络推广优化公司_搜索引擎优化方法与技巧

2025/3/17 8:31:25 来源:https://blog.csdn.net/weixin_49406449/article/details/142219433  浏览:    关键词:敬请期待造句_小程序设计要多少钱_廊坊网络推广优化公司_搜索引擎优化方法与技巧
敬请期待造句_小程序设计要多少钱_廊坊网络推广优化公司_搜索引擎优化方法与技巧
--- a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -230,7 +229,17 @@ import java.io.PrintWriter;import java.util.HashSet;import java.util.List;+import java.io.DataInputStream;
+import android.util.Log;
+import java.io.BufferedReader;//rocky
+import java.io.DataOutputStream;//rocky
+import java.io.InputStream;//rocky
+import java.io.InputStreamReader;//rocky
+//import java.lang.Process;
+
+/**
+ ** WindowManagerPolicy implementation for the Android phone UI.  This* introduces a new method suffix, Lp, for an internal lock of the* PhoneWindowManager.  This is used to protect some internal state, and
@@ -2053,6 +2062,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {filter.addAction("com.android.action.display_navigationbar");context.registerReceiver(mdisplay_navigationbarReceiver, filter);+        filter = new IntentFilter();
+           filter.addAction("android.intent.action.exsoft.zkzr.pcmcontrol");
+           context.registerReceiver(mPcmControlReceiver, filter);
+mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);mLongPressVibePattern = getLongIntArray(mContext.getResources(),com.android.internal.R.array.config_longPressVibePattern);
@@ -4582,9 +4596,54 @@ public class PhoneWindowManager implements WindowManagerPolicy {Intent mIntent = new Intent("action.SHOW_STATUSBAR");mContext.sendOrderedBroadcastAsUser(mIntent, UserHandle.CURRENT,null, null, null, 0, null, null);}};
+
+     BroadcastReceiver mPcmControlReceiver = new BroadcastReceiver(){
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            Log.v("cjy", "in pcm control");
+            String sz = intent.getStringExtra("args");
+            if (sz != null && !sz.isEmpty()){
+                String szrun = "";
+                szrun += "echo ";
+                szrun += sz;
+                szrun += " > /sys/devices/platform/ff110000.i2c/i2c-1/1-0010/es8323_sound/enable_send";
+                adbcommand(szrun);
+                Log.v("adbcommand", szrun);
+            }}};+    public String adbcommand(String command) {              
+        java.lang.Process process = null;
+        //Process process = null;
+        DataOutputStream os = null;
+        String excresult = "";
+        try {
+            process = Runtime.getRuntime().exec("su");
+            os = new DataOutputStream(process.getOutputStream());
+            os.writeBytes(command + "\n");
+            os.writeBytes("exit\n");
+            os.flush();
+            BufferedReader in = new BufferedReader(new InputStreamReader(
+                    process.getInputStream()));
+            StringBuffer stringBuffer = new StringBuffer();
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                stringBuffer.append(line + " ");
+            }
+            excresult = stringBuffer.toString();
+            in.close();
+            process.destroy();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+        }
+        return excresult;
+    }
+// Called on the PowerManager's Notifier thread.@Overridepublic void startedGoingToSleep(int why) {

        通过adb发布广播即可将micloop####写入到/sys/devices/platform/ff110000.i2c/i2c-1/1-0010/es8323_sound/enable_send。

adb shell am broadcast -a android.intent.action.exsoft.zkzr.pcmcontrol --es args "micloop####"

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com