Add fallback mechanism for resources resolved via introspection.
In case of resources not resolve from hard-coded 'com.android.browser.R'
package name, fallback on resolving it from dynamically queried
package name.
Change-Id: Ifb9ca330ba8efd200ce3ccb116fa9aa3e52fb885
diff --git a/src/com/android/browser/PageDialogsHandler.java b/src/com/android/browser/PageDialogsHandler.java
index b1e1d44..67078b5 100644
--- a/src/com/android/browser/PageDialogsHandler.java
+++ b/src/com/android/browser/PageDialogsHandler.java
@@ -354,6 +354,7 @@
SslError error) {
View certificateView = inflateCertificateView(certificate, mContext);
Resources res = Resources.getSystem();
+ // load 'android.R.placeholder' via introspection, since it's not a public resource ID
int placeholder_id = res.getIdentifier("placeholder", "id", "android");
final LinearLayout placeholder =
(LinearLayout)certificateView.findViewById(placeholder_id);