76254: Handle compileSdkVersion-dependent language level defaults

Initialize the language level to 7 if targeting L.
For now, this sets the language level unconditionally; when 76252 is
implemented in the Gradle plugin we should instead only set it when
it differs from the default the plugin will use.

Change-Id: Icdb3453ee2f624b470f0b53b0b00ab64c8bda1ae
Re-enable ExportSignedPackageTest

These were disabled until Gradle 2.0 was supported by the IDE,
which it does now.

Fixes https://code.google.com/p/android/issues/detail?id=73249

Change-Id: I0e83c00804ca2ff7326a0ef373468b9b12025725
[UI Testing] Now we use the "Open Project" wizard only once.

With this CL, we only use the "Open Project" wizard the first
time we open a project in the test suite. After that, we open
projects through APIs.

This will make test runs a little faster. It may also fix
an issue where opening a project through the UI freezes a test
when trying to refresh the local file system.

Change-Id: Id6d01bcb6ba07ef90f1c4dadc0677a95b3c55e9f
Merge "76254: Handle compileSdkVersion-dependent language level defaults" into idea133
Merge "[UI Testing] Now we use the "Open Project" wizard only once." into idea133
Change ApkUploader to not use SyncService

ApkUploader class used SyncService to upload an apk. However,
at the end of uploading, the service was not closed, resulting
in a descriptor leak. This can be observed by doing:
  - start Studio
  - install and run apk
  - disconnect device (so that all client connections are closed)
  - lsof | grep 5037, and notice that a connection is in CLOSE_WAIT

All that needed to be done was to call service.close() at the end.
This CL changes the ApkUploader service to call device.pushFile()
rather than expliclty obtaining the sync service as we weren't
really making use of the sync service's progress monitor callbacks.

Possible fix for b/14562106 and
https://code.google.com/p/android/issues/detail?id=74651

Change-Id: Idecacbe3a71f1655fbe9553a6f9bf943f5583fb9
Merge "Change ApkUploader to not use SyncService" into idea133
76127: Fix creating Android library.

This is updated version of the reverted CL. The difference is that this
version also inits "isLibrary" attribute in the NewFormFactorModulePath
fixing new project wizard.

Two issues were contributing to this bug:
1. DynamicWizardStep#commitStep was not called for the last page on a path.
2. NewFormFactorModulePath was overriding ATTR_IS_LIBRARY_MODULE template
   context value.

Change-Id: I33861a49e83c8d758ceaf09d94cc47593f70499e
76283: Using button labels '<' or '>' yields invalid XML

The PSI XmlAttribute getValue/setValue methods appear to be operating on
RAW xml source, so escape/unescape as we read/write attributes.

Change-Id: I4305f7be9f5371ca0604d748f3d9385d506540cb
Merge "76127: Fix creating Android library." into idea133
[UI Testing] Moved code to create new project to NewProjectTest.

Now that:
1. the UI testing infrastructure creates a copy of a project
   before opening/importing it, and
2. UI tests use the "Open Project" wizard only once during the
   test suite execution
it is safe to to open projects, instead of creating new ones, in
UI tests.

This CL moves the code that creates a new project through the
"New Project" wizard to NewProjectTest and makes it a private
API.

Change-Id: Ib18eb56f5edcd8509c16194e169ae00a403fbde7
Merge "76283: Using button labels '<' or '>' yields invalid XML" into idea133
Simplify ApkUploaderService API

This CL simplifies the ApkUploaderService's uploadApk API.
It used to return a three state enum, but a previous refactoring
removed the need for the FAILURE state. So rather than returning
an enum, it now just returns a boolean indicating whether the apk
was uploaded to the device or not.

Change-Id: I9661436b10397c01ae36b103719d5bca420186ce
Merge "[UI Testing] Moved code to create new project to NewProjectTest." into idea133
Merge "Simplify ApkUploaderService API" into idea133
[UI Testing] Now UI tests use the "Import Project" wizard once.

From the second time on, UI tests import project through API.

Change-Id: Ied0a4331b0c5f16395bcb24c82d7902ab7e092be
Merge "[UI Testing] Now UI tests use the "Import Project" wizard once." into idea133
Merge "Re-enable ExportSignedPackageTest" into idea133