Add PIN recovery entry in supervision PIN management page.

Bug: b/390500290
Change-Id: I942fad663d0fb731215707d7c0b18359242aecb0
Test: atest SupervisionPinRecoveryPreferenceTest
Flag:android.app.supervision.flags.enable_supervision_pin_recovery_screen
This commit is contained in:
juquan
2025-01-27 00:50:08 +00:00
parent 883070758b
commit 26ea7df1d5
4 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/*
* 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.
*/
package com.android.settings.supervision
import android.content.Context
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class SupervisionPinRecoveryPreferenceTest {
private val context: Context = ApplicationProvider.getApplicationContext()
private val supervisionPinRecoveryPreference = SupervisionPinRecoveryPreference()
@Test
fun getTitle() {
assertThat(supervisionPinRecoveryPreference.getPreferenceTitle(context))
.isEqualTo("Forgot PIN")
}
}