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

Commit 12c50ad6 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Update doc for BrowseActivity

Bug: 244122804
Test: NA
Change-Id: I433ce48cbb9d1393d8d420086a0ce1808a9405b2
parent 76091655
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -42,13 +42,19 @@ private const val NULL_PAGE_NAME = "NULL"

/**
 * The Activity to render ALL SPA pages, and handles jumps between SPA pages.
 *
 * One can open any SPA page by:
 *   $ adb shell am start -n <BrowseActivityComponent> -e spa:SpaActivity:destination <SpaPageRoute>
 * For gallery, BrowseActivityComponent = com.android.settingslib.spa.gallery/.MainActivity
 * For SettingsGoogle, BrowseActivityComponent = com.android.settings/.spa.SpaActivity
 * ```
 * $ adb shell am start -n <BrowseActivityComponent> -e spaActivityDestination <SpaPageRoute>
 * ```
 * - For Gallery, BrowseActivityComponent = com.android.settingslib.spa.gallery/.GalleryMainActivity
 * - For Settings, BrowseActivityComponent = com.android.settings/.spa.SpaActivity
 *
 * Some examples:
 *   $ adb shell am start -n <BrowseActivityComponent> -e spa:SpaActivity:destination HOME
 *   $ adb shell am start -n <BrowseActivityComponent> -e spa:SpaActivity:destination ARGUMENT/bar/5
 * ```
 * $ adb shell am start -n <BrowseActivityComponent> -e spaActivityDestination HOME
 * $ adb shell am start -n <BrowseActivityComponent> -e spaActivityDestination ARGUMENT/bar/5
 * ```
 */
open class BrowseActivity : ComponentActivity() {
    private val spaEnvironment get() = SpaEnvironmentFactory.instance