Android Wifionly项目,客户要求去掉谷歌联系人里的 手机联系人按钮

需求分析

无应用源码,只能通过系统侧去修改

首先通过 Android Studio 工具 uiautomatorviewer 获取父控件资源ID chip_group ,然后通过遍历获取子控件去掉目标按钮

--- a/frameworks/base/core/java/android/view/View.java
+++ b/frameworks/base/core/java/android/view/View.java
@@ -199,6 +199,8 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
+import android.widget.Button;
+import android.content.res.Resources;
     /**
@@ -21352,7 +21355,29 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
             mRunQueue = null;
         }
         performCollectViewAttributes(mAttachInfo, visibility);
+               
+           
06-12 21:56