diff options
author | Philip P. Moltmann <moltmann@google.com> | 2016-04-08 09:16:30 -0700 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2016-04-08 09:16:34 -0700 |
commit | 789b2e8e93a5629a399460fbc14890bd527feccd (patch) | |
tree | f28eed9604ddfdb333a208c81e5986673dad3305 | |
parent | e88eaf651b4d5c1424e01b67cd5d13daabadb3e0 (diff) | |
download | android_packages_apps_PackageInstaller-789b2e8e93a5629a399460fbc14890bd527feccd.tar.gz android_packages_apps_PackageInstaller-789b2e8e93a5629a399460fbc14890bd527feccd.tar.bz2 android_packages_apps_PackageInstaller-789b2e8e93a5629a399460fbc14890bd527feccd.zip |
Remove dialog titles from simple package installer dialogs.
- Checked the wording of the content of the dialogs and I think the
title does not add any information. Design guidelines discourage
dialog titles.
- Removed unused dialog type
- Removed now unused strings
- Spell corrected a string
Bug: 5526317
Change-Id: I7d125d92ef3a2fb3fd6fd402af8d2422c0d8b869
-rw-r--r-- | res/values/strings.xml | 9 | ||||
-rw-r--r-- | src/com/android/packageinstaller/PackageInstallerActivity.java | 29 |
2 files changed, 1 insertions, 37 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index dd755f5f..448436bb 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -76,7 +76,6 @@ <!-- Message presented when an application could not be installed on the phone for some reason. [CHAR LIMIT=100] --> <string name="install_failed_msg" product="default"><xliff:g id="app_name">%1$s</xliff:g> couldn\'t be installed on your phone.</string> <string name="launch">Open</string> - <string name="unknown_apps_dlg_title">Install blocked</string> <!-- Message presented in a dialog box when a package is requested to be installed, but the "Allow unknown applications" checkbox is not enabled. [CHAR LIMIT=100] --> <string name="unknown_apps_dlg_text" product="tablet">For security, your tablet is set to block installation of apps obtained from unknown sources.</string> <!-- Message presented in a dialog box when a package is requested to be installed, but the "Allow unknown applications" checkbox is not enabled. [CHAR LIMIT=100] --> @@ -88,11 +87,6 @@ <string name="ok">OK</string> <string name="settings">Settings</string> - <!-- Title of dialog asking user if they would allow an application to be an install source. --> - <string name="allow_source_dlg_title">New source for apps</string> - <!-- Message of dialog asking user if they would allow an application to be an install source. --> - <string name="allow_source_dlg_text"><xliff:g id="app_name">%1$s</xliff:g> wants to install other apps.\n\nAllow - this now and in the future?</string> <string name="manage_applications">Manage apps</string> <string name="dlg_app_replacement_title">Replace app?</string> <string name="dlg_app_replacement_statement">The app you\'re installing will replace another app.\n\nAll your previous user data will be saved.</string> @@ -143,7 +137,6 @@ <string name="uninstall_failed_msg"><xliff:g id="app_name">%1$s</xliff:g> couldn\'t be uninstalled.</string> <!-- Dialog attributes to indicate parse errors --> - <string name="Parse_error_dlg_title">Parse error</string> <string name="Parse_error_dlg_text">There was a problem parsing the package.</string> <!-- Tab label for new permissions being added to an existing app [CHAR LIMIT=20] --> @@ -270,7 +263,7 @@ <!-- Title of dialog telling users that Install/Uninstall action is not supported on Android Wear. --> <string name="wear_not_allowed_dlg_title">Android Wear</string> <!-- Title of dialog telling users that Install/Uninstall action is not supported on Android Wear. --> - <string name="wear_not_allowed_dlg_text">Instal/Uninstall actions not supported on Wear.</string> + <string name="wear_not_allowed_dlg_text">Install/Uninstall actions not supported on Wear.</string> <!-- Review of runtime permissions for legacy apps --> diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java index 9681d2cd..f743b042 100644 --- a/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -117,7 +117,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen private static final int DLG_PACKAGE_ERROR = DLG_BASE + 2; private static final int DLG_OUT_OF_SPACE = DLG_BASE + 3; private static final int DLG_INSTALL_ERROR = DLG_BASE + 4; - private static final int DLG_ALLOW_SOURCE = DLG_BASE + 5; private static final int DLG_ADMIN_RESTRICTS_UNKNOWN_SOURCES = DLG_BASE + 6; private static final int DLG_NOT_SUPPORTED_ON_WEAR = DLG_BASE + 7; @@ -228,7 +227,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen switch (id) { case DLG_UNKNOWN_SOURCES: return new AlertDialog.Builder(this) - .setTitle(R.string.unknown_apps_dlg_title) .setMessage(R.string.unknown_apps_dlg_text) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -245,7 +243,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen .create(); case DLG_ADMIN_RESTRICTS_UNKNOWN_SOURCES: return new AlertDialog.Builder(this) - .setTitle(R.string.unknown_apps_dlg_title) .setMessage(R.string.unknown_apps_admin_dlg_text) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -256,7 +253,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen .create(); case DLG_PACKAGE_ERROR : return new AlertDialog.Builder(this) - .setTitle(R.string.Parse_error_dlg_title) .setMessage(R.string.Parse_error_dlg_text) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -271,7 +267,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen String dlgText = getString(R.string.out_of_space_dlg_text, appTitle.toString()); return new AlertDialog.Builder(this) - .setTitle(R.string.out_of_space_dlg_title) .setMessage(dlgText) .setPositiveButton(R.string.manage_applications, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -296,7 +291,6 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen String dlgText1 = getString(R.string.install_failed_msg, appTitle1.toString()); return new AlertDialog.Builder(this) - .setTitle(R.string.install_failed) .setNeutralButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { finish(); @@ -305,31 +299,8 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen .setMessage(dlgText1) .setOnCancelListener(this) .create(); - case DLG_ALLOW_SOURCE: - CharSequence appTitle2 = mPm.getApplicationLabel(mSourceInfo); - String dlgText2 = getString(R.string.allow_source_dlg_text, - appTitle2.toString()); - return new AlertDialog.Builder(this) - .setTitle(R.string.allow_source_dlg_title) - .setMessage(dlgText2) - .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - setResult(RESULT_CANCELED); - finish(); - }}) - .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - SharedPreferences prefs = getSharedPreferences(PREFS_ALLOWED_SOURCES, - Context.MODE_PRIVATE); - prefs.edit().putBoolean(mSourceInfo.packageName, true).apply(); - startInstallConfirm(); - } - }) - .setOnCancelListener(this) - .create(); case DLG_NOT_SUPPORTED_ON_WEAR: return new AlertDialog.Builder(this) - .setTitle(R.string.wear_not_allowed_dlg_title) .setMessage(R.string.wear_not_allowed_dlg_text) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { |