Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4d68b2b authored by Clara Thomas's avatar Clara Thomas Committed by Android (Google) Code Review
Browse files

Merge "Add supervision icon to credential view in BiometricPrompt." into main

parents 37331adc 573e7a82
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2025 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="960"
    android:viewportHeight="960"
    android:tint="?android:attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M480,80Q530,80 565,115Q600,150 600,200Q600,250 565,285Q530,320 480,320Q430,320 395,285Q360,250 360,200Q360,150 395,115Q430,80 480,80ZM480,360Q527,360 573,371Q619,382 656,402Q694,421 717,447Q740,473 740,504L740,736Q740,753 732,769.5Q724,786 710,800Q696,814 677.5,826Q659,838 636,848L636,758Q636,720 583.5,696Q531,672 480,672Q430,672 383.5,692.5Q337,713 326,746Q364,761 404,767Q444,773 486,774Q494,774 502.5,774Q511,774 520,774L520,878Q513,880 505.5,880Q498,880 490,880Q454,880 407.5,872Q361,864 319,847Q277,830 248.5,802.5Q220,775 220,736L220,504Q220,473 243,447Q266,421 303,402Q341,382 387,371Q433,360 480,360ZM480,600Q513,600 536.5,576.5Q560,553 560,520Q560,487 536.5,463.5Q513,440 480,440Q447,440 423.5,463.5Q400,487 400,520Q400,553 423.5,576.5Q447,600 480,600Z"/>
</vector>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -102,6 +102,11 @@ object Utils {
    fun isManagedProfile(context: Context, userId: Int): Boolean =
        context.getSystemService(UserManager::class.java)?.isManagedProfile(userId) ?: false

    @JvmStatic
    fun isSupervisingProfile(context: Context, userId: Int): Boolean =
        context.getSystemService(UserManager::class.java)?.getUserInfo(userId)?.userType ==
            UserManager.USER_TYPE_PROFILE_SUPERVISING

    @JvmStatic
    fun <T : SensorPropertiesInternal> findFirstSensorProperties(
        properties: List<T>?,
+5 −0
Original line number Diff line number Diff line
@@ -261,6 +261,11 @@ private fun Context.asLockIcon(userId: Int): Drawable {
    val id =
        if (Utils.isManagedProfile(this, userId)) {
            R.drawable.auth_dialog_enterprise
        } else if (
            android.multiuser.Flags.allowSupervisingProfile() &&
                Utils.isSupervisingProfile(this, userId)
        ) {
            R.drawable.ic_account_child_invert
        } else {
            R.drawable.auth_dialog_lock
        }