[Wi-Fi] Add object comments for WifiTrackerLib migration

Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, there are
both some Settings files of both version. Developers should
develop on new version files.

Bug: 152571756
Test: compile
Change-Id: I4446e2e333663bf69daa1ceff102775889021851
This commit is contained in:
Arc Wang
2020-04-27 14:28:13 +08:00
parent 44121a7a3d
commit b33a59b860
15 changed files with 64 additions and 7 deletions

View File

@@ -38,6 +38,9 @@ import com.android.settingslib.wifi.AccessPoint;
* *
* The AccessPoint should be saved to the argument when launching this class in order to properly * The AccessPoint should be saved to the argument when launching this class in order to properly
* render this page. * render this page.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link ConfigureWifiEntryFragment}.
*/ */
public class ConfigureAccessPointFragment extends InstrumentedFragment implements WifiConfigUiBase { public class ConfigureAccessPointFragment extends InstrumentedFragment implements WifiConfigUiBase {

View File

@@ -27,7 +27,10 @@ import com.android.settings.R;
import com.android.settingslib.wifi.AccessPoint; import com.android.settingslib.wifi.AccessPoint;
/** /**
* An AP preference for the currently connected AP * An AP preference for the currently connected AP.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link ConnectedWifiEntryPreference}.
*/ */
public class ConnectedAccessPointPreference extends LongPressAccessPointPreference implements public class ConnectedAccessPointPreference extends LongPressAccessPointPreference implements
View.OnClickListener { View.OnClickListener {

View File

@@ -23,6 +23,12 @@ import androidx.preference.PreferenceViewHolder;
import com.android.settingslib.wifi.AccessPoint; import com.android.settingslib.wifi.AccessPoint;
import com.android.settingslib.wifi.AccessPointPreference; import com.android.settingslib.wifi.AccessPointPreference;
/**
* An AP preference for the currently connected AP.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link com.android.settingslib.wifi.LongPressWifiEntryPreference}.
*/
public class LongPressAccessPointPreference extends AccessPointPreference { public class LongPressAccessPointPreference extends AccessPointPreference {
private final Fragment mFragment; private final Fragment mFragment;

View File

@@ -86,6 +86,9 @@ import java.util.stream.Collectors;
/** /**
* The class for allowing UIs like {@link WifiDialog} and {@link WifiConfigUiBase} to * The class for allowing UIs like {@link WifiDialog} and {@link WifiConfigUiBase} to
* share the logic for controlling buttons, text fields, etc. * share the logic for controlling buttons, text fields, etc.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link WifiConfigController2}.
*/ */
public class WifiConfigController implements TextWatcher, public class WifiConfigController implements TextWatcher,
AdapterView.OnItemSelectedListener, OnCheckedChangeListener, AdapterView.OnItemSelectedListener, OnCheckedChangeListener,

View File

@@ -22,6 +22,9 @@ import android.widget.Button;
/** /**
* Foundation interface glues between Activities and UIs like {@link WifiDialog}. * Foundation interface glues between Activities and UIs like {@link WifiDialog}.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link WifiConfigUiBase2}.
*/ */
public interface WifiConfigUiBase { public interface WifiConfigUiBase {
@@ -56,4 +59,4 @@ public interface WifiConfigUiBase {
public Button getSubmitButton(); public Button getSubmitButton();
public Button getForgetButton(); public Button getForgetButton();
public Button getCancelButton(); public Button getCancelButton();
} }

View File

@@ -19,7 +19,6 @@ package com.android.settings.wifi;
import android.annotation.StyleRes; import android.annotation.StyleRes;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
@@ -33,6 +32,12 @@ import com.android.settingslib.RestrictedLockUtils;
import com.android.settingslib.RestrictedLockUtilsInternal; import com.android.settingslib.RestrictedLockUtilsInternal;
import com.android.settingslib.wifi.AccessPoint; import com.android.settingslib.wifi.AccessPoint;
/**
* Dialog for users to edit a Wi-Fi network.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link WifiDialog2}.
*/
public class WifiDialog extends AlertDialog implements WifiConfigUiBase, public class WifiDialog extends AlertDialog implements WifiConfigUiBase,
DialogInterface.OnClickListener { DialogInterface.OnClickListener {

View File

@@ -90,6 +90,9 @@ import java.util.List;
* *
* The second is for Setup Wizard, with a simplified interface that hides the action bar * The second is for Setup Wizard, with a simplified interface that hides the action bar
* and menus. * and menus.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in {@link WifiSettings2}.
*/ */
@SearchIndexable @SearchIndexable
public class WifiSettings extends RestrictedSettingsFragment public class WifiSettings extends RestrictedSettingsFragment

View File

@@ -25,11 +25,14 @@ import androidx.preference.Preference;
import com.android.settings.core.BasePreferenceController; import com.android.settings.core.BasePreferenceController;
import com.android.settings.wifi.dpp.WifiDppUtils; import com.android.settings.wifi.dpp.WifiDppUtils;
import com.android.settingslib.wifi.AccessPoint; import com.android.settingslib.wifi.AccessPoint;
/** /**
* {@link BasePreferenceController} that launches Wi-Fi Easy Connect configurator flow * {@link BasePreferenceController} that launches Wi-Fi Easy Connect configurator flow.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.details2.AddDevicePreferenceController2}.
*/ */
public class AddDevicePreferenceController extends BasePreferenceController { public class AddDevicePreferenceController extends BasePreferenceController {

View File

@@ -99,6 +99,10 @@ import java.util.stream.Collectors;
/** /**
* Controller for logic pertaining to displaying Wifi information for the * Controller for logic pertaining to displaying Wifi information for the
* {@link WifiNetworkDetailsFragment}. * {@link WifiNetworkDetailsFragment}.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.details2.WifiDetailPreferenceController2}.
*/ */
public class WifiDetailPreferenceController extends AbstractPreferenceController public class WifiDetailPreferenceController extends AbstractPreferenceController
implements PreferenceControllerMixin, WifiDialogListener, LifecycleObserver, OnPause, implements PreferenceControllerMixin, WifiDialogListener, LifecycleObserver, OnPause,

View File

@@ -31,7 +31,11 @@ import com.android.settings.wifi.WifiDialog;
import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.AbstractPreferenceController;
/** /**
* {@link AbstractPreferenceController} that controls whether the wifi network is metered or not * {@link AbstractPreferenceController} that controls whether the wifi network is metered or not.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.details2.WifiMeteredPreferenceControlle2}.
*/ */
public class WifiMeteredPreferenceController extends BasePreferenceController implements public class WifiMeteredPreferenceController extends BasePreferenceController implements
Preference.OnPreferenceChangeListener, WifiDialog.WifiDialogListener { Preference.OnPreferenceChangeListener, WifiDialog.WifiDialogListener {

View File

@@ -46,6 +46,10 @@ import java.util.List;
* *
* <p>The AccessPoint should be saved to the intent Extras when launching this class via * <p>The AccessPoint should be saved to the intent Extras when launching this class via
* {@link AccessPoint#saveWifiState(Bundle)} in order to properly render this page. * {@link AccessPoint#saveWifiState(Bundle)} in order to properly render this page.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.details2.WifiNetworkDetailsFragment2}.
*/ */
public class WifiNetworkDetailsFragment extends DashboardFragment implements public class WifiNetworkDetailsFragment extends DashboardFragment implements
WifiDialog.WifiDialogListener { WifiDialog.WifiDialogListener {

View File

@@ -33,7 +33,11 @@ import com.android.settingslib.core.AbstractPreferenceController;
/** /**
* {@link AbstractPreferenceController} that controls whether the wifi network is mac randomized * {@link AbstractPreferenceController} that controls whether the wifi network is mac randomized
* or not * or not.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.details2.WifiPrivacyPreferenceController2}.
*/ */
public class WifiPrivacyPreferenceController extends BasePreferenceController implements public class WifiPrivacyPreferenceController extends BasePreferenceController implements
Preference.OnPreferenceChangeListener, WifiDialog.WifiDialogListener { Preference.OnPreferenceChangeListener, WifiDialog.WifiDialogListener {

View File

@@ -35,6 +35,10 @@ import java.util.stream.Collectors;
/** /**
* Controller that manages a PreferenceGroup, which contains a list of saved access points. * Controller that manages a PreferenceGroup, which contains a list of saved access points.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.savedaccesspoints2.SavedAccessPointsPreferenceController2}.
*/ */
public class SavedAccessPointsPreferenceController extends BasePreferenceController implements public class SavedAccessPointsPreferenceController extends BasePreferenceController implements
Preference.OnPreferenceClickListener { Preference.OnPreferenceClickListener {

View File

@@ -34,6 +34,10 @@ import com.android.settingslib.wifi.AccessPointPreference;
/** /**
* UI to manage saved networks/access points. * UI to manage saved networks/access points.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.savedaccesspoints2.SavedAccessPointsWifiSettings2}.
*/ */
public class SavedAccessPointsWifiSettings extends DashboardFragment { public class SavedAccessPointsWifiSettings extends DashboardFragment {

View File

@@ -24,6 +24,10 @@ import java.util.stream.Collectors;
/** /**
* Controller that manages a PreferenceGroup, which contains a list of subscribed access points. * Controller that manages a PreferenceGroup, which contains a list of subscribed access points.
*
* Migrating from Wi-Fi SettingsLib to to WifiTrackerLib, this object will be removed in the near
* future, please develop in
* {@link com.android.settings.wifi.savedaccesspoints2.SubscribedAccessPointsPreferenceController2}.
*/ */
public class SubscribedAccessPointsPreferenceController extends public class SubscribedAccessPointsPreferenceController extends
SavedAccessPointsPreferenceController { SavedAccessPointsPreferenceController {