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

Commit d769cebc authored by Jacky Wang's avatar Jacky Wang
Browse files

[Catalyst] Add PreferenceScreenMetadata.description

Bug: 407910711
Flag: EXEMPT new code
Test: N/A
Change-Id: I69b44a5f7d348b030f89d8b2906f698fff1aa889
parent 81172d0c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.annotation.AnyThread
import androidx.annotation.StringRes
import androidx.fragment.app.Fragment
import kotlinx.coroutines.flow.Flow

@@ -46,6 +47,14 @@ interface PreferenceScreenMetadata : PreferenceMetadata {
    val screenTitle: Int
        get() = title

    /**
     * String resource id to briefly describe the screen.
     *
     * Could be used for accessibility, search, etc.
     */
    val description: Int
        @StringRes get() = 0

    /** Returns dynamic screen title, use [screenTitle] whenever possible. */
    fun getScreenTitle(context: Context): CharSequence? = null