EmailTests: Use language level consistent with SDK version.

Before this CL, EmailTests was built using SDK version 14 but the default
LOCAL_JAVA_LANGUAGE_VERSION (currently 1.8). This breaks compilation on
recent OpenJDK tool chain versions: When targeting versions >= 1.7, those
generate synthetic calls to java.util.Objects.requireNonNull(), but that
API is only available from Android API level 19 onwards.

This CL fixes this issue by explicitly setting
rather than tracking the current default.

Changing the LOCAL_SDK_VERSION to 19 would also have worked for the
particular issue of Objects.requireNonNull(), but the language version
and SDK used to built would then still have been inconsistent which
could have led to other issues in future.

If EmailTests ever needs to use later language features or APIs, the
SDK version and language version can be changed to higher versions then.
In the last year, packages/apps/Email has only seen one (security fix)
CL. Also, 31 out of the 158 tests in EmailTests currently fail via:

adb shell am instrument -w \

Bug: 38495704
Bug: 38177295
Test: make Email EmailTests

Change-Id: I7c0d10e41876dfbfcef61237ef4ca04e73409a98
1 file changed