Merge "Unsupport DebugActivity & EntryProvider in Settings."
diff --git a/src/com/android/settings/applications/InstalledAppDetailsTop.java b/src/com/android/settings/applications/InstalledAppDetailsTop.java
index 039ed94..63e0451 100644
--- a/src/com/android/settings/applications/InstalledAppDetailsTop.java
+++ b/src/com/android/settings/applications/InstalledAppDetailsTop.java
@@ -23,7 +23,7 @@
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;
+import com.android.settings.spa.app.appinfo.AppInfoSettingsProvider;
public class InstalledAppDetailsTop extends SettingsActivity {
@@ -35,7 +35,7 @@
}
String packageName = super.getIntent().getData().getSchemeSpecificPart();
SpaActivity.startSpaActivity(
- this, AppSettingsProvider.INSTANCE.getRoute(packageName, getUserId()));
+ this, AppInfoSettingsProvider.INSTANCE.getRoute(packageName, getUserId()));
finish();
}
diff --git a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java
index d11a876..d11fe8a 100644
--- a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java
@@ -3,7 +3,6 @@
import android.content.Context;
import android.provider.Settings;
import android.provider.Settings.Global;
-import android.text.TextUtils;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
@@ -42,8 +41,7 @@
super.refreshSummary(preference);
final int stickyShutoffLevel = Settings.Global.getInt(
mContext.getContentResolver(), Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL, 90);
- preference.setSummary(TextUtils.expandTemplate(
- mContext.getString(R.string.battery_saver_sticky_description_new),
+ preference.setSummary(mContext.getString(R.string.battery_saver_sticky_description_new,
Utils.formatPercentage(stickyShutoffLevel)));
}
diff --git a/src/com/android/settings/spa/SettingsSpaEnvironment.kt b/src/com/android/settings/spa/SettingsSpaEnvironment.kt
index 83fdae5..82cc705 100644
--- a/src/com/android/settings/spa/SettingsSpaEnvironment.kt
+++ b/src/com/android/settings/spa/SettingsSpaEnvironment.kt
@@ -18,7 +18,7 @@
import com.android.settings.spa.app.AllAppListPageProvider
import com.android.settings.spa.app.AppsMainPageProvider
-import com.android.settings.spa.app.appsettings.AppSettingsProvider
+import com.android.settings.spa.app.appinfo.AppInfoSettingsProvider
import com.android.settings.spa.app.specialaccess.AlarmsAndRemindersAppListProvider
import com.android.settings.spa.app.specialaccess.AllFilesAccessAppListProvider
import com.android.settings.spa.app.specialaccess.DisplayOverOtherAppsAppListProvider
@@ -54,7 +54,7 @@
HomePageProvider,
AppsMainPageProvider,
AllAppListPageProvider,
- AppSettingsProvider,
+ AppInfoSettingsProvider,
SpecialAppAccessPageProvider,
NotificationMainPageProvider,
AppListNotificationsPageProvider,
diff --git a/src/com/android/settings/spa/app/AllAppList.kt b/src/com/android/settings/spa/app/AllAppList.kt
index cac9e5a..3331a69 100644
--- a/src/com/android/settings/spa/app/AllAppList.kt
+++ b/src/com/android/settings/spa/app/AllAppList.kt
@@ -22,7 +22,7 @@
import androidx.compose.runtime.remember
import androidx.compose.ui.res.stringResource
import com.android.settings.R
-import com.android.settings.spa.app.appsettings.AppSettingsProvider
+import com.android.settings.spa.app.appinfo.AppInfoSettingsProvider
import com.android.settingslib.spa.framework.common.SettingsEntryBuilder
import com.android.settingslib.spa.framework.common.SettingsPage
import com.android.settingslib.spa.framework.common.SettingsPageProvider
@@ -65,7 +65,7 @@
) { itemModel ->
AppListItem(
itemModel = itemModel,
- onClick = AppSettingsProvider.navigator(app = itemModel.record.app),
+ onClick = AppInfoSettingsProvider.navigator(app = itemModel.record.app),
)
}
}
diff --git a/src/com/android/settings/spa/app/appsettings/AppButtonRepository.kt b/src/com/android/settings/spa/app/appinfo/AppButtonRepository.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/AppButtonRepository.kt
rename to src/com/android/settings/spa/app/appinfo/AppButtonRepository.kt
index 3780198..3890e32 100644
--- a/src/com/android/settings/spa/app/appsettings/AppButtonRepository.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppButtonRepository.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.app.ActivityManager
import android.content.ComponentName
diff --git a/src/com/android/settings/spa/app/appsettings/AppButtons.kt b/src/com/android/settings/spa/app/appinfo/AppButtons.kt
similarity index 97%
rename from src/com/android/settings/spa/app/appsettings/AppButtons.kt
rename to src/com/android/settings/spa/app/appinfo/AppButtons.kt
index 30fcdb7..5bdaf68 100644
--- a/src/com/android/settings/spa/app/appsettings/AppButtons.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppButtons.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.pm.PackageInfo
import androidx.compose.runtime.Composable
diff --git a/src/com/android/settings/spa/app/appsettings/AppClearButton.kt b/src/com/android/settings/spa/app/appinfo/AppClearButton.kt
similarity index 97%
rename from src/com/android/settings/spa/app/appsettings/AppClearButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppClearButton.kt
index e16e091..c441071 100644
--- a/src/com/android/settings/spa/app/appsettings/AppClearButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppClearButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.pm.PackageInfo
import androidx.compose.material.icons.Icons
diff --git a/src/com/android/settings/spa/app/appsettings/AppDisableButton.kt b/src/com/android/settings/spa/app/appinfo/AppDisableButton.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/AppDisableButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppDisableButton.kt
index 0d48728..79fb386 100644
--- a/src/com/android/settings/spa/app/appsettings/AppDisableButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppDisableButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.pm.ApplicationInfo
import android.content.pm.PackageInfo
diff --git a/src/com/android/settings/spa/app/appsettings/AppForceStopButton.kt b/src/com/android/settings/spa/app/appinfo/AppForceStopButton.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/AppForceStopButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppForceStopButton.kt
index c34eff0..52ce3df 100644
--- a/src/com/android/settings/spa/app/appsettings/AppForceStopButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppForceStopButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.app.settings.SettingsEnums
import android.content.pm.ApplicationInfo
diff --git a/src/com/android/settings/spa/app/appsettings/AppSettings.kt b/src/com/android/settings/spa/app/appinfo/AppInfoSettings.kt
similarity index 90%
rename from src/com/android/settings/spa/app/appsettings/AppSettings.kt
rename to src/com/android/settings/spa/app/appinfo/AppInfoSettings.kt
index c8c5854..6acfac4 100644
--- a/src/com/android/settings/spa/app/appsettings/AppSettings.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppInfoSettings.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.pm.ApplicationInfo
import android.os.Bundle
@@ -42,8 +42,8 @@
private const val PACKAGE_NAME = "packageName"
private const val USER_ID = "userId"
-object AppSettingsProvider : SettingsPageProvider {
- override val name = "AppSettings"
+object AppInfoSettingsProvider : SettingsPageProvider {
+ override val name = "AppInfoSettings"
override val parameter = listOf(
navArgument(PACKAGE_NAME) { type = NavType.StringType },
@@ -59,7 +59,7 @@
val packageInfoPresenter = remember {
PackageInfoPresenter(context, packageName, userId, coroutineScope)
}
- AppSettings(packageInfoPresenter)
+ AppInfoSettings(packageInfoPresenter)
packageInfoPresenter.PackageRemoveDetector()
}
@@ -67,7 +67,7 @@
fun navigator(app: ApplicationInfo) = navigator(route = "$name/${app.toRoute()}")
/**
- * Gets the route to the App Settings page.
+ * Gets the route to the App Info Settings page.
*
* Expose route to enable enter from non-SPA pages.
*/
@@ -75,13 +75,13 @@
}
@Composable
-private fun AppSettings(packageInfoPresenter: PackageInfoPresenter) {
+private fun AppInfoSettings(packageInfoPresenter: PackageInfoPresenter) {
val packageInfo = packageInfoPresenter.flow.collectAsState().value ?: return
val app = packageInfo.applicationInfo
RegularScaffold(
title = stringResource(R.string.application_info_label),
actions = {
- AppSettingsMoreOptions(packageInfoPresenter, app)
+ AppInfoSettingsMoreOptions(packageInfoPresenter, app)
}
) {
val appInfoProvider = remember { AppInfoProvider(packageInfo) }
diff --git a/src/com/android/settings/spa/app/appsettings/AppSettingsMoreOptions.kt b/src/com/android/settings/spa/app/appinfo/AppInfoSettingsMoreOptions.kt
similarity index 95%
rename from src/com/android/settings/spa/app/appsettings/AppSettingsMoreOptions.kt
rename to src/com/android/settings/spa/app/appinfo/AppInfoSettingsMoreOptions.kt
index 20415c3..eb3ca48 100644
--- a/src/com/android/settings/spa/app/appsettings/AppSettingsMoreOptions.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppInfoSettingsMoreOptions.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.Context
import android.content.pm.ApplicationInfo
@@ -34,7 +34,7 @@
import com.android.settingslib.spaprivileged.model.app.userId
@Composable
-fun AppSettingsMoreOptions(packageInfoPresenter: PackageInfoPresenter, app: ApplicationInfo) {
+fun AppInfoSettingsMoreOptions(packageInfoPresenter: PackageInfoPresenter, app: ApplicationInfo) {
val context = LocalContext.current
// We don't allow uninstalling update for DO/PO if it's a system app, because it will clear data
// on all users. We also don't allow uninstalling for all users if it's DO/PO for any user.
diff --git a/src/com/android/settings/spa/app/appsettings/AppInstallButton.kt b/src/com/android/settings/spa/app/appinfo/AppInstallButton.kt
similarity index 97%
rename from src/com/android/settings/spa/app/appsettings/AppInstallButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppInstallButton.kt
index 94290e6..a3ddfab 100644
--- a/src/com/android/settings/spa/app/appsettings/AppInstallButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppInstallButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.Intent
import android.content.pm.ApplicationInfo
diff --git a/src/com/android/settings/spa/app/appsettings/AppLaunchButton.kt b/src/com/android/settings/spa/app/appinfo/AppLaunchButton.kt
similarity index 96%
rename from src/com/android/settings/spa/app/appsettings/AppLaunchButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppLaunchButton.kt
index 9f81661..8f398c7 100644
--- a/src/com/android/settings/spa/app/appsettings/AppLaunchButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppLaunchButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.Intent
import android.content.pm.ApplicationInfo
diff --git a/src/com/android/settings/spa/app/appsettings/AppPermissionPreference.kt b/src/com/android/settings/spa/app/appinfo/AppPermissionPreference.kt
similarity index 97%
rename from src/com/android/settings/spa/app/appsettings/AppPermissionPreference.kt
rename to src/com/android/settings/spa/app/appinfo/AppPermissionPreference.kt
index ec37f11..c7d775e 100644
--- a/src/com/android/settings/spa/app/appsettings/AppPermissionPreference.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppPermissionPreference.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.ActivityNotFoundException
import android.content.Context
diff --git a/src/com/android/settings/spa/app/appsettings/AppPermissionSummary.kt b/src/com/android/settings/spa/app/appinfo/AppPermissionSummary.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/AppPermissionSummary.kt
rename to src/com/android/settings/spa/app/appinfo/AppPermissionSummary.kt
index 31e0e0e..9c5f673 100644
--- a/src/com/android/settings/spa/app/appsettings/AppPermissionSummary.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppPermissionSummary.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.Context
import android.content.pm.ApplicationInfo
diff --git a/src/com/android/settings/spa/app/appsettings/AppUninstallButton.kt b/src/com/android/settings/spa/app/appinfo/AppUninstallButton.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/AppUninstallButton.kt
rename to src/com/android/settings/spa/app/appinfo/AppUninstallButton.kt
index e85adc8..4b95f7b 100644
--- a/src/com/android/settings/spa/app/appsettings/AppUninstallButton.kt
+++ b/src/com/android/settings/spa/app/appinfo/AppUninstallButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.content.om.OverlayManager
import android.content.pm.ApplicationInfo
diff --git a/src/com/android/settings/spa/app/appsettings/PackageInfoPresenter.kt b/src/com/android/settings/spa/app/appinfo/PackageInfoPresenter.kt
similarity index 98%
rename from src/com/android/settings/spa/app/appsettings/PackageInfoPresenter.kt
rename to src/com/android/settings/spa/app/appinfo/PackageInfoPresenter.kt
index 299c0a7..2f5dda1 100644
--- a/src/com/android/settings/spa/app/appsettings/PackageInfoPresenter.kt
+++ b/src/com/android/settings/spa/app/appinfo/PackageInfoPresenter.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+package com.android.settings.spa.app.appinfo
import android.app.ActivityManager
import android.app.settings.SettingsEnums
diff --git a/tests/robotests/src/com/android/settings/spa/app/appsettings/AppPermissionSummaryTest.kt b/tests/robotests/src/com/android/settings/spa/app/appinfo/AppPermissionSummaryTest.kt
similarity index 98%
rename from tests/robotests/src/com/android/settings/spa/app/appsettings/AppPermissionSummaryTest.kt
rename to tests/robotests/src/com/android/settings/spa/app/appinfo/AppPermissionSummaryTest.kt
index 35cdc03..ce1c1b7 100644
--- a/tests/robotests/src/com/android/settings/spa/app/appsettings/AppPermissionSummaryTest.kt
+++ b/tests/robotests/src/com/android/settings/spa/app/appinfo/AppPermissionSummaryTest.kt
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.settings.spa.app.appsettings
+
+package com.android.settings.spa.app.appinfo
import android.content.Context
import android.content.pm.ApplicationInfo