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

Commit 9071feb4 authored by Chaohui Wang's avatar Chaohui Wang Committed by Android (Google) Code Review
Browse files

Merge "Add debug flag for App Settings page"

parents 829b517f 11a5c2ad
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -17,12 +17,28 @@
package com.android.settings.applications;

import android.content.Intent;
import android.os.Bundle;
import android.util.FeatureFlagUtils;

import com.android.settings.SettingsActivity;
import com.android.settings.applications.appinfo.AppInfoDashboardFragment;
import com.android.settings.spa.SpaActivity;
import com.android.settings.spa.app.appsettings.AppSettingsProvider;

public class InstalledAppDetailsTop extends SettingsActivity {

    @Override
    protected void onCreate(Bundle savedState) {
        super.onCreate(savedState);
        if (!FeatureFlagUtils.isEnabled(this, FeatureFlagUtils.SETTINGS_ENABLE_SPA)) {
            return;
        }
        String packageName = super.getIntent().getData().getSchemeSpecificPart();
        SpaActivity.startSpaActivity(
                this, AppSettingsProvider.INSTANCE.getRoute(packageName, getUserId()));
        finish();
    }

    @Override
    public Intent getIntent() {
        Intent modIntent = new Intent(super.getIntent());
+7 −0
Original line number Diff line number Diff line
@@ -60,6 +60,13 @@ object AppSettingsProvider : SettingsPageProvider {

    @Composable
    fun navigator(app: ApplicationInfo) = navigator(route = "$name/${app.toRoute()}")

    /**
     * Gets the route to the App Settings page.
     *
     * Expose route to enable enter from non-SPA pages.
     */
    fun getRoute(packageName: String, userId: Int): String = "$name/$packageName/$userId"
}

@Composable