summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-12-07 12:47:12 -0800
committerJean-Baptiste Queru <jbq@google.com>2010-12-07 12:51:49 -0800
commit12902d687fa1bd4bff3c2dfc079c71eacb00eedd (patch)
treeaa62ab756e61c52df8e02a1ba559da35b04fda11 /location
parent1ee2394edd4b90111f8174862c7c0f435e1a3634 (diff)
parent78742e01f73d098076f55cf4f40f0a013a3d88ce (diff)
downloadframeworks_base-12902d687fa1bd4bff3c2dfc079c71eacb00eedd.zip
frameworks_base-12902d687fa1bd4bff3c2dfc079c71eacb00eedd.tar.gz
frameworks_base-12902d687fa1bd4bff3c2dfc079c71eacb00eedd.tar.bz2
resolved conflicts for merge of 78742e01 to stage-korg-master
Change-Id: I0ce429afeb26184f075b4ed326fc4e1c0833e905
Diffstat (limited to 'location')
-rwxr-xr-xlocation/java/com/android/internal/location/GpsNetInitiatedHandler.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
index d3a71b3..d539833 100755
--- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
+++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
@@ -28,6 +28,8 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
+import com.android.internal.R;
+
/**
* A GPS Network-initiated Handler class used by LocationManager.
*
@@ -182,8 +184,8 @@ public class GpsNetInitiatedHandler {
return;
}
- String title = getNotifTitle(notif);
- String message = getNotifMessage(notif);
+ String title = getNotifTitle(notif, mContext);
+ String message = getNotifMessage(notif, mContext);
if (DEBUG) Log.d(TAG, "setNiNotification, notifyId: " + notif.notificationId +
", title: " + title +
@@ -203,7 +205,7 @@ public class GpsNetInitiatedHandler {
}
mNiNotification.flags = Notification.FLAG_ONGOING_EVENT;
- mNiNotification.tickerText = getNotifTicker(notif);
+ mNiNotification.tickerText = getNotifTicker(notif, mContext);
// if not to popup dialog immediately, pending intent will open the dialog
Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
@@ -234,8 +236,8 @@ public class GpsNetInitiatedHandler {
private Intent getDlgIntent(GpsNiNotification notif)
{
Intent intent = new Intent();
- String title = getDialogTitle(notif);
- String message = getDialogMessage(notif);
+ String title = getDialogTitle(notif, mContext);
+ String message = getDialogMessage(notif, mContext);
// directly bring up the NI activity
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -412,41 +414,40 @@ public class GpsNetInitiatedHandler {
}
// change this to configure notification display
- static private String getNotifTicker(GpsNiNotification notif)
+ static private String getNotifTicker(GpsNiNotification notif, Context context)
{
- String ticker = String.format("Position request! ReqId: [%s] ClientName: [%s]",
+ String ticker = String.format(context.getString(R.string.gpsNotifTicker),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return ticker;
}
// change this to configure notification display
- static private String getNotifTitle(GpsNiNotification notif)
+ static private String getNotifTitle(GpsNiNotification notif, Context context)
{
- String title = String.format("Position Request");
+ String title = String.format(context.getString(R.string.gpsNotifTitle));
return title;
}
// change this to configure notification display
- static private String getNotifMessage(GpsNiNotification notif)
+ static private String getNotifMessage(GpsNiNotification notif, Context context)
{
- String message = String.format(
- "NI Request received from [%s] for client [%s]!",
+ String message = String.format(context.getString(R.string.gpsNotifMessage),
decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
decodeString(notif.text, mIsHexInput, notif.textEncoding));
return message;
}
// change this to configure dialog display (for verification)
- static public String getDialogTitle(GpsNiNotification notif)
+ static public String getDialogTitle(GpsNiNotification notif, Context context)
{
- return getNotifTitle(notif);
+ return getNotifTitle(notif, context);
}
// change this to configure dialog display (for verification)
- static private String getDialogMessage(GpsNiNotification notif)
+ static private String getDialogMessage(GpsNiNotification notif, Context context)
{
- return getNotifMessage(notif);
+ return getNotifMessage(notif, context);
}
}