@Test public void testApiLevel() throws IOException { InstantRunBuildInfo info = getBuildInfo("instantrun", "build-info1.xml"); assertEquals(23, info.getFeatureLevel()); }
public int getFeatureLevel() { String attribute = mRoot.getAttribute(ATTR_API_LEVEL); if (attribute != null && !attribute.isEmpty()) { try { return Integer.parseInt(attribute); } catch (NumberFormatException ignore) { } } return -1; }
InstantRunBuildInfo { public int getFeatureLevel() { String attribute = mRoot.getAttribute(ATTR_API_LEVEL); if (attribute != null && !attribute.isEmpty()) { try { return Integer.parseInt(attribute); } catch (NumberFormatException ignore) { } } return -1; } }
InstantRunBuildInfo { public int getFeatureLevel() { String attribute = mRoot.getAttribute(ATTR_API_LEVEL); if (attribute != null && !attribute.isEmpty()) { try { return Integer.parseInt(attribute); } catch (NumberFormatException ignore) { } } return -1; } InstantRunBuildInfo(@NonNull String xml, @NonNull Element root); }
InstantRunBuildInfo { public int getFeatureLevel() { String attribute = mRoot.getAttribute(ATTR_API_LEVEL); if (attribute != null && !attribute.isEmpty()) { try { return Integer.parseInt(attribute); } catch (NumberFormatException ignore) { } } return -1; } InstantRunBuildInfo(@NonNull String xml, @NonNull Element root); @NonNull String getTimeStamp(); long getSecretToken(); @NonNull String getVerifierStatus(); boolean canHotswap(); boolean hasNoChanges(); int getFeatureLevel(); @NonNull List<InstantRunArtifact> getArtifacts(); boolean hasOneOf(@NonNull InstantRunArtifactType... types); boolean hasMainApk(); @Nullable static InstantRunBuildInfo get(@NonNull String xml); boolean isCompatibleFormat(); int getFormat(); void serializeTo(@NonNull Writer writer); }
InstantRunBuildInfo { public int getFeatureLevel() { String attribute = mRoot.getAttribute(ATTR_API_LEVEL); if (attribute != null && !attribute.isEmpty()) { try { return Integer.parseInt(attribute); } catch (NumberFormatException ignore) { } } return -1; } InstantRunBuildInfo(@NonNull String xml, @NonNull Element root); @NonNull String getTimeStamp(); long getSecretToken(); @NonNull String getVerifierStatus(); boolean canHotswap(); boolean hasNoChanges(); int getFeatureLevel(); @NonNull List<InstantRunArtifact> getArtifacts(); boolean hasOneOf(@NonNull InstantRunArtifactType... types); boolean hasMainApk(); @Nullable static InstantRunBuildInfo get(@NonNull String xml); boolean isCompatibleFormat(); int getFormat(); void serializeTo(@NonNull Writer writer); static final String ATTR_API_LEVEL; static final String VALUE_VERIFIER_STATUS_COMPATIBLE; }