am 94ff3f1f
: Merge change 21063 into donut
Merge commit '94ff3f1f08805b68c5524b39024968aebcdc83ee' into eclair * commit '94ff3f1f08805b68c5524b39024968aebcdc83ee': Fix handling of reference XML file in layout files
This commit is contained in:
@ -53,6 +53,8 @@ public final class ServiceManager {
|
||||
* Return a list of all currently running services.
|
||||
*/
|
||||
public static String[] listServices() throws RemoteException {
|
||||
// actual implementation returns null sometimes, so it's ok
|
||||
// to return null instead of an empty list.
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,8 @@ public final class AccessibilityManager {
|
||||
* @return An unmodifiable list with {@link ServiceInfo}s.
|
||||
*/
|
||||
public List<ServiceInfo> getAccessibilityServiceList() {
|
||||
// normal implementation does this in some case, so let's do the same
|
||||
// (unmodifiableList wrapped around null).
|
||||
List<ServiceInfo> services = null;
|
||||
return Collections.unmodifiableList(services);
|
||||
}
|
||||
|
@ -385,6 +385,11 @@ public final class BridgeResources extends Resources {
|
||||
if (ResourceHelper.stringToFloat(v, outValue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// else it's a string
|
||||
outValue.type = TypedValue.TYPE_STRING;
|
||||
outValue.string = v;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,6 +440,33 @@ public final class BridgeResources extends Resources {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XmlResourceParser loadXmlResourceParser(String file, int id,
|
||||
int assetCookie, String type) throws NotFoundException {
|
||||
// even though we know the XML file to load directly, we still need to resolve the
|
||||
// id so that we can know if it's a platform or project resource.
|
||||
// (mPlatformResouceFlag will get the result and will be used later).
|
||||
getResourceValue(id, mPlatformResourceFlag);
|
||||
|
||||
File f = new File(file);
|
||||
try {
|
||||
KXmlParser parser = new KXmlParser();
|
||||
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
|
||||
parser.setInput(new FileReader(f));
|
||||
|
||||
return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
|
||||
} catch (XmlPullParserException e) {
|
||||
NotFoundException newE = new NotFoundException();
|
||||
newE.initCause(e);
|
||||
throw newE;
|
||||
} catch (FileNotFoundException e) {
|
||||
NotFoundException newE = new NotFoundException();
|
||||
newE.initCause(e);
|
||||
throw newE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InputStream openRawResource(int id) throws NotFoundException {
|
||||
IResourceValue value = getResourceValue(id, mPlatformResourceFlag);
|
||||
|
Reference in New Issue
Block a user