OSDN Git Service

Welcome Wizard. Do not merge.
authorTor Norbye <tnorbye@google.com>
Wed, 21 Sep 2011 22:12:08 +0000 (15:12 -0700)
committerRaphael Moll <raphael@google.com>
Sun, 25 Sep 2011 04:43:19 +0000 (21:43 -0700)
commitd0357c27e602d6bec239897b8375d642bc590a62
treea61e713369ca387f00da90c8df9d308c2288e911
parent082f833d2eed8e6cb6e4e75a273f76b796902133
Welcome Wizard. Do not merge.

This changeset adds a new "Welcome Wizard" which is shown the first
time a user runs Eclipse with the ADT plugin.

The welcome wizard asks for two pieces of information:

(1) The location of the SDK.
(2) Whether the user agrees to gathering usage statistics.

We've needed this information before, but collection of the data had
been more ad-hoc: The usage data permission dialog would show up on
its own, and the SDK information would be requested the first time
some code path touched it (e.g.  opening a layout or opening the
preference dialog's Android page etc).

In addition, the wizard also offers to *install* SDKs if you don't
already have one. It gives the option between the latest available
platform, and one supported by a large majority of devices (currently
API level 7), or both. If you select this option, then when finishing
the wizard the SDK manager is run in a special mode where it installs
the required packages with a progress dialog.

This changeset also starts recording the chosen SDK location in the
~/.android settings file. This allows us to detect when you're running
Eclipse in a brand new workspace and you've already gone through the
SDK selection before, and we don't need to ask again -- we'll just use
the most recently known location.

The wizard will only be shown once. If you bypass or cancel out of the
wizard, you can still configure your SDK the old way - via the
Preference dialog. Note also that the usage permission page is only
shown if the user has not already opted in via say ddms.

NOTE: If you want to test this, make sure you haven't set the
environment variable ADT_TEST_SDK_PATH (as some of us do for running
unit tests) since it is treated as the user having selected the given
SDK root, and in particular it means the wizard won't be shown even if
you've wiped adtUsed=true from your ~/.android/ddms.cfg etc.

(cherry picked from commit 292eefb8faa2f75ddbc5d6e20084c9f9a762da29)

Change-Id: Idb3f8775ef62a84905cde95b25eeb8691ef0afab
eclipse/dictionary.txt
eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AndroidPreferencePage.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/AdtStartup.java [new file with mode: 0644]
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/UsagePermissionPage.java [new file with mode: 0644]
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/WelcomeWizard.java [new file with mode: 0644]
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/welcome/WelcomeWizardPage.java [new file with mode: 0644]
sdkstats/src/com/android/sdkstats/DdmsPreferenceStore.java
sdkstats/src/com/android/sdkstats/SdkStatsPermissionDialog.java