Redirect to AppInfoSettings when SPA is on

From recently opened apps or when click app icon from some app info
pages.

Bug: 236346018
Test: Manually with Settings
Change-Id: Ia4e1789196875eb0d10fdb6363f0d65cb88cb563
This commit is contained in:
Chaohui Wang
2023-01-06 14:46:27 +08:00
parent 7d7bcaf46f
commit 87e3064b33
3 changed files with 43 additions and 17 deletions

View File

@@ -16,6 +16,8 @@
package com.android.settings.applications;
import static com.android.settings.spa.app.appinfo.AppInfoSettingsProvider.startAppInfoSettings;
import android.app.Application;
import android.app.usage.UsageStats;
import android.content.Context;
@@ -33,7 +35,6 @@ import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.applications.appinfo.AppInfoDashboardFragment;
import com.android.settings.core.BasePreferenceController;
import com.android.settingslib.Utils;
import com.android.settingslib.applications.ApplicationsState;
@@ -208,9 +209,7 @@ public class AppsPreferenceController extends BasePreferenceController implement
RelativeDateTimeFormatter.Style.SHORT));
pref.setOrder(showAppsCount++);
pref.setOnPreferenceClickListener(preference -> {
AppInfoBase.startAppInfoFragment(AppInfoDashboardFragment.class,
mContext.getString(R.string.application_info_label),
pkgName, appEntry.info.uid,
startAppInfoSettings(pkgName, appEntry.info.uid,
mHost, 1001 /*RequestCode*/, getMetricsCategory());
return true;
});