Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 789b2e8e authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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
parent e88eaf65
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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 -->

+0 −29
Original line number Diff line number Diff line
@@ -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) {