Commit 3d6c4ff5 authored by Nicklas Bergman's avatar Nicklas Bergman

* Extracted hardcoded string resources

parent d8e59fa8
......@@ -46,8 +46,8 @@ public class BluetoothReceiver extends BroadcastReceiver {
//Send low-priority notification here too allow user to keep Bluetooth on
boolean preDisableNotification = sharedPreferences.getBoolean(PRE_DISABLE_NOTIFICATIONS_KEY, false);
if (preDisableNotification) {
Util.sendNotification(context, "Bluetooth device disconnected",
"Greentooth will soon disable Bluetooth", GreenApplication.NOTIFICATION_TYPE_PRE_DISABLE);
Util.sendNotification(context, context.getString(R.string.pre_disable_notification_title),
context.getString(R.string.pre_disable_notification_body), GreenApplication.NOTIFICATION_TYPE_PRE_DISABLE);
}
}
} else if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) {
......
......@@ -39,8 +39,8 @@ public class BluetoothWorker extends Worker {
Util.cancelNotification(context, NOTIFICATION_TAG, PRE_DISABLE_NOTIFICATION_ID);
boolean postDisableNotificationsEnabled = sharedPreferences.getBoolean(POST_DISABLE_NOTIFICATIONS_KEY, false);
if (postDisableNotificationsEnabled) {
Util.sendNotification(context, context.getString(R.string.notification_title),
context.getString(R.string.notification_body), GreenApplication.NOTIFICATION_TYPE_POST_DISABLE);
Util.sendNotification(context, context.getString(R.string.post_disable_notification_title),
context.getString(R.string.post_disable_notification_body), GreenApplication.NOTIFICATION_TYPE_POST_DISABLE);
}
return Result.success();
} else {
......
......@@ -35,8 +35,8 @@
delay has passed.</string>
<string name="help">Help</string>
<string name="okay">OK</string>
<string name="notification_title">Bluetooth disabled</string>
<string name="notification_body">No devices connected.</string>
<string name="post_disable_notification_title">Bluetooth disabled</string>
<string name="post_disable_notification_body">No devices connected.</string>
<string name="enable_greentooth">Enable Greentooth</string>
<string name="minimum_delay">Minimum delay</string>
<string name="enable_notifications">Enable notifications</string>
......@@ -51,6 +51,8 @@
<string name="none">None</string>
<string name="duration_separator">:</string>
<string name="cancel">Cancel</string>
<string name="pre_disable_notification_title">Bluetooth device disconnected</string>
<string name="pre_disable_notification_body">Greentooth will soon disable Bluetooth</string>
<plurals name="minutes_delay">
<item quantity="one">%d minute</item>
<item quantity="other">%d minutes</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment