Loading res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -6778,6 +6778,10 @@ <string name="cloned_app_creation_summary">Creating…</string> <!-- Summary text after an app is cloned [CHAR LIMIT=40] --> <string name="cloned_app_created_summary">Cloned</string> <!-- Summary text shown in toast when app is being cloned [CHAR LIMIT=40] --> <string name="cloned_app_creation_toast_summary">Creating <xliff:g id="package_label">%1$s</xliff:g> clone</string> <!-- Summary text shown in toast after app is successfully cloned [CHAR LIMIT=40] --> <string name="cloned_app_created_toast_summary">Created <xliff:g id="package_label">%1$s</xliff:g> clone</string> <!-- Summary text for system preference title, showing important setting items under system setting [CHAR LIMIT=NONE]--> <string name="system_dashboard_summary">Languages, gestures, time, backup</string> <!-- Summary text for language preference title, showing important setting items under language setting [CHAR LIMIT=NONE]--> src/com/android/settings/spa/app/appinfo/AppCreateButton.kt +7 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.settingslib.spa.widget.button.ActionButton import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import android.widget.Toast; class AppCreateButton(packageInfoPresenter: PackageInfoPresenter) { private val context = packageInfoPresenter.context Loading @@ -55,10 +56,16 @@ class AppCreateButton(packageInfoPresenter: PackageInfoPresenter) { val cloneBackend = CloneBackend.getInstance(context) FeatureFactory.getFactory(context).metricsFeatureProvider.action(context, SettingsEnums.ACTION_CREATE_CLONE_APP) val appLabel = app.loadLabel(context.packageManager) Toast.makeText(context, context.getString(R.string.cloned_app_creation_toast_summary, appLabel),Toast.LENGTH_SHORT).show() coroutineScope.launch { enabledState.value = false val result = installCloneApp(app, cloneBackend) if (result == CloneBackend.SUCCESS) { Toast.makeText(context, context.getString(R.string.cloned_app_created_toast_summary, appLabel), Toast.LENGTH_SHORT).show() navController.navigate(getRoute(app.packageName, cloneBackend.cloneUserId), /* popUpCurrent*/ true) } else { Loading Loading
res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -6778,6 +6778,10 @@ <string name="cloned_app_creation_summary">Creating…</string> <!-- Summary text after an app is cloned [CHAR LIMIT=40] --> <string name="cloned_app_created_summary">Cloned</string> <!-- Summary text shown in toast when app is being cloned [CHAR LIMIT=40] --> <string name="cloned_app_creation_toast_summary">Creating <xliff:g id="package_label">%1$s</xliff:g> clone</string> <!-- Summary text shown in toast after app is successfully cloned [CHAR LIMIT=40] --> <string name="cloned_app_created_toast_summary">Created <xliff:g id="package_label">%1$s</xliff:g> clone</string> <!-- Summary text for system preference title, showing important setting items under system setting [CHAR LIMIT=NONE]--> <string name="system_dashboard_summary">Languages, gestures, time, backup</string> <!-- Summary text for language preference title, showing important setting items under language setting [CHAR LIMIT=NONE]-->
src/com/android/settings/spa/app/appinfo/AppCreateButton.kt +7 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.settingslib.spa.widget.button.ActionButton import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import android.widget.Toast; class AppCreateButton(packageInfoPresenter: PackageInfoPresenter) { private val context = packageInfoPresenter.context Loading @@ -55,10 +56,16 @@ class AppCreateButton(packageInfoPresenter: PackageInfoPresenter) { val cloneBackend = CloneBackend.getInstance(context) FeatureFactory.getFactory(context).metricsFeatureProvider.action(context, SettingsEnums.ACTION_CREATE_CLONE_APP) val appLabel = app.loadLabel(context.packageManager) Toast.makeText(context, context.getString(R.string.cloned_app_creation_toast_summary, appLabel),Toast.LENGTH_SHORT).show() coroutineScope.launch { enabledState.value = false val result = installCloneApp(app, cloneBackend) if (result == CloneBackend.SUCCESS) { Toast.makeText(context, context.getString(R.string.cloned_app_created_toast_summary, appLabel), Toast.LENGTH_SHORT).show() navController.navigate(getRoute(app.packageName, cloneBackend.cloneUserId), /* popUpCurrent*/ true) } else { Loading