V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zinwalin
V2EX  ›  Android

请教一个安卓 10 设置界面的定制问题

  •  
  •   zinwalin · 2023-03-07 13:21:35 +08:00 · 3548 次点击
    这是一个创建于 410 天前的主题,其中的信息可能已经有所发展或是发生改变。

    设置里的关于页面里,标题栏右侧有个搜索按钮,想把它隐藏掉,但是没找到入口,其它页面没有这个按钮,是不是通过 PreferenceScreen 的选项来配置?

    <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res-auto" android:key="my_device_info_pref_screen" android:title="@string/about_settings">

    <!-- Device name -->
    <com.android.settings.widget.ValidatedEditTextPreference
        android:key="device_name"
        android:order="1"
        android:title="@string/my_device_info_device_name_preference_title"
        android:summary="@string/summary_placeholder"
        settings:controller="com.android.settings.deviceinfo.DeviceNamePreferenceController"
        settings:enableCopying="true"/>
      settings:controller="com.android.settings.deviceinfo.BuildNumberPreferenceController"/>
    
    </PreferenceScreen>
    4 条回复    2023-03-10 00:13:15 +08:00
    h4de5
        1
    h4de5  
       2023-03-07 13:48:02 +08:00   ❤️ 2
    那个搜索栏是一个单独的 app 包名:com.android.settings.intelligence
    禁用
    adb pm disable-user com.android.settings.intelligence
    启用
    adb pm enable com.android.settings.intelligence

    可以用这 2 条命令测试
    zinwalin
        2
    zinwalin  
    OP
       2023-03-07 14:03:42 +08:00
    @h4de5 太感谢了, 这个配置如何默认关闭? 编译完镜像就发布给客户了,最好能修改默认值。
    h4de5
        3
    h4de5  
       2023-03-07 16:41:27 +08:00
    如果你要在默认编译系统里面就去掉这个。你可以去源码里面找这个 apk 是那个 mk 里面编译出来的。在 mk 文件里面去掉这个 apk 就可以了。
    系统安装好以后路径在这里:
    /product/priv-app/SettingsIntelligence/SettingsIntelligence.apk
    zinwalin
        4
    zinwalin  
    OP
       2023-03-10 00:13:15 +08:00
    @h4de5 感谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2887 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 07:27 · PVG 15:27 · LAX 00:27 · JFK 03:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.