am 010bed74: Merge change 23723 into eclair
Merge commit '010bed7419e96f5310be25d9317405d360f90b9c' into eclair-plus-aosp * commit '010bed7419e96f5310be25d9317405d360f90b9c': Get drawable directory for the platform buttons.
This commit is contained in:
@@ -112,8 +112,6 @@ class BrowserFrame extends Handler {
|
|||||||
// create PluginManager with current Context
|
// create PluginManager with current Context
|
||||||
PluginManager.getInstance(context);
|
PluginManager.getInstance(context);
|
||||||
}
|
}
|
||||||
AssetManager am = context.getAssets();
|
|
||||||
nativeCreateFrame(w, am, proxy.getBackForwardList());
|
|
||||||
|
|
||||||
mSettings = settings;
|
mSettings = settings;
|
||||||
mContext = context;
|
mContext = context;
|
||||||
@@ -121,6 +119,9 @@ class BrowserFrame extends Handler {
|
|||||||
mDatabase = WebViewDatabase.getInstance(context);
|
mDatabase = WebViewDatabase.getInstance(context);
|
||||||
mWebViewCore = w;
|
mWebViewCore = w;
|
||||||
|
|
||||||
|
AssetManager am = context.getAssets();
|
||||||
|
nativeCreateFrame(w, am, proxy.getBackForwardList());
|
||||||
|
|
||||||
if (DebugFlags.BROWSER_FRAME) {
|
if (DebugFlags.BROWSER_FRAME) {
|
||||||
Log.v(LOGTAG, "BrowserFrame constructor: this=" + this);
|
Log.v(LOGTAG, "BrowserFrame constructor: this=" + this);
|
||||||
}
|
}
|
||||||
@@ -670,6 +671,7 @@ class BrowserFrame extends Handler {
|
|||||||
// these ids need to be in sync with enum RAW_RES_ID in WebFrame
|
// these ids need to be in sync with enum RAW_RES_ID in WebFrame
|
||||||
private static final int NODOMAIN = 1;
|
private static final int NODOMAIN = 1;
|
||||||
private static final int LOADERROR = 2;
|
private static final int LOADERROR = 2;
|
||||||
|
private static final int DRAWABLEDIR = 3;
|
||||||
|
|
||||||
String getRawResFilename(int id) {
|
String getRawResFilename(int id) {
|
||||||
int resid;
|
int resid;
|
||||||
@@ -682,12 +684,26 @@ class BrowserFrame extends Handler {
|
|||||||
resid = com.android.internal.R.raw.loaderror;
|
resid = com.android.internal.R.raw.loaderror;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DRAWABLEDIR:
|
||||||
|
// use one known resource to find the drawable directory
|
||||||
|
resid = com.android.internal.R.drawable.btn_check_off;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Log.e(LOGTAG, "getRawResFilename got incompatible resource ID");
|
Log.e(LOGTAG, "getRawResFilename got incompatible resource ID");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
TypedValue value = new TypedValue();
|
TypedValue value = new TypedValue();
|
||||||
mContext.getResources().getValue(resid, value, true);
|
mContext.getResources().getValue(resid, value, true);
|
||||||
|
if (id == DRAWABLEDIR) {
|
||||||
|
String path = value.string.toString();
|
||||||
|
int index = path.lastIndexOf('/');
|
||||||
|
if (index < 0) {
|
||||||
|
Log.e(LOGTAG, "Can't find drawable directory.");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return path.substring(0, index + 1);
|
||||||
|
}
|
||||||
return value.string.toString();
|
return value.string.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user