diff --git a/app/build.gradle b/app/build.gradle index d8ca4a598..999093ada 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.google.android.stardroid" minSdkVersion 16 targetSdkVersion 30 - versionCode 1518 - versionName "1.9.6 - RC1" + versionCode 1519 + versionName "1.9.6 - RC2" buildConfigField 'String', 'GOOGLE_ANALYTICS_CODE', '""' } diff --git a/app/src/main/java/com/google/android/stardroid/layers/AbstractFileBasedLayer.java b/app/src/main/java/com/google/android/stardroid/layers/AbstractFileBasedLayer.java index b28eeac38..b4121ffbb 100644 --- a/app/src/main/java/com/google/android/stardroid/layers/AbstractFileBasedLayer.java +++ b/app/src/main/java/com/google/android/stardroid/layers/AbstractFileBasedLayer.java @@ -26,6 +26,7 @@ import com.google.android.stardroid.util.Blog; import com.google.android.stardroid.util.MiscUtil; import com.google.common.io.Closeables; +import com.google.protobuf.Parser; import java.io.IOException; import java.io.InputStream; @@ -77,10 +78,10 @@ private void readSourceFile(String sourceFilename) { InputStream in = null; try { in = assetManager.open(sourceFilename, AssetManager.ACCESS_BUFFER); - AstronomicalSourcesProto.Builder builder = AstronomicalSourcesProto.newBuilder(); - builder.mergeFrom(in); + Parser parser = AstronomicalSourcesProto.parser(); + AstronomicalSourcesProto sources = parser.parseFrom(in); - for (AstronomicalSourceProto proto : builder.build().getSourceList()) { + for (AstronomicalSourceProto proto : sources.getSourceList()) { fileSources.add(new ProtobufAstronomicalSource(proto, getResources())); } Log.d(TAG, "Found: " + fileSources.size() + " sources");