Skip to content

Commit

Permalink
Add Constants.androidVersionCode
Browse files Browse the repository at this point in the history
fbshipit-source-id: b5a4e6d
  • Loading branch information
jesseruder authored and expbot committed Dec 19, 2017
1 parent a560479 commit 236bbff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.List;

import host.exp.exponent.BuildConfig;
import host.exp.exponent.Constants;

@DoNotStrip
Expand Down Expand Up @@ -37,6 +38,7 @@ public static Constants.ExpoViewAppConstants get() {
constants.RELEASE_CHANNEL = RELEASE_CHANNEL;
constants.SHOW_LOADING_VIEW_IN_SHELL_APP = SHOW_LOADING_VIEW_IN_SHELL_APP;
constants.EMBEDDED_RESPONSES = EMBEDDED_RESPONSES;
constants.ANDROID_VERSION_CODE = BuildConfig.VERSION_CODE;
return constants;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static class ExpoViewAppConstants {
public String RELEASE_CHANNEL;
public boolean SHOW_LOADING_VIEW_IN_SHELL_APP;
public List<Constants.EmbeddedResponse> EMBEDDED_RESPONSES;
public int ANDROID_VERSION_CODE;
}

private static final String TAG = Constants.class.getSimpleName();
Expand All @@ -41,6 +42,7 @@ public static class ExpoViewAppConstants {
public static boolean DISABLE_NUX = false;
public static String RELEASE_CHANNEL = "default";
public static boolean SHOW_LOADING_VIEW_IN_SHELL_APP = false;
public static int ANDROID_VERSION_CODE;

public static void setSdkVersions(List<String> sdkVersions) {
ABI_VERSIONS = TextUtils.join(",", sdkVersions);
Expand Down Expand Up @@ -85,6 +87,7 @@ public static void setSdkVersions(List<String> sdkVersions) {
SHELL_APP_SCHEME = appConstants.SHELL_APP_SCHEME;
RELEASE_CHANNEL = appConstants.RELEASE_CHANNEL;
SHOW_LOADING_VIEW_IN_SHELL_APP = appConstants.SHOW_LOADING_VIEW_IN_SHELL_APP;
ANDROID_VERSION_CODE = appConstants.ANDROID_VERSION_CODE;

embeddedResponses.addAll(appConstants.EMBEDDED_RESPONSES);
EMBEDDED_RESPONSES = embeddedResponses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public Map<String, Object> getConstants() {
constants.putAll(mExperienceProperties);
}
constants.put("systemVersion", Build.VERSION.RELEASE);
constants.put("androidVersionCode", Constants.ANDROID_VERSION_CODE);
return constants;
}

Expand Down

0 comments on commit 236bbff

Please sign in to comment.