OSDN Git Service

SDK Manager: change initial selection logic.
authorRaphael <raphael@google.com>
Tue, 18 Oct 2011 17:31:38 +0000 (10:31 -0700)
committerRaphael <raphael@google.com>
Tue, 18 Oct 2011 17:31:38 +0000 (10:31 -0700)
commita3e43f30cf2278afd5dbc5864442529129b3a057
tree7379b164a6bb9164f3ae74c3a58fd6e77a582401
parent911a1f2914352fc0b64ec034b2ba0874a3ec11e3
SDK Manager: change initial selection logic.

This changes the way packages are selected:
- When using the "Select New" link, all new stuff is selected.
- When using the "Select Update" link, only installed stuff
  with updates is selected.
- When starts the SDK Manager, the heuristic becomes:
  - Select any updates we can find.
  - Check whether the top platform is installed.
  - If not at all, select all its packages. This should
    cover the "there's a new platform available" scenario
    by just selecting to install everything for it.
  - If the top platform has at least one item selected,
    make sure the platform package itself is installed or
    select it.
  - If the platform currently installed or a selected
    update lacks a system image, we want to suggest some
    kind of system image. For that, look whether the platform
    (current or selected update) provides one. If they don't
    select any system image package we can find.
  - On Windows, also suggest to install the USB driver.

SDK Bug: 20607

Change-Id: Ifab423b226ad708e9117eefd4d76033d866c57a8
sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/PackagesDiffLogic.java
sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/PackagesPage.java
sdkmanager/libs/sdkuilib/tests/com/android/sdkuilib/internal/repository/sdkman2/PackagesDiffLogicTest.java