summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorTao Bai <michaelbai@google.com>2014-07-23 19:39:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-23 19:39:51 +0000
commita365888c065bd31b2daaae9a2e241f9eabf352c5 (patch)
tree5ad07368f294ae93fd5085da63b13f2137a6214e /src/com
parent270a8abcbfb60b58736edf1353099e524b1703f6 (diff)
parent9971e3f4bad925e87fc7c4bd82a7e6b097ce3981 (diff)
downloadpackages_apps_Browser-a365888c065bd31b2daaae9a2e241f9eabf352c5.zip
packages_apps_Browser-a365888c065bd31b2daaae9a2e241f9eabf352c5.tar.gz
packages_apps_Browser-a365888c065bd31b2daaae9a2e241f9eabf352c5.tar.bz2
am 9971e3f4: Changes correspoding to Permission API change
* commit '9971e3f4bad925e87fc7c4bd82a7e6b097ce3981': Changes correspoding to Permission API change
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/PermissionsPrompt.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/browser/PermissionsPrompt.java b/src/com/android/browser/PermissionsPrompt.java
index e84ab32..29412d9 100644
--- a/src/com/android/browser/PermissionsPrompt.java
+++ b/src/com/android/browser/PermissionsPrompt.java
@@ -81,14 +81,16 @@ public class PermissionsPrompt extends RelativeLayout {
}
public void setMessage() {
- long resources = mRequest.getResources();
+ String[] resources = mRequest.getResources();
Vector<String> strings = new Vector<String>();
- if ((resources & PermissionRequest.RESOURCE_GEOLOCATION) != 0)
- strings.add(getResources().getString(R.string.resource_geolocation));
- if ((resources & PermissionRequest.RESOURCE_VIDEO_CAPTURE) != 0)
- strings.add(getResources().getString(R.string.resource_video_capture));
- if ((resources & PermissionRequest.RESOURCE_AUDIO_CAPTURE) != 0)
- strings.add(getResources().getString(R.string.resource_audio_capture));
+ for (String resource : resources) {
+ if (resource.equals(PermissionRequest.RESOURCE_VIDEO_CAPTURE))
+ strings.add(getResources().getString(R.string.resource_video_capture));
+ else if (resource.equals(PermissionRequest.RESOURCE_AUDIO_CAPTURE))
+ strings.add(getResources().getString(R.string.resource_audio_capture));
+ else if (resource.equals(PermissionRequest.RESOURCE_PROTECTED_MEDIA_ID))
+ strings.add(getResources().getString(R.string.resource_protected_media_id));
+ }
if (strings.isEmpty()) return;
Enumeration<String> e = strings.elements();