@Test public void checkPatchingPolicyEnum() { for (InstantRunPatchingPolicy policy : InstantRunPatchingPolicy.values()) { assertEquals(policy.toString(), InstantRunAnalyticsHelper.convert(policy).toString()); } assertEquals(AndroidStudioStats.InstantRunStatus.PatchingPolicy.UNKNOWN_PATCHING_POLICY, InstantRunAnalyticsHelper.convert((InstantRunPatchingPolicy) null)); }
@VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } }
InstantRunAnalyticsHelper { @VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } } }
InstantRunAnalyticsHelper { @VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } } private  InstantRunAnalyticsHelper(); }
InstantRunAnalyticsHelper { @VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } } private  InstantRunAnalyticsHelper(); @NonNull static AndroidStudioStats.InstantRunStatus generateAnalyticsProto(
            @NonNull InstantRunBuildContext instantRunBuildContext); }
InstantRunAnalyticsHelper { @VisibleForTesting @NonNull static AndroidStudioStats.InstantRunStatus.BuildMode convert( @NonNull InstantRunBuildMode mode) { switch (mode) { case HOT_WARM: return AndroidStudioStats.InstantRunStatus.BuildMode.HOT_WARM; case COLD: return AndroidStudioStats.InstantRunStatus.BuildMode.COLD; case FULL: return AndroidStudioStats.InstantRunStatus.BuildMode.FULL; default: return AndroidStudioStats.InstantRunStatus.BuildMode.UNKNOWN_BUILD_MODE; } } private  InstantRunAnalyticsHelper(); @NonNull static AndroidStudioStats.InstantRunStatus generateAnalyticsProto(
            @NonNull InstantRunBuildContext instantRunBuildContext);  }