Revert "Make OpenJDK 8 the default"

Reverting until all continuous builds that cover branches downstream of master can be updated to use JDK 8.

This reverts commit 1bd16b67c4b05f9df1f6d9ef85365929df0c34ef.

Change-Id: Icb0daa440a6286e07d3cfd9ff8b082b4154ebc21
diff --git a/core/droiddoc.mk b/core/droiddoc.mk
index f143579..432ba11 100644
--- a/core/droiddoc.mk
+++ b/core/droiddoc.mk
@@ -215,7 +215,7 @@
                 \@$(PRIVATE_SRC_LIST_FILE) \
                 -J-Xmx1024m \
                 -XDignore.symbol.file \
-                $(if $(LEGACY_USE_JAVA7),,-Xdoclint:none) \
+                $(if $(EXPERIMENTAL_USE_JAVA8),-Xdoclint:none) \
                 $(PRIVATE_PROFILING_OPTIONS) \
                 $(addprefix -classpath ,$(PRIVATE_CLASSPATH)) \
                 $(addprefix -bootclasspath ,$(PRIVATE_BOOTCLASSPATH)) \
diff --git a/core/main.mk b/core/main.mk
index 62f22cc..7c979d7 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -144,7 +144,7 @@
 # Include the google-specific config
 -include vendor/google/build/config.mk
 
-VERSION_CHECK_SEQUENCE_NUMBER := 6
+VERSION_CHECK_SEQUENCE_NUMBER := 5
 -include $(OUT_DIR)/versions_checked.mk
 ifneq ($(VERSION_CHECK_SEQUENCE_NUMBER),$(VERSIONS_CHECKED))
 
@@ -180,19 +180,19 @@
 java_version_str := $(shell unset _JAVA_OPTIONS && java -version 2>&1)
 javac_version_str := $(shell unset _JAVA_OPTIONS && javac -version 2>&1)
 
-# Check for the correct version of java, should be 1.8 by
-# default and only 1.7 if LEGACY_USE_JAVA7 is set.
-ifeq ($(LEGACY_USE_JAVA7),) # if LEGACY_USE_JAVA7 == ''
+# Check for the correct version of java, should be 1.7 by
+# default, and 1.8 if EXPERIMENTAL_USE_JAVA8 is set
+ifneq ($(EXPERIMENTAL_USE_JAVA8),)
 required_version := "1.8.x"
 required_javac_version := "1.8"
 java_version := $(shell echo '$(java_version_str)' | grep '[ "]1\.8[\. "$$]')
 javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.8[\. "$$]')
-else
+else # default
 required_version := "1.7.x"
 required_javac_version := "1.7"
 java_version := $(shell echo '$(java_version_str)' | grep '^java .*[ "]1\.7[\. "$$]')
 javac_version := $(shell echo '$(javac_version_str)' | grep '[ "]1\.7[\. "$$]')
-endif # if LEGACY_USE_JAVA7 == ''
+endif # if EXPERIMENTAL_USE_JAVA8
 
 ifeq ($(strip $(java_version)),)
 $(info ************************************************************)
@@ -210,7 +210,7 @@
 
 # Check for the current JDK.
 #
-# For Java 1.7/1.8, we require OpenJDK on linux and Oracle JDK on Mac OS.
+# For Java 1.7, we require OpenJDK on linux and Oracle JDK on Mac OS.
 requires_openjdk := false
 ifeq ($(BUILD_OS),linux)
 requires_openjdk := true
diff --git a/envsetup.sh b/envsetup.sh
index 61b9ff0..cb3dc10 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1426,8 +1426,10 @@
     fi
 
     if [ ! "$JAVA_HOME" ]; then
-      if [ -n "$LEGACY_USE_JAVA7" ]; then
-        echo Warning: Support for JDK 7 will be dropped. Switch to JDK 8.
+      if [ ! "$EXPERIMENTAL_USE_JAVA8" ]; then
+        echo JDK 8 will soon become the default. Please install it now.
+        echo Also: \"export EXPERIMENTAL_USE_JAVA8=true\"
+        echo See http://go/android-jdk8-discuss
         case `uname -s` in
             Darwin)
                 export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)