History log of /sdk/sdkstats/src/com/android/sdkstats/DdmsPreferenceStore.java
Revision Date Author Comments
d0357c27e602d6bec239897b8375d642bc590a62 22-Sep-2011 Tor Norbye <tnorbye@google.com> 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
292eefb8faa2f75ddbc5d6e20084c9f9a762da29 22-Sep-2011 Tor Norbye <tnorbye@google.com> Welcome Wizard

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.

Change-Id: I0a4e2c4efce84aca9beae394ce67e4c145cbb000
1b5a2d2131d19dfe005267489ff39e0d83262be8 23-Sep-2011 Raphael <raphael@google.com> Address some comments on the DdmsPreferenceStore. Do not merge.

(cherry picked from commit 23e2f89139a9219136f5889ef1228b58bd9e02d6)

Change-Id: I65d7bed7a044d31376f592c7dcd9713a4b00262c
241bf5cff65d30fe2224d8931e1d05d3b3a4a785 23-Sep-2011 Raphael <raphael@google.com> Extract DDMS PreferenceStore. Do not merge.

Splits DDMS PreferenceStore management in
a separate class and add the methods we need
for ADT first-time wizard.

Various pieces of DDMS access the pref store
via the PrefsDialog. This could use a cleanup
eventually later.

(cherry picked from commit f7bc23a0f19d2e3371cbea41d4cf8a1081c9d2d8)

Change-Id: Iac37f970e69b7d74d9dd15120b838bcc47ba1caa
23e2f89139a9219136f5889ef1228b58bd9e02d6 23-Sep-2011 Raphael <raphael@google.com> Address some comments on the DdmsPreferenceStore.

Change-Id: Ib2ffeef63c2e5b04638fc2cf562a3f958cbd6a8b
f7bc23a0f19d2e3371cbea41d4cf8a1081c9d2d8 23-Sep-2011 Raphael <raphael@google.com> Extract DDMS PreferenceStore.

Splits DDMS PreferenceStore management in
a separate class and add the methods we need
for ADT first-time wizard.

Various pieces of DDMS access the pref store
via the PrefsDialog. This could use a cleanup
eventually later.

Change-Id: Ie1e90b9a4d7e4c9b057b506eae239ba7e8ece37d