summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/GearsPermissionsDialog.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:52 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:52 -0800
commitfbb2a3ac0739da8207174943c08a289dcddcfab6 (patch)
tree1befea471c038bb7a5c77c96a74bb04c94c679ad /src/com/android/browser/GearsPermissionsDialog.java
parentb7775e1e46a6c8ce0f07747d44c1b1792bb0ce1c (diff)
downloadpackages_apps_Browser-fbb2a3ac0739da8207174943c08a289dcddcfab6.zip
packages_apps_Browser-fbb2a3ac0739da8207174943c08a289dcddcfab6.tar.gz
packages_apps_Browser-fbb2a3ac0739da8207174943c08a289dcddcfab6.tar.bz2
auto import from //branches/cupcake/...@131421
Diffstat (limited to 'src/com/android/browser/GearsPermissionsDialog.java')
-rw-r--r--src/com/android/browser/GearsPermissionsDialog.java45
1 files changed, 28 insertions, 17 deletions
diff --git a/src/com/android/browser/GearsPermissionsDialog.java b/src/com/android/browser/GearsPermissionsDialog.java
index b57ab0b..dbec363 100644
--- a/src/com/android/browser/GearsPermissionsDialog.java
+++ b/src/com/android/browser/GearsPermissionsDialog.java
@@ -35,6 +35,7 @@ class GearsPermissionsDialog extends GearsBaseDialog {
private static final String TAG = "GearsPermissionsDialog";
private String mDialogType;
+ private int mNotification = 0;
public GearsPermissionsDialog(Activity activity,
Handler handler,
@@ -48,15 +49,6 @@ class GearsPermissionsDialog extends GearsBaseDialog {
R.string.permission_button_allow,
R.string.permission_button_deny);
- View contentBorder = findViewById(R.id.content_border);
- if (contentBorder != null) {
- contentBorder.setBackgroundResource(R.color.permission_border);
- }
- View contentBackground = findViewById(R.id.content_background);
- if (contentBackground != null) {
- contentBackground.setBackgroundResource(R.color.permission_background);
- }
-
try {
JSONObject json = new JSONObject(mDialogArguments);
@@ -84,6 +76,16 @@ class GearsPermissionsDialog extends GearsBaseDialog {
downloadIcon(iconUrl);
}
+ View msg = findViewById(R.id.permission_dialog_message);
+ if (msg != null) {
+ TextView dialogMessage = (TextView) msg;
+ if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
+ dialogMessage.setText(R.string.query_data_message);
+ } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
+ dialogMessage.setText(R.string.location_message);
+ }
+ }
+
} catch (JSONException e) {
Log.e(TAG, "JSON exception ", e);
}
@@ -91,15 +93,11 @@ class GearsPermissionsDialog extends GearsBaseDialog {
public void setupDialog(TextView message, ImageView icon) {
if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
- message.setText(R.string.query_data_message);
- icon.setImageResource(R.drawable.gears_local_data);
+ message.setText(R.string.query_data_prompt);
+ icon.setImageResource(android.R.drawable.ic_popup_disk_full);
} else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
- message.setText(R.string.location_message);
- icon.setImageResource(R.drawable.gears_location_data);
- View privacyPolicyLabel = findViewById(R.id.privacy_policy_label);
- if (privacyPolicyLabel != null) {
- privacyPolicyLabel.setVisibility(View.VISIBLE);
- }
+ message.setText(R.string.location_prompt);
+ icon.setImageResource(R.drawable.ic_dialog_menu_generic);
}
}
@@ -108,9 +106,19 @@ class GearsPermissionsDialog extends GearsBaseDialog {
switch (closingType) {
case ALWAYS_DENY:
ret = "{\"allow\": false, \"permanently\": true }";
+ if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
+ mNotification = R.string.storage_notification_alwaysdeny;
+ } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
+ mNotification = R.string.location_notification_alwaysdeny;
+ }
break;
case ALLOW:
ret = "{\"allow\": true, \"permanently\": true }";
+ if (mDialogType.equalsIgnoreCase(LOCAL_DATA_STRING)) {
+ mNotification = R.string.storage_notification;
+ } else if (mDialogType.equalsIgnoreCase(LOCATION_DATA_STRING)) {
+ mNotification = R.string.location_notification;
+ }
break;
case DENY:
ret = "{\"allow\": false, \"permanently\": false }";
@@ -119,4 +127,7 @@ class GearsPermissionsDialog extends GearsBaseDialog {
return ret;
}
+ public int notification() {
+ return mNotification;
+ }
}