Better strings for system installer, cleanup

This commit is contained in:
Dominik Schürmann 2015-05-20 22:50:42 +02:00
parent b393befb70
commit fc631c8781
2 changed files with 21 additions and 25 deletions

View File

@ -25,10 +25,10 @@
<string name="notify_on">Notify when updates are available</string>
<string name="update_history">Update history</string>
<string name="update_history_summ">Days to consider apps new or recent: %s</string>
<string name="system_installer">Install using system-permissions</string>
<string name="system_installer_on">Use system permissions to install, update, and remove packages</string>
<string name="uninstall_system">Uninstall F-Droid</string>
<string name="uninstall_system_summary">Uninstall F-Droid when installed as a system-app.</string>
<string name="system_installer">Enable privileged F-Droid</string>
<string name="system_installer_on">Use privileged permissions to install, update, and remove packages</string>
<string name="uninstall_system">Uninstall privileged F-Droid</string>
<string name="uninstall_system_summary">Uninstall F-Droid when installed as a privileged app</string>
<string name="local_repo_bonjour">Broadcast Local Repo</string>
<string name="local_repo_bonjour_on">Advertise your local repo using Bonjour (mDNS)</string>
<string name="local_repo_name">Name of your Local Repo</string>
@ -292,21 +292,22 @@
<string name="root_access_denied_body">Either your Android device is not rooted or you have denied root access for F-Droid.</string>
<string name="update_all">Update all</string>
<string name="installer_error_title">(De-)Installation Error</string>
<string name="installer_error_body">The (de-)installation failed. If you are using root access, try disabling this setting!</string>
<string name="installer_error_body">The (de-)installation failed. If you are using F-Droid as a privileged app, try disabling this setting!</string>
<string name="system_permission_denied_title">System permissions denied</string>
<string name="system_permission_denied_body">This option is only available when F-Droid is installed as a system-app.</string>
<string name="system_permission_install_via_root">Install as system-app</string>
<string name="system_install_first_time_notification">Install F-Droid as a system-app?</string>
<string name="system_install_first_time_notification_message">Looks like you have root access on your device. You could install F-Droid as a system-app to enable extended features, such as automatic app updates.\nYou can also do this later from F-Droid\'s preferences.</string>
<string name="system_install_post_success">Successful installation as system-app</string>
<string name="system_install_post_fail">Installation as system-app failed</string>
<string name="system_install_post_success_message">F-Droid has been successfully installed into the system partition. This enables extended features, such as automatic app updates.</string>
<string name="system_install_post_fail_message">The installation of F-Droid into the system partition failed. The installation method is not supported by all Android distributions, please consult the F-Droid bug tracker for more information.</string>
<string name="system_permission_denied_body">This option is only available when F-Droid is installed as a privileged app.</string>
<string name="system_permission_install_via_root">Install as a privileged app</string>
<string name="system_install_first_time_notification">Install privileged F-Droid?</string>
<string name="system_install_first_time_notification_message_short">Click here for more information.</string>
<string name="system_install_first_time_notification_message">Click here to install F-Droid as a privileged app, tightly coupled with the Android operating system. This enables extended features, such as automatic app updates.\nYou can also do this later from F-Droid\'s preferences.</string>
<string name="system_install_post_success">Successful installation as a privileged app</string>
<string name="system_install_post_fail">Installation as a privileged app failed</string>
<string name="system_install_post_success_message">F-Droid has been successfully installed as a privileged app. This enables extended features, such as automatic app updates.</string>
<string name="system_install_post_fail_message">The installation of F-Droid as a privileged app failed. The installation method is not supported by all Android distributions, please consult the F-Droid bug tracker for more information.</string>
<string name="system_install_installing">installing…</string>
<string name="system_install_uninstalling">uninstalling…</string>
<string name="system_install_question">Do you want to install F-Droid as a system-app?\nThis takes up to 10 seconds where &lt;b>no user interface&lt;/b> is shown.</string>
<string name="system_install_question_lollipop">Do you want to install F-Droid as a system-app?\nThis takes up to 10 seconds where &lt;b>no user interface&lt;/b> is shown and the device will be &lt;b>rebooted&lt;/b> afterwards.</string>
<string name="system_install_first_time_message">Looks like you have root access on your device. You could install F-Droid as a system-app to enable extended features, such as automatic app updates.</string>
<string name="system_install_question">Do you want to install F-Droid as a privileged app?\nThis takes up to 10 seconds where &lt;b>no user interface&lt;/b> is shown.</string>
<string name="system_install_question_lollipop">Do you want to install F-Droid as a privileged app?\nThis takes up to 10 seconds where &lt;b>no user interface&lt;/b> is shown and the device will be &lt;b>rebooted&lt;/b> afterwards.</string>
<string name="system_install_first_time_message">Looks like you have root access on your device. You can now install F-Droid as a privileged app, tightly coupled with the Android operating system. This enables extended features, such as automatic app updates.</string>
<string name="system_uninstall">Do you want to uninstall F-Droid?</string>
<string name="system_uninstall_message">This will uninstall F-Droid completely.</string>
<string name="system_uninstall_button">Uninstall</string>

View File

@ -111,9 +111,6 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
if (probablyRoot) {
// looks like we have root, at least su has a version number and is present
// final int icon = Build.VERSION.SDK_INT >= 11 ? R.drawable.ic_stat_notify_updates : R.drawable.ic_launcher;
final int icon = R.drawable.ic_launcher;
Intent installIntent = new Intent(context, InstallIntoSystemDialogActivity.class);
installIntent.setAction(InstallIntoSystemDialogActivity.ACTION_FIRST_TIME);
installIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@ -126,14 +123,12 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
PendingIntent.FLAG_UPDATE_CURRENT
);
String msg = context.getString(R.string.system_install_first_time_notification_message);
NotificationCompat.Builder builder =
new NotificationCompat.Builder(context)
.setContentIntent(resultPendingIntent)
.setSmallIcon(icon)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle(context.getString(R.string.system_install_first_time_notification))
.setContentText(msg)
.setContentText(context.getString(R.string.system_install_first_time_notification_message_short))
.setDefaults(Notification.DEFAULT_ALL)
.setAutoCancel(true)
/*
@ -144,7 +139,7 @@ public class InstallIntoSystemDialogActivity extends FragmentActivity {
* pre-4.1 devices.
*/
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(msg));
.bigText(context.getString(R.string.system_install_first_time_notification_message)));
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(42, builder.build());