Loading tools/layoutlib/bridge/src/android/os/ServiceManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java +78 −46 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading @@ -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); Loading Loading
tools/layoutlib/bridge/src/android/os/ServiceManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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; } Loading
tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java +78 −46 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading @@ -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); Loading