Android 11.0 删除Settings-访客模式

packages/apps/Settings/AndroidManifest.xml
去掉设置下的访客模式

++ <!--            <intent-filter>-->
++ <!--                <action android:name="com.android.settings.action.SETTINGS" />-->
++ <!--            </intent-filter>-->

frameworks/base/packages/SystemUI/res/layout/qs_footer_impl.xml
去掉锁屏下的访客模式,方法就是找到与访客模式相关的属性 ,将它android:visibility=“gone”

<!--        wangrui Remove the guest mode of the lock screen interface-->
<ImageView
  android:id="@+id/multi_user_avatar"
  android:layout_width="@dimen/multi_user_avatar_expanded_size"
  android:layout_height="@dimen/multi_user_avatar_expanded_size"
  android:layout_gravity="center"
++  android:visibility="gone"
  android:scaleType="centerInside"/>

frameworks/base/packages/SystemUI/res/layout/keyguard_status_bar.xml

 <!--        wangrui Remove the guest mode of the lock screen interface -->
        <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
            android:layout_width="@dimen/multi_user_switch_width_keyguard"
            android:layout_height="match_parent"
            android:background="@drawable/ripple_drawable"
            android:layout_marginEnd="@dimen/multi_user_switch_keyguard_margin"
++            android:visibility="gone">
            <ImageView android:id="@+id/multi_user_avatar"
++                android:visibility="gone"
                android:layout_width="@dimen/multi_user_avatar_keyguard_size"
                android:layout_height="@dimen/multi_user_avatar_keyguard_size"
                android:layout_gravity="center"
                android:scaleType="centerInside"/>
        </com.android.systemui.statusbar.phone.MultiUserSwitch>

猜你喜欢

转载自blog.csdn.net/qq_27494201/article/details/125196711