Add debug flag for App Settings page
Default no-op, if SETTINGS_ENABLE_SPA is enabled, InstalledAppDetailsTop will navigate to SPA AppSettings instead of AppInfoDashboardFragment. Bug: 236346018 Test: Manual with Settings App Change-Id: I0b8a668df1f8783b860baae1d912157f742baf3f
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user