import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentTransaction;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.ListPreference;
-import androidx.preference.ListPreferenceDialogFragment;
public class CustomListPreference extends ListPreference {
import java.util.ArrayList;
import java.util.List;
-import androidx.preference.ListPreferenceDialogFragment;
import androidx.preference.PreferenceViewHolder;
public class RestrictedListPreference extends CustomListPreference {
import android.app.ActionBar;
import android.app.ActivityManager;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.widget.Button;
import android.widget.Toolbar;
-import androidx.annotation.VisibleForTesting;
-import androidx.localbroadcastmanager.content.LocalBroadcastManager;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.PreferenceManager;
-
import com.android.internal.util.ArrayUtils;
import com.android.settings.Settings.WifiSettingsActivity;
import com.android.settings.applications.manageapplications.ManageApplications;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+import androidx.localbroadcastmanager.content.LocalBroadcastManager;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceFragment;
+import androidx.preference.PreferenceManager;
+
public class SettingsActivity extends SettingsBaseActivity
implements PreferenceManager.OnPreferenceTreeClickListener,
package com.android.settings;
import android.app.Activity;
-import android.app.LoaderManager;
import android.content.ActivityNotFoundException;
import android.content.ContentResolver;
import android.content.Intent;
-import android.content.Loader;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemProperties;
import androidx.annotation.VisibleForTesting;
import androidx.core.content.FileProvider;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
/**
* The "dialog" that shows from "License" in the Settings app.
import android.app.Activity;
import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.XmlRes;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceScreen;
import android.annotation.Nullable;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
import java.util.SortedMap;
import java.util.TreeMap;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
public class UserCredentialsSettings extends SettingsPreferenceFragment
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.AppGlobals;
-import android.app.Fragment;
import android.app.IActivityManager;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManager;
import java.util.Locale;
import androidx.annotation.StringRes;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import com.android.settingslib.core.instrumentation.Instrumentable;
import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
public class AccessibilitySettingsForSetupWizardActivity extends SettingsActivity {
import com.android.settings.core.TogglePreferenceController;
import androidx.annotation.VisibleForTesting;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceScreen;
public class ColorInversionPreferenceController extends TogglePreferenceController {
@VisibleForTesting
import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.Activity;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import java.util.List;
import java.util.Map;
+import androidx.fragment.app.Fragment;
+
/**
* Fragment for picking accessibility shortcut service
*/
import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnResume;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
public class AccountHeaderPreferenceController extends AbstractPreferenceController
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceScreen;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import java.io.IOException;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceScreen;
public class RemoveAccountPreferenceController extends AbstractPreferenceController
import android.app.Activity;
import android.app.Application;
-import android.app.Fragment;
import android.content.Context;
import android.provider.SearchIndexableResource;
import java.util.Arrays;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@SearchIndexable
public class AppAndNotificationDashboardFragment extends DashboardFragment {
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import java.util.ArrayList;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
+
public abstract class AppInfoBase extends SettingsPreferenceFragment
implements ApplicationsState.Callbacks {
import android.app.AlertDialog;
import android.app.AppGlobals;
import android.app.GrantedUriPermission;
-import android.app.LoaderManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.Loader;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageDataObserver;
import android.content.pm.PackageManager;
import java.util.TreeMap;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
.SETTINGS_APP_NOTIF_CATEGORY;
import android.app.Application;
-import android.app.Fragment;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
import android.content.Context;
import java.util.Set;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import android.app.AlertDialog;
import android.app.ApplicationErrorReport;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import java.util.ArrayList;
import java.util.Collections;
+import androidx.fragment.app.DialogFragment;
+
public class RunningServiceDetails extends InstrumentedFragment
implements RunningState.OnRefreshUiListener {
static final String TAG = "RunningServicesDetails";
package com.android.settings.applications.appinfo;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.content.pm.PackageInfo;
import android.os.BatteryStats;
import android.os.Bundle;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.app.Activity;
import android.app.ActivityManager;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceScreen;
/**
package com.android.settings.applications.appinfo;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.net.INetworkStatsService;
import android.net.INetworkStatsSession;
import android.net.NetworkTemplate;
import com.android.settingslib.net.ChartDataLoader;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
package com.android.settings.applications.appinfo;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.os.UserHandle;
import com.android.settingslib.core.lifecycle.events.OnResume;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
public class AppStoragePreferenceController extends AppInfoPreferenceControllerBase
package com.android.settings.applications.appinfo;
-import android.app.DialogFragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import java.util.List;
+import androidx.fragment.app.DialogFragment;
import androidx.preference.PreferenceScreen;
public class InstantAppButtonsPreferenceController extends BasePreferenceController implements
package com.android.settings.applications.appops;
import android.app.AppOpsManager;
-import android.app.ListFragment;
-import android.app.LoaderManager;
-import android.content.AsyncTaskLoader;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.Loader;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import java.util.List;
+import androidx.fragment.app.ListFragment;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.AsyncTaskLoader;
+import androidx.loader.content.Loader;
+
public class AppOpsCategory extends ListFragment implements
LoaderManager.LoaderCallbacks<List<AppOpEntry>> {
package com.android.settings.applications.appops;
import android.annotation.Nullable;
-import android.app.FragmentTransaction;
import android.os.Bundle;
import android.preference.PreferenceFrameLayout;
import android.view.LayoutInflater;
import com.android.settings.R;
import com.android.settings.core.InstrumentedPreferenceFragment;
+import androidx.fragment.app.FragmentTransaction;
+
public class BackgroundCheckSummary extends InstrumentedPreferenceFragment {
// layout inflater object used to inflate views
private LayoutInflater mInflater;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import com.android.settingslib.applications.DefaultAppInfo;
import com.android.settingslib.widget.CandidateInfo;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
+
/**
* A generic app picker fragment that shows a list of app as radio button group.
*/
package com.android.settings.applications.manageapplications;
-import android.app.Fragment;
+import androidx.fragment.app.Fragment;
/**
* FileViewHolderController handles adapting the AppViewHolder to work as a general purpose
package com.android.settings.applications.manageapplications;
+import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
import static com.android.settings.applications.manageapplications.AppFilterRegistry
.FILTER_APPS_ALL;
import static com.android.settings.applications.manageapplications.AppFilterRegistry
import static com.android.settings.applications.manageapplications.AppFilterRegistry
.FILTER_APPS_WORK;
-import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
-
import android.annotation.Nullable;
import android.annotation.StringRes;
import android.app.Activity;
package com.android.settings.applications.manageapplications;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import java.io.IOException;
import androidx.annotation.WorkerThread;
+import androidx.fragment.app.Fragment;
/**
* MusicViewHolderController controls an Audio/Music file view in the ManageApplications view.
package com.android.settings.applications.manageapplications;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import java.io.IOException;
import androidx.annotation.WorkerThread;
+import androidx.fragment.app.Fragment;
/** PhotosViewHolderController controls an Audio/Music file view in the ManageApplications view. */
public class PhotosViewHolderController implements FileViewHolderController {
import com.android.settings.EventLogTags;
import com.android.settings.R;
import com.android.settings.fuelgauge.BatteryUtils;
-
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.users.UserDialogs;
import com.android.settingslib.RestrictedLockUtils;
package com.android.settings.backup;
import android.app.Activity;
-import android.app.FragmentManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.FragmentManager;
/**
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
-import com.android.settings.SubSettings;
import com.android.settings.Utils;
import com.android.settings.biometrics.BiometricSettings;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import com.android.settings.password.ChooseLockSettingsHelper;
import androidx.annotation.NonNull;
+import androidx.fragment.app.FragmentManager;
public class SetupFingerprintEnrollFindSensor extends FingerprintEnrollFindSensor {
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.core.lifecycle.Lifecycle;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
/**
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
/**
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.core.lifecycle.Lifecycle;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
/**
import com.android.settingslib.widget.FooterPreference;
import com.android.settingslib.widget.FooterPreferenceMixin;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
/**
import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
package com.android.settings.bluetooth;
-import android.app.Fragment;
import android.content.Context;
import android.text.TextUtils;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
public class BluetoothDeviceRenamePreferenceController extends
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
-
import android.util.Log;
+
import com.android.settings.connecteddevice.DevicePreferenceCallback;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
package com.android.settings.core;
import android.annotation.StringRes;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.android.settingslib.core.instrumentation.VisibilityLoggerMixin;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
public class SubSettingLauncher {
package com.android.settings.dashboard;
import android.app.Activity;
-import android.app.LoaderManager;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;
+import androidx.loader.app.LoaderManager;
import androidx.recyclerview.widget.LinearLayoutManager;
public class DashboardSummary extends InstrumentedFragment
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.Settings.NightDisplaySuggestionActivity;
-import com.android.settings.display.NightDisplayPreferenceController;
import com.android.settings.biometrics.fingerprint.FingerprintEnrollSuggestionActivity;
import com.android.settings.biometrics.fingerprint.FingerprintSuggestionActivity;
+import com.android.settings.display.NightDisplayPreferenceController;
import com.android.settings.notification.ZenOnboardingActivity;
import com.android.settings.notification.ZenSuggestionActivity;
import com.android.settings.overlay.FeatureFactory;
import static android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND;
import android.app.Activity;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import com.android.settingslib.net.UidDetailProvider;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import static android.telephony.TelephonyManager.SIM_STATE_READY;
import android.app.ActivityManager;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.content.pm.UserInfo;
import android.graphics.Color;
import android.net.ConnectivityManager;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager.LoaderCallbacks;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
package com.android.settings.datetime.timezone.model;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.os.Bundle;
import com.android.settingslib.utils.AsyncLoader;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+
public class TimeZoneDataLoader extends AsyncLoader<TimeZoneData> {
public TimeZoneDataLoader(Context context) {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.os.Bundle;
import com.android.settings.R;
+import androidx.fragment.app.DialogFragment;
+
/**
* Fragment to warn the user about activating the storage manager.
*/
package com.android.settings.deletionhelper;
-import android.app.FragmentManager;
import android.content.Context;
import android.os.SystemProperties;
import android.provider.Settings;
import com.android.settingslib.Utils;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
/** Handles the logic for flipping the storage management toggle on a {@link SwitchBar}. */
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.PowerManager;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.FragmentManager;
+
public class BluetoothA2dpHwOffloadRebootDialog extends InstrumentedDialogFragment
implements DialogInterface.OnClickListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class ClearAdbKeysWarningDialog extends InstrumentedDialogFragment implements
DialogInterface.OnClickListener, DialogInterface.OnDismissListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class DisableLogPersistWarningDialog extends InstrumentedDialogFragment implements
DialogInterface.OnClickListener, DialogInterface.OnDismissListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class EnableAdbWarningDialog extends InstrumentedDialogFragment implements
DialogInterface.OnClickListener, DialogInterface.OnDismissListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.FragmentManager;
+
public class EnableDevelopmentSettingWarningDialog extends InstrumentedDialogFragment
implements DialogInterface.OnClickListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class EnableOemUnlockSettingWarningDialog extends InstrumentedDialogFragment implements
DialogInterface.OnClickListener, DialogInterface.OnDismissListener {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.os.Bundle;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class OemLockInfoDialog extends InstrumentedDialogFragment {
private static final String TAG = "OemLockInfoDialog";
import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.FeatureFlagUtils;
-import android.util.Log;
import com.android.settings.core.FeatureFlags;
import android.content.Context;
import android.util.FeatureFlagUtils;
-import android.util.Log;
import androidx.preference.SwitchPreference;
package com.android.settings.deviceinfo;
import android.app.Activity;
-import android.app.Fragment;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import com.android.settingslib.core.lifecycle.events.OnResume;
import com.android.settingslib.development.DevelopmentSettingsEnabler;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
*/
package com.android.settings.deviceinfo;
-import android.app.Fragment;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
*/
package com.android.settings.deviceinfo;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.android.settingslib.DeviceInfoUtils;
import com.android.settingslib.core.AbstractPreferenceController;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
public class FeedbackPreferenceController extends AbstractPreferenceController implements
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.search.actionbar.SearchMenuController;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
public class PrivateVolumeForget extends InstrumentedFragment {
@VisibleForTesting
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import java.util.List;
import java.util.Objects;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceGroup;
package com.android.settings.deviceinfo;
import android.app.Activity;
-import android.app.LoaderManager;
import android.app.usage.StorageStatsManager;
import android.content.Context;
-import android.content.Loader;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.UserHandle;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
@SearchIndexable
public class StorageDashboardFragment extends DashboardFragment
package com.android.settings.deviceinfo;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
/**
* StorageProfileFragment is a fragment which shows the storage results for a profile of the
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.FragmentManager;
+
/**
* Warning dialog to let the user know where the device name will be shown before setting it.
*/
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class FirmwareVersionDialogFragment extends InstrumentedDialogFragment {
private static final String TAG = "firmwareVersionDialog";
package com.android.settings.deviceinfo.firmwareversion;
-import android.app.Fragment;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import com.android.settings.core.BasePreferenceController;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
public class FirmwareVersionPreferenceController extends BasePreferenceController {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
public class ImeiInfoDialogFragment extends InstrumentedDialogFragment {
import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA;
-import android.app.Fragment;
import android.content.Context;
import android.telephony.TelephonyManager;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
public class SimStatusDialogFragment extends InstrumentedDialogFragment {
private static final String SIM_SLOT_BUNDLE_KEY = "arg_key_sim_slot";
package com.android.settings.deviceinfo.simstatus;
-import android.app.Fragment;
import android.content.Context;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
package com.android.settings.deviceinfo.storage;
import android.app.ActivityManager;
-import android.app.FragmentManager;
import android.content.Context;
import android.os.SystemProperties;
import android.provider.Settings;
import com.android.settingslib.core.lifecycle.events.OnResume;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceScreen;
public class AutomaticStorageManagementSwitchPreferenceController extends
package com.android.settings.deviceinfo.storage;
-import android.app.Fragment;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import java.util.Map;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.annotation.UserIdInt;
import android.app.Activity;
import android.app.ActivityManager;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.content.pm.PackageManager;
import android.os.BatteryStats;
import android.os.Bundle;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
/**
import com.android.settingslib.core.lifecycle.events.OnStart;
import androidx.annotation.VisibleForTesting;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
/**
import android.app.AlertDialog;
import android.app.AppOpsManager;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.android.settingslib.applications.ApplicationsState.AppEntry;
import com.android.settingslib.fuelgauge.PowerWhitelistBackend;
+import androidx.fragment.app.Fragment;
+
public class HighPowerDetail extends InstrumentedDialogFragment implements OnClickListener,
View.OnClickListener {
import static com.android.settings.fuelgauge.BatteryBroadcastReceiver.BatteryUpdateType;
import android.app.Activity;
-import android.app.LoaderManager;
import android.content.Context;
-import android.content.Loader;
import android.os.Bundle;
import android.os.UserManager;
import android.view.Menu;
import com.android.settings.dashboard.DashboardFragment;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
/**
* Common base class for things that need to show the battery usage graph.
import static com.android.settings.fuelgauge.BatteryBroadcastReceiver.BatteryUpdateType;
import android.app.Activity;
-import android.app.LoaderManager;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.Context;
-import android.content.Loader;
import android.os.BatteryStats;
import android.os.Bundle;
import android.provider.SearchIndexableResource;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.app.LoaderManager.LoaderCallbacks;
+import androidx.loader.content.Loader;
/**
* Displays a list of apps and subsystems that consume power, ordered by how much power was
package com.android.settings.fuelgauge.batterytip.actions;
-import android.app.Fragment;
-
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.fuelgauge.SmartBatterySettings;
import com.android.settingslib.core.instrumentation.Instrumentable;
+import androidx.fragment.app.Fragment;
+
public class SmartBatteryAction extends BatteryTipAction {
private SettingsActivity mSettingsActivity;
private Fragment mFragment;
import android.view.ViewGroup;
import android.widget.Toolbar;
-import androidx.annotation.NonNull;
-
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.SettingsHomepageActivity;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import androidx.annotation.NonNull;
+
public class HomepageFragment extends InstrumentedFragment {
private static final String TAG = "HomepageFragment";
import com.android.settingslib.core.lifecycle.events.OnStop;
import com.android.settingslib.inputmethod.InputMethodAndSubtypeEnablerManager;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
public class InputMethodAndSubtypePreferenceController extends BasePreferenceController implements
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.LoaderManager.LoaderCallbacks;
-import android.content.AsyncTaskLoader;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.Loader;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.InputManager;
import android.hardware.input.InputManager.InputDeviceListener;
import java.util.ArrayList;
import java.util.Collections;
+import androidx.loader.app.LoaderManager.LoaderCallbacks;
+import androidx.loader.content.AsyncTaskLoader;
+import androidx.loader.content.Loader;
+
public class KeyboardLayoutDialogFragment extends InstrumentedDialogFragment
implements InputDeviceListener, LoaderCallbacks<KeyboardLayoutDialogFragment.Keyboards> {
private static final String KEY_INPUT_DEVICE_IDENTIFIER = "inputDeviceIdentifier";
package com.android.settings.inputmethod;
-import android.app.Fragment;
import android.content.Context;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.InputManager;
import java.util.HashMap;
import java.util.Map;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import android.annotation.Nullable;
import android.app.ActionBar;
-import android.app.ListFragment;
-import android.app.LoaderManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.UserDictionary;
import com.android.settingslib.core.instrumentation.Instrumentable;
import com.android.settingslib.core.instrumentation.VisibilityLoggerMixin;
+import androidx.fragment.app.ListFragment;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+
public class UserDictionarySettings extends ListFragment implements Instrumentable,
LoaderManager.LoaderCallbacks<Cursor> {
package com.android.settings.language;
-import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import java.util.TreeSet;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
public class UserDictionaryPreferenceController extends BasePreferenceController {
import static android.os.UserManager.DISALLOW_CONFIG_LOCALE;
import android.app.AlertDialog;
-import android.app.FragmentTransaction;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.LocaleList;
import java.util.List;
import java.util.Locale;
+import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.RecyclerView;
/**
import static android.provider.SettingsSlicesContract.KEY_AIRPLANE_MODE;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.icu.text.ListFormatter;
import android.provider.SearchIndexableResource;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
@SearchIndexable
public class NetworkDashboardFragment extends DashboardFragment implements
package com.android.settings.notification;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import java.util.Map;
import java.util.Set;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
abstract public class AbstractZenModeAutomaticRulePreferenceController extends
import android.app.Activity;
import android.app.Application;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import java.util.List;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
@SearchIndexable
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
public class HeaderPreferenceController extends NotificationPreferenceController
implements PreferenceControllerMixin, LifecycleObserver {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
/**
* Settings screen for managing notification listener permissions
*/
package com.android.settings.notification;
import android.app.Application;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import java.util.Set;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import android.annotation.UserIdInt;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import java.util.List;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceGroup;
import static com.android.settings.widget.EntityHeaderController.PREF_KEY_APP_HEADER;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import com.android.settings.widget.EntityHeaderController;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
public class ZenAutomaticRuleHeaderPreferenceController extends AbstractZenModePreferenceController
implements PreferenceControllerMixin {
package com.android.settings.notification;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.content.Context;
import android.widget.Switch;
import com.android.settings.widget.SwitchBar;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+
public class ZenDeleteRuleDialog extends InstrumentedDialogFragment {
protected static final String TAG = "ZenDeleteRuleDialog";
private static final String EXTRA_ZEN_RULE_NAME = "zen_rule_name";
package com.android.settings.notification;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import com.android.settings.utils.ZenServiceListing;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
package com.android.settings.notification;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.content.Context;
import com.android.settingslib.core.lifecycle.Lifecycle;
import java.util.Map;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
package com.android.settings.notification;
-import android.app.Fragment;
import android.content.Context;
import android.provider.SearchIndexableResource;
import android.service.notification.ConditionProviderService;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@SearchIndexable
public class ZenModeAutomationSettings extends ZenModeSettingsBase {
protected final ManagedServiceSettings.Config CONFIG = getConditionProviderConfig();
package com.android.settings.notification;
-import android.app.FragmentManager;
import android.content.Context;
import android.provider.Settings;
import android.view.View;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
public class ZenModeButtonPreferenceController extends AbstractZenModePreferenceController
package com.android.settings.notification;
-import android.app.FragmentManager;
import android.content.Context;
import com.android.settings.R;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.app.AlertDialog;
import android.app.AutomaticZenRule;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.app.TimePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import java.util.Calendar;
import java.util.List;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceScreen;
import static android.app.NotificationManager.Policy.PRIORITY_CATEGORY_SYSTEM;
import android.app.AutomaticZenRule;
-import android.app.FragmentManager;
import android.app.NotificationManager;
import android.app.NotificationManager.Policy;
import android.content.Context;
import java.util.function.Predicate;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.FragmentManager;
@SearchIndexable
public class ZenModeSettings extends ZenModeSettingsBase {
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+
public class ZenRuleNameDialog extends InstrumentedDialogFragment {
protected static final String TAG = "ZenRuleNameDialog";
private static final String EXTRA_ZEN_RULE_NAME = "zen_rule_name";
package com.android.settings.notification;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import java.util.Map;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceViewHolder;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.app.NotificationManager;
import android.content.Context;
import android.content.DialogInterface;
import java.util.Set;
import java.util.TreeSet;
+import androidx.fragment.app.Fragment;
+
public class ZenRuleSelectionDialog extends InstrumentedDialogFragment {
private static final String TAG = "ZenRuleSelectionDialog";
private static final boolean DEBUG = ZenModeSettings.DEBUG;
import static android.app.admin.DevicePolicyManager.ACTION_SET_NEW_PARENT_PROFILE_PASSWORD;
import static android.app.admin.DevicePolicyManager.ACTION_SET_NEW_PASSWORD;
-
import static com.android.settings.password.ChooseLockPassword.ChooseLockPasswordFragment
.RESULT_FINISHED;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.StringRes;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
import android.app.Activity;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.app.admin.PasswordMetrics;
import android.content.Context;
import java.util.List;
import androidx.annotation.StringRes;
+import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
package com.android.settings.password;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import java.util.Collections;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
/**
* If the user has a lock pattern set already, makes them confirm the existing one.
*
import android.annotation.Nullable;
import android.app.Activity;
-import android.app.Fragment;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManager;
import android.content.Intent;
import com.android.settings.Utils;
import com.android.setupwizardlib.util.WizardManagerHelper;
+import androidx.fragment.app.Fragment;
+
public final class ChooseLockSettingsHelper {
public static final String EXTRA_KEY_TYPE = "type";
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.DialogInterface;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
/**
* A dialog fragment similar to {@link ChooseLockGeneric} where the user can select from a few
* lock screen types.
package com.android.settings.password;
-import android.app.Fragment;
import android.app.KeyguardManager;
import android.os.Bundle;
import android.os.UserManager;
import com.android.settings.SetupWizardUtils;
import com.android.settings.Utils;
+import androidx.fragment.app.Fragment;
+
public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivity {
private static final String STATE_IS_KEYGUARD_LOCKED = "STATE_IS_KEYGUARD_LOCKED";
import android.app.ActivityOptions;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.FragmentManager;
import android.app.IActivityManager;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManager;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.R;
import com.android.settings.Utils;
-import com.android.settings.core.InstrumentedFragment;
import com.android.settings.biometrics.fingerprint.FingerprintUiHelper;
+import com.android.settings.core.InstrumentedFragment;
+
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.FragmentManager;
/**
* Base fragment to be shared for PIN/Pattern/Password confirmation fragments.
package com.android.settings.password;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import java.util.ArrayList;
+import androidx.fragment.app.Fragment;
+
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
// The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
package com.android.settings.password;
-import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
+import androidx.fragment.app.Fragment;
+
/**
* An invisible retained fragment to track lock check result.
*/
package com.android.settings.password;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import com.android.internal.widget.LockPatternUtils;
+import androidx.fragment.app.Fragment;
+
/**
* An invisible retained worker fragment to track the AsyncWork that saves (and optionally
* verifies if a challenge is given) the chosen lock credential (pattern/pin/password).
import com.android.setupwizardlib.GlifPreferenceLayout;
import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
/**
package com.android.settings.password;
import android.app.Activity;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import com.android.settings.password.ChooseLockTypeDialogFragment.OnLockTypeSelectedListener;
import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
/**
* Setup Wizard's version of ChooseLockPassword screen. It inherits the logic and basic structure
package com.android.settings.password;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.android.settings.SetupRedactionInterstitial;
import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
/**
* Setup Wizard's version of ChooseLockPattern screen. It inherits the logic and basic structure
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import androidx.annotation.NonNull;
+import androidx.fragment.app.FragmentManager;
public class SetupSkipDialog extends InstrumentedDialogFragment
implements DialogInterface.OnClickListener {
package com.android.settings.print;
import android.app.Activity;
-import android.app.LoaderManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
-import android.content.Loader;
import android.content.pm.ResolveInfo;
import android.database.DataSetObserver;
import android.graphics.Color;
import java.util.List;
import java.util.Map;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+
/**
* Fragment with print service settings.
*/
import static com.android.settings.print.PrintSettingPreferenceController.shouldShowToUser;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.ActivityNotFoundException;
-import android.content.AsyncTaskLoader;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.content.pm.PackageManager;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import java.util.ArrayList;
import java.util.List;
+import androidx.loader.app.LoaderManager.LoaderCallbacks;
+import androidx.loader.content.AsyncTaskLoader;
+import androidx.loader.content.Loader;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
package com.android.settings.search.actionbar;
import android.annotation.NonNull;
-import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import com.android.settingslib.core.lifecycle.ObservablePreferenceFragment;
import com.android.settingslib.core.lifecycle.events.OnCreateOptionsMenu;
+import androidx.fragment.app.Fragment;
+
public class SearchMenuController implements LifecycleObserver, OnCreateOptionsMenu {
public static final String NEED_SEARCH_ICON_IN_ACTION_BAR = "need_search_icon_in_action_bar";
*/
package com.android.settings.security;
-import android.app.Fragment;
import android.content.Context;
import android.os.UserHandle;
import com.android.settingslib.core.lifecycle.events.OnResume;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceScreen;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.FragmentManager;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.FragmentManager;
+
public class UnificationConfirmationDialog extends InstrumentedDialogFragment {
static final String TAG_UNIFICATION_DIALOG = "unification_dialog";
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.R;
-import com.android.settings.display.TimeoutListPreference;
import com.android.settings.core.PreferenceControllerMixin;
+import com.android.settings.display.TimeoutListPreference;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.security.trustagent.TrustAgentManager;
import com.android.settingslib.RestrictedLockUtils;
package com.android.settings.security.screenlock;
-import android.app.Fragment;
import android.content.Context;
import android.os.UserHandle;
import android.provider.SearchIndexableResource;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@SearchIndexable
public class ScreenLockSettings extends DashboardFragment
implements OwnerInfoPreferenceController.OwnerInfoCallback {
import android.annotation.NonNull;
import android.app.Activity;
-import android.app.Fragment;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import com.android.settingslib.core.lifecycle.ObservablePreferenceFragment;
import com.android.settingslib.core.lifecycle.events.OnCreateOptionsMenu;
+import androidx.fragment.app.Fragment;
+
/**
* A controller that adds help menu to any Settings page.
*/
package com.android.settings.survey;
import android.app.Activity;
-import android.app.Fragment;
import android.content.BroadcastReceiver;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
+import androidx.fragment.app.Fragment;
+
/**
* attaches extra, survey related work to the onResume method of registered observable classes
* in settings. This allows new classes to automatically support settings provided the extend
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settingslib.core.AbstractPreferenceController;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
*/
package com.android.settings.users;
-import android.app.Fragment;
import android.content.Context;
import android.os.UserHandle;
+import androidx.fragment.app.Fragment;
+
public class AutoSyncPersonalDataPreferenceController extends AutoSyncDataPreferenceController {
private static final String TAG = "AutoSyncPersonalData";
*/
package com.android.settings.users;
-import android.app.Fragment;
import android.content.Context;
import android.os.UserHandle;
import com.android.settings.Utils;
+import androidx.fragment.app.Fragment;
+
public class AutoSyncWorkDataPreferenceController extends AutoSyncPersonalDataPreferenceController {
private static final String TAG = "AutoSyncWorkData";
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.UserInfo;
import java.io.File;
+import androidx.fragment.app.Fragment;
+
/**
* This class encapsulates a Dialog for editing the user nickname and photo.
*/
package com.android.settings.users;
import android.app.Activity;
-import android.app.Fragment;
import android.content.ClipData;
import android.content.ContentResolver;
import android.content.Context;
import java.util.List;
import androidx.core.content.FileProvider;
+import androidx.fragment.app.Fragment;
public class EditUserPhotoController {
private static final String TAG = "EditUserPhotoController";
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settings.security.OwnerInfoPreferenceController.OwnerInfoCallback;
+import androidx.fragment.app.Fragment;
+
public class OwnerInfoSettings extends InstrumentedDialogFragment implements OnClickListener {
private static final String TAG_OWNER_INFO = "ownerInfo";
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+
/**
* Fragment wrapper around an {@link AppDialog}.
*/
import android.app.AlertDialog;
import android.app.AppOpsManager;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import java.util.List;
+import androidx.fragment.app.DialogFragment;
import androidx.preference.Preference;
public class AppManagementFragment extends SettingsPreferenceFragment
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.Fragment;
import android.content.DialogInterface;
import android.os.Bundle;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.Fragment;
+
public class ConfirmLockdownFragment extends InstrumentedDialogFragment
implements DialogInterface.OnClickListener {
public interface ConfirmLockdownListener {
import android.annotation.UserIdInt;
import android.app.ActionBar;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
public class EntityHeaderController {
*/
package com.android.settings.wifi;
-import android.app.Fragment;
import android.content.Context;
import com.android.settingslib.wifi.AccessPoint;
import com.android.settingslib.wifi.AccessPointPreference;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceViewHolder;
public class LongPressAccessPointPreference extends AccessPointPreference {
package com.android.settings.wifi;
import android.app.Activity;
-import android.app.Fragment;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import com.android.settings.SettingsActivity;
import com.android.settings.wifi.p2p.WifiP2pSettings;
-import androidx.preference.PreferenceFragment;
-
public class WifiPickerActivity extends SettingsActivity implements ButtonBarHandler {
@Override
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.fragment.app.DialogFragment;
+
/**
* This activity requests users permission to allow scanning even when Wi-Fi is turned off
*/
import static com.android.settings.wifi.ConfigureWifiSettings.WIFI_WAKEUP_REQUEST_CODE;
-import android.app.Fragment;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import com.android.settingslib.core.AbstractPreferenceController;
import androidx.annotation.VisibleForTesting;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
package com.android.settings.wifi.calling;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.os.Bundle;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import java.util.List;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
import androidx.legacy.app.FragmentPagerAdapter;
/**
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import android.app.Activity;
-import android.app.Fragment;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import java.util.stream.Collectors;
import androidx.core.text.BidiFormatter;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import android.os.Handler;
import android.os.ResultReceiver;
import android.provider.Settings;
-import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
package com.android.settings;
import static com.google.common.truth.Truth.assertThat;
-import static org.robolectric.Shadows.shadowOf;
import android.content.Intent;
package com.android.settings;
import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.accounts.Account;
import android.accounts.AccountManager;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.RuntimeEnvironment.application;
-import static org.robolectric.Shadows.shadowOf;
import android.app.KeyguardManager;
import android.content.Intent;
import static org.mockito.Mockito.when;
import android.app.ActivityManager;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Intent;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class SettingsActivityTest {
import static org.mockito.Mockito.when;
import android.app.Dialog;
-import android.app.Fragment;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class SettingsDialogFragmentTest {
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
-import static org.robolectric.Shadows.shadowOf;
import android.app.Application;
import android.content.Intent;
import static com.android.settings.accessibility.ColorInversionPreferenceController.OFF;
import static com.android.settings.accessibility.ColorInversionPreferenceController.ON;
-
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.accounts.Account;
import android.app.Activity;
import org.robolectric.annotation.Implements;
import androidx.lifecycle.LifecycleOwner;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
@RunWith(SettingsRobolectricTestRunner.class)
import org.robolectric.shadows.ShadowApplication;
import androidx.preference.Preference;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import android.accounts.AccountManagerCallback;
import android.accounts.AuthenticatorDescription;
import android.app.Activity;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.ComponentName;
import android.content.Context;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;
-import androidx.preference.PreferenceFragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.when;
import android.app.AppOpsManager;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import java.util.ArrayList;
import java.util.List;
+import androidx.loader.app.LoaderManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.app.ActivityManager;
import android.app.Application;
-import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Intent;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.Fragment;
+
@RunWith(RobolectricTestRunner.class)
public class AppButtonsPreferenceControllerTest {
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.net.ConnectivityManager;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.loader.app.LoaderManager;
import androidx.preference.Preference;
@RunWith(SettingsRobolectricTestRunner.class)
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
package com.android.settings.applications.appinfo;
import static com.google.common.truth.Truth.assertThat;
-import static org.robolectric.Shadows.shadowOf;
import android.app.Application;
import android.content.Intent;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.loader.app.LoaderManager;
import androidx.preference.Preference;
@RunWith(SettingsRobolectricTestRunner.class)
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import org.robolectric.shadows.ShadowDialog;
import org.robolectric.util.FragmentTestUtil;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class ButtonActionDialogFragmentTest {
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
import android.content.Context;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class MusicViewHolderControllerTest {
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class PhotosViewHolderControllerTest {
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.app.Application;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
import java.util.List;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = {BackupSettingsActivityTest.ShadowBackupSettingsHelper.class,
BackupSettingsActivityTest.ShadowUserHandle.class})
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE;
-
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.view.View;
import android.widget.Button;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = SettingsShadowBluetoothDevice.class)
public class BluetoothDetailsButtonsControllerTest extends BluetoothDetailsControllerTestBase {
import org.junit.runner.RunWith;
import org.robolectric.annotation.Config;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
@RunWith(SettingsRobolectricTestRunner.class)
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.graphics.drawable.Drawable;
import android.view.View;
import org.mockito.Mock;
import org.robolectric.annotation.Config;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = {SettingsShadowBluetoothDevice.class, ShadowEntityHeaderController.class})
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
-import android.app.FragmentTransaction;
import android.content.Context;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
package com.android.settings.bluetooth;
import static android.bluetooth.BluetoothDevice.PAIRING_VARIANT_CONSENT;
-
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
package com.android.settings.bluetooth;
-import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.spy;
-import static org.robolectric.Shadows.shadowOf;
import android.content.ContentResolver;
import android.content.Context;
package com.android.settings.connecteddevice.usb;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.verify;
import android.content.Context;
package com.android.settings.connecteddevice.usb;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import android.hardware.usb.UsbManager;
import android.hardware.usb.UsbPort;
import android.os.Handler;
-import androidx.preference.SwitchPreference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceManager;
-import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
+
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceScreen;
+import androidx.preference.SwitchPreference;
@RunWith(SettingsRobolectricTestRunner.class)
public class UsbDetailsPowerRoleControllerTest {
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class SubSettingLauncherTest {
import static com.google.common.truth.Truth.assertWithMessage;
-import android.app.Fragment;
import android.util.ArraySet;
import com.android.settings.core.codeinspection.CodeInspector;
import java.util.List;
import java.util.Set;
+import androidx.fragment.app.Fragment;
+
/**
* {@link CodeInspector} that verifies all fragments implements Instrumentable.
*/
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.app.Activity;
import android.content.ComponentName;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
-import androidx.preference.Preference;
+
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settingslib.drawer.Tile;
import com.android.settingslib.drawer.TileUtils;
-import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.shadows.ShadowApplication;
import org.robolectric.util.ReflectionHelpers;
+import java.util.ArrayList;
+
+import androidx.preference.Preference;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = ShadowUserManager.class)
public class DashboardFeatureProviderImplTest {
package com.android.settings.dashboard;
-import android.app.Fragment;
import android.content.Context;
import com.android.settings.core.BasePreferenceController;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
public class DashboardFragmentSearchIndexProviderInspector {
public static boolean isSharingPreferenceControllers(Class clazz) {
*/
package com.android.settings.dashboard.conditional;
-import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.Fragment;
import android.widget.Filter;
import android.widget.LinearLayout;
import java.util.List;
import java.util.Locale;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = {
RegionSearchPickerTest.ShadowBaseTimeZonePicker.class,
import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import libcore.util.CountryTimeZones;
import libcore.util.CountryTimeZones.TimeZoneMapping;
import libcore.util.CountryZonesFinder;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.Context;
import android.os.SystemProperties;
import android.provider.Settings;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
@RunWith(SettingsRobolectricTestRunner.class)
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.hardware.usb.IUsbManager;
import android.os.RemoteException;
import org.robolectric.annotation.Implements;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.FragmentManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.UserManager;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceScreen;
@RunWith(SettingsRobolectricTestRunner.class)
import static com.google.common.truth.Truth.assertThat;
-import com.android.settings.development.featureflags.FeatureFlagPersistent;
+import android.content.Context;
+import android.os.SystemProperties;
+import android.provider.Settings;
+import android.util.FeatureFlagUtils;
+
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
-
-import android.content.Context;
-import android.os.SystemProperties;
-import android.provider.Settings;
-import android.util.FeatureFlagUtils;
-import android.util.Log;
@RunWith(SettingsRobolectricTestRunner.class)
public class FeatureFlagPersistentTest {
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import android.content.ComponentName;
import static org.mockito.Mockito.verify;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.os.Build;
import android.os.Process;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowUserManager;
+import androidx.fragment.app.Fragment;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Context;
import android.os.Build;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
package com.android.settings.deviceinfo;
import static com.google.common.truth.Truth.assertThat;
-import static org.robolectric.Shadows.shadowOf;
import android.content.ComponentName;
import android.content.Intent;
import static com.google.common.truth.Truth.assertThat;
-import android.app.Fragment;
import android.content.Context;
import android.os.Build;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.Context;
import android.os.UserManager;
import android.telephony.TelephonyManager;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.Context;
import android.os.UserManager;
import android.telephony.TelephonyManager;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.ContentResolver;
import android.content.Context;
import android.os.SystemProperties;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceScreen;
@RunWith(SettingsRobolectricTestRunner.class)
import android.app.UiModeManager;
import android.content.Context;
-import com.android.settings.display.DarkUIPreferenceController;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
package com.android.settings.display;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.mock;
import static org.robolectric.RuntimeEnvironment.application;
-import android.text.TextUtils;
import android.util.AttributeSet;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import android.app.Activity;
import android.app.AppOpsManager;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import java.util.ArrayList;
import java.util.List;
+import androidx.loader.app.LoaderManager;
import androidx.preference.Preference;
import androidx.recyclerview.widget.RecyclerView;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.app.Activity;
import android.content.Context;
import org.robolectric.shadows.ShadowPowerManager;
import androidx.lifecycle.LifecycleOwner;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceScreen;
import androidx.recyclerview.widget.RecyclerView;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
-import android.app.LoaderManager;
import android.content.Context;
import android.os.Bundle;
import java.util.List;
+import androidx.loader.app.LoaderManager;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = ShadowDashboardFragment.class)
public class PowerUsageBaseTest {
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.LoaderManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;
+import androidx.loader.app.LoaderManager;
+
// TODO: Improve this test class so that it starts up the real activity and fragment.
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = {
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
import android.content.Context;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
import android.content.Context;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Context;
import com.android.settings.SettingsActivity;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
import android.content.Context;
*/
package com.android.settings.fuelgauge.batterytip.actions;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify;
import android.app.AppOpsManager;
-import android.content.Context;
import android.util.Pair;
import com.android.internal.logging.nano.MetricsProto;
*/
package com.android.settings.fuelgauge.batterytip.actions;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify;
import android.app.AppOpsManager;
package com.android.settings.fuelgauge.batterytip.detectors;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import com.android.internal.os.BatterySipper;
import com.android.internal.os.BatteryStatsHelper;
-import com.android.settings.fuelgauge.BatteryInfo;
import com.android.settings.fuelgauge.BatteryUtils;
import com.android.settings.fuelgauge.batterytip.AppInfo;
import com.android.settings.fuelgauge.batterytip.BatteryTipPolicy;
package com.android.settings.fuelgauge.batterytip.detectors;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.spy;
import android.content.Context;
package com.android.settings.fuelgauge.batterytip.detectors;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
-import androidx.annotation.IdRes;
-import androidx.preference.Preference;
import com.android.settings.R;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.IdRes;
+import androidx.preference.Preference;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class BatteryTipTest {
package com.android.settings.fuelgauge.batterytip.tips;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.verify;
import android.content.Context;
package com.android.settings.fuelgauge.batterytip.tips;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.verify;
import android.content.Context;
package com.android.settings.fuelgauge.batterytip.tips;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.verify;
import android.content.Context;
import android.os.Parcel;
import com.android.internal.logging.nano.MetricsProto;
-import com.android.settings.R;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
package com.android.settings.fuelgauge.batterytip.tips;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
import com.android.settings.R;
import com.android.settings.fuelgauge.batterytip.AppInfo;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.testutils.shadow.ShadowUtils;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import org.junit.Before;
package com.android.settings.fuelgauge.batterytip.tips;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.verify;
import android.content.Context;
import java.util.ArrayList;
import java.util.List;
-import androidx.preference.PreferenceFragment;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.InputManager;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowApplication;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.mockito.MockitoAnnotations;
import org.robolectric.shadows.ShadowApplication;
-import androidx.preference.PreferenceFragment;
-
@RunWith(SettingsRobolectricTestRunner.class)
public class HeaderPreferenceControllerTest {
import static org.mockito.Mockito.when;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.when;
import android.app.AutomaticZenRule;
-import android.app.Fragment;
import android.app.NotificationManager;
import android.content.Context;
import android.provider.Settings;
import java.util.List;
import java.util.Map;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
import android.app.NotificationManager;
import android.content.ContentResolver;
import android.content.Context;
import org.robolectric.shadows.ShadowApplication;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
import android.app.NotificationManager;
import android.content.ContentResolver;
import android.content.Context;
import org.robolectric.shadows.ShadowApplication;
import org.robolectric.util.ReflectionHelpers;
+import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.verify;
import android.app.AlertDialog;
-import android.app.Fragment;
import android.content.Context;
import com.android.settings.R;
import org.robolectric.shadows.ShadowDialog;
import org.robolectric.util.FragmentTestUtil;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = {ShadowUserManager.class, ShadowUtils.class})
public class ChooseLockTypeDialogFragmentTest {
import static com.google.common.truth.Truth.assertThat;
import android.app.Activity;
-import android.app.FragmentManager;
import com.android.settings.password.ConfirmDeviceCredentialBaseFragment.LastTryDialog;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.robolectric.Robolectric;
import org.robolectric.annotation.Config;
+import androidx.fragment.app.FragmentManager;
+
@RunWith(SettingsRobolectricTestRunner.class)
@Config(shadows = SettingsShadowResources.SettingsShadowTheme.class)
public class ConfirmCredentialTest {
package com.android.settings.password;
import static com.google.common.truth.Truth.assertThat;
-import static org.robolectric.Shadows.shadowOf;
import android.content.ComponentName;
import android.content.Intent;
import static com.google.common.truth.Truth.assertThat;
import static org.robolectric.RuntimeEnvironment.application;
-import static org.robolectric.Shadows.shadowOf;
import android.app.AlertDialog;
import android.content.Intent;
package com.android.settings.password;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import android.app.Activity;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Context;
import com.android.internal.widget.LockPatternUtils;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
-import androidx.preference.PreferenceFragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import static android.util.TypedValue.TYPE_REFERENCE;
import static org.robolectric.RuntimeEnvironment.application;
-import static org.robolectric.Shadows.shadowOf;
import static org.robolectric.shadow.api.Shadow.directlyOn;
import android.annotation.DimenRes;
package com.android.settings.testutils.shadow;
import android.app.Activity;
-import android.app.LoaderManager;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.shadows.ShadowActivity;
+import androidx.loader.app.LoaderManager;
+
/*
* Shadow for {@link Activity} that has LoadManager accessors.
*/
package com.android.settings.testutils.shadow;
import android.app.Activity;
-import android.app.Fragment;
import android.view.View;
import com.android.settings.widget.EntityHeaderController;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
+import androidx.fragment.app.Fragment;
+
@Implements(value = EntityHeaderController.class, callThroughByDefault = false)
public class ShadowEntityHeaderController {
package com.android.settings.testutils.shadow;
-import android.app.Fragment;
-import android.app.FragmentManager;
-
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+
/**
* Override the {@link #setTargetFragment(Fragment, int)} to skip an illegal state exception
* in SDK 26. SDK 26 requires that the target fragment be in the same {@link FragmentManager} as
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.UserInfo;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.SwitchPreference;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.content.pm.UserInfo;
import android.os.UserManager;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.Context;
import android.content.pm.UserInfo;
import android.os.UserHandle;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class AutoSyncWorkDataPreferenceControllerTest {
import android.app.Activity;
import android.content.Context;
-import android.content.pm.UserInfo;
import android.content.SharedPreferences;
+import android.content.pm.UserInfo;
import android.graphics.drawable.Drawable;
import android.os.UserManager;
import android.provider.Settings;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceGroup;
-import androidx.preference.PreferenceManager;
-import androidx.preference.PreferenceScreen;
-
import com.android.settings.R;
import com.android.settings.dashboard.SummaryLoader;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.util.ReflectionHelpers;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceGroup;
+import androidx.preference.PreferenceManager;
+import androidx.preference.PreferenceScreen;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class UserSettingsTest {
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
-import android.app.Fragment;
import android.content.pm.PackageInfo;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class AppDialogFragmentTest {
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.when;
-import static org.robolectric.Shadows.shadowOf;
import android.app.WallpaperManager;
import android.content.Context;
import android.app.ActionBar;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
@RunWith(SettingsRobolectricTestRunner.class)
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.robolectric.RuntimeEnvironment.application;
-import static org.robolectric.Shadows.shadowOf;
import android.graphics.Rect;
import android.widget.FrameLayout;
package com.android.settings.widget;
import static com.google.common.truth.Truth.assertThat;
-
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import android.annotation.NonNull;
import android.app.Activity;
-import android.app.Fragment;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import java.util.ArrayList;
import java.util.List;
+import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import static org.mockito.Mockito.verify;
import android.app.AlertDialog;
-import android.app.Fragment;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
+import androidx.fragment.app.Fragment;
+
@RunWith(SettingsRobolectricTestRunner.class)
public class WifiScanningRequiredFragmentTest {
package com.android.settings.ui;
-import android.content.Context;
-import android.net.wifi.WifiManager;
+import android.metrics.MetricsReader;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.Suppress;
-import android.metrics.MetricsReader;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
public class AccessibilitySettingsTests extends InstrumentationTestCase {
import android.system.helpers.ActivityHelper;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
-import android.text.TextUtils;
import android.util.Log;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-
/** Verifies basic functionality of the About Phone screen */
public class AppsSettingsTests extends InstrumentationTestCase {
private static final boolean LOCAL_LOGV = false;
package com.android.settings.ui;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.content.Context;
import android.content.Intent;
import android.nfc.NfcAdapter;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
@MediumTest
@RunWith(AndroidJUnit4.class)
public class ConnectedDeviceTests {
import android.system.helpers.SettingsHelper;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.Suppress;
public class DataUsageSettingsTests extends InstrumentationTestCase {
import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.RemoteException;
-import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.BySelector;
import android.support.test.uiautomator.Until;
import android.system.helpers.ActivityHelper;
import android.system.helpers.SettingsHelper;
-import android.widget.ListView;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.util.Log;
+import android.widget.ListView;
/** Verifies that you can get to the notification app listing page from the apps & notifications
* page */
package com.android.settings.ui;
-import android.app.NotificationManager;
import android.content.ContentResolver;
-import android.content.Context;
-import android.os.Handler;
import android.os.SystemClock;
import android.provider.Settings;
-import android.service.notification.ZenModeConfig;
-import android.support.test.uiautomator.UiObject2;
-import android.system.helpers.SettingsHelper;
-import android.system.helpers.SettingsHelper.SettingsType;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
+import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
+import android.system.helpers.SettingsHelper;
+import android.system.helpers.SettingsHelper.SettingsType;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.Suppress;
package com.android.settings.ui;
+import static junit.framework.Assert.assertTrue;
+
import android.os.RemoteException;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static junit.framework.Assert.assertTrue;
-
@MediumTest
@RunWith(AndroidJUnit4.class)
public class SyncSettingsTest {
*/
package com.android.settings.ui;
+import static com.android.settings.ui.testutils.SettingsTestUtils.SETTINGS_PACKAGE;
+import static com.android.settings.ui.testutils.SettingsTestUtils.TIMEOUT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.os.RemoteException;
import android.os.SystemProperties;
import android.provider.Settings;
import java.util.TimeZone;
-import static com.android.settings.ui.testutils.SettingsTestUtils.SETTINGS_PACKAGE;
-import static com.android.settings.ui.testutils.SettingsTestUtils.TIMEOUT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
@MediumTest
@RunWith(AndroidJUnit4.class)
public class ZonePickerSettingsTest {
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
package com.android.settings;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.RootMatchers.isDialog;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static junit.framework.Assert.fail;
+
import android.app.Instrumentation;
import android.app.UiAutomation;
import android.content.Context;
import java.io.FileOutputStream;
import java.io.IOException;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.RootMatchers.isDialog;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-import static junit.framework.Assert.fail;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class RegulatoryInfoDisplayActivityTest {
package com.android.settings;
-import com.android.settings.Settings;
-
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
package com.android.settings;
+import static com.android.settings.UserCredentialsSettings.Credential;
+
import android.os.Parcel;
import android.os.Process;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import static com.android.settings.UserCredentialsSettings.Credential;
-
/**
* User credentials settings fragment tests
*
package com.android.settings;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import java.util.ArrayList;
-import java.util.Arrays;
-
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.ArrayList;
+import java.util.Arrays;
+
public class UtilsTest extends AndroidTestCase {
private static final int TEST_PRIMARY_USER_ID = 10;
private static final int TEST_MANAGED_PROFILE_ID = 11;
package com.android.settings.accessibility;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.Matchers.allOf;
-import static org.hamcrest.collection.IsIn.oneOf;
-
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.isChecked;
import static android.support.test.espresso.matcher.ViewMatchers.isNotChecked;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.allOf;
-import android.app.Activity;
import android.app.Instrumentation;
-import android.content.Context;
import android.os.Bundle;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
-import android.support.test.uiautomator.UiSelector;
-import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiScrollable;
+import android.support.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.Test;
*/
package com.android.settings.applications;
+import static android.app.AppOpsManager.MODE_ALLOWED;
+import static android.app.AppOpsManager.MODE_DEFAULT;
+import static android.app.AppOpsManager.MODE_ERRORED;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import android.app.AppOpsManager;
import android.content.Context;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
-import androidx.recyclerview.widget.RecyclerView;
import android.widget.Switch;
import android.widget.TextView;
import java.util.List;
-import static android.app.AppOpsManager.MODE_ALLOWED;
-import static android.app.AppOpsManager.MODE_DEFAULT;
-import static android.app.AppOpsManager.MODE_ERRORED;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import androidx.recyclerview.widget.RecyclerView;
/**
* An abstract parent for testing settings activities that manage an AppOps permission.
package com.android.settings.applications;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.Matchers.allOf;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.provider.Settings;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-import static org.hamcrest.Matchers.allOf;
-
@SmallTest
@RunWith(AndroidJUnit4.class)
public class ManageApplicationsLaunchTest {
package com.android.settings.backup;
+import static com.google.common.truth.Truth.assertThat;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import java.util.List;
-import static com.google.common.truth.Truth.assertThat;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class BackupIntentTest {
import static android.support.test.espresso.intent.Intents.intending;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.text.InputFilter;
import android.text.SpannableStringBuilder;
-import com.android.settings.bluetooth.Utf8ByteLengthFilter;
-
public class Utf8ByteLengthFilterTest extends AndroidTestCase {
@SmallTest
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.os.UserManager;
-import android.platform.test.annotations.Presubmit;
import android.provider.SearchIndexableResource;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import static com.google.common.truth.Truth.assertThat;
import android.app.Activity;
-import android.app.Fragment;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DashboardSummaryInstrumentationTest {
package com.android.settings.dashboard;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
+import static org.hamcrest.Matchers.allOf;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
-
-import static org.hamcrest.Matchers.allOf;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class PreferenceThemeTest {
import static com.google.common.truth.Truth.assertThat;
-import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
package com.android.settings.deviceinfo;
-import android.content.Intent;
import android.content.Context;
-
+import android.content.Intent;
import android.os.storage.VolumeRecord;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
package com.android.settings.deviceinfo;
-import android.support.test.espresso.intent.rule.IntentsTestRule;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnitRunner;
-import com.android.settings.R;
-import com.android.settings.Settings.StorageDashboardActivity;
-import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.intent.Intents.intended;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
+import android.support.test.espresso.intent.rule.IntentsTestRule;
+import android.support.test.filters.SmallTest;
+
+import com.android.settings.R;
+import com.android.settings.Settings.StorageDashboardActivity;
+import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
+
+import org.junit.Rule;
+import org.junit.Test;
+
@SmallTest
public class StorageDashboardFragmentTest {
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.google.common.truth.Truth.assertThat;
import android.app.Instrumentation;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import android.support.test.espresso.intent.Intents;
-
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.android.settings.SettingsActivity.EXTRA_SHOW_FRAGMENT;
-
import static org.hamcrest.Matchers.allOf;
import static org.junit.Assert.fail;
import android.content.Intent;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
+import android.support.test.espresso.intent.Intents;
import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static org.hamcrest.Matchers.allOf;
import static org.junit.Assert.fail;
package com.android.settings;
import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import android.support.test.uiautomator.UiDevice;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.hamcrest.CoreMatchers.not;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
-import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.matcher.ViewMatchers;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
-import static com.google.common.truth.Truth.assertThat;
-
import static org.hamcrest.CoreMatchers.not;
import android.support.test.espresso.action.ViewActions;
import android.print.PrintDocumentInfo;
import android.print.PrintJob;
import android.print.PrintManager;
-import androidx.annotation.NonNull;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import java.io.IOException;
import java.util.UUID;
+import androidx.annotation.NonNull;
+
@RunWith(AndroidJUnit4.class)
public class PrintJobSettingsActivityTest {
private static final String EXTRA_PRINT_JOB_ID = "EXTRA_PRINT_JOB_ID";
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
+
import com.android.settings.tests.unit.R;
public class BluetoothRequestPermissionTest extends Activity {
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.core.IsNot.not;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.test.InstrumentationRegistry;
-import android.support.test.uiautomator.UiDevice;
-
-import org.junit.runner.RunWith;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiSelector;
-import org.junit.Test;
+
import com.android.settings.R;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-import static org.hamcrest.core.IsNot.not;
-import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
+import org.junit.Test;
+import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static junit.framework.Assert.assertEquals;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.os.BatteryManager;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.runner.RunWith;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import org.junit.Test;
+
import com.android.settings.R;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.matcher.ViewMatchers.*;
-import static junit.framework.Assert.assertEquals;
+import org.junit.Test;
+import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
import android.app.Activity;
import android.os.Bundle;
+
import com.android.settings.tests.unit.R;
public class Manufacturer extends Activity {
import android.app.Activity;
import android.os.Bundle;
+
import com.android.settings.tests.unit.R;
public class Operator extends Activity {
*/
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class PrivateVolumeSettingsTest {
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.Until;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
-import android.support.test.uiautomator.UiSelector;
-import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiScrollable;
+import android.support.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.Test;
import static com.android.settings.utils.FileSizeFormatter.GIGABYTE_IN_BYTES;
import static com.android.settings.utils.FileSizeFormatter.MEGABYTE_IN_BYTES;
-
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.os.IBinder;
import android.os.ServiceManager;
-import android.util.Log;
import java.lang.reflect.Field;
import java.util.HashMap;
package com.android.settings.vpn2;
import static com.android.settings.vpn2.AppManagementFragment.appHasVpnPermission;
-
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
package com.android.settings.vpn2;
import static org.mockito.AdditionalMatchers.not;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.argThat;
+import static org.mockito.Mockito.atLeast;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
-import android.content.Context;
-import android.content.Context;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.TextUtils;
import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnProfile;
-import com.android.settings.R;
-import com.android.settings.vpn2.VpnSettings;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.mockito.ArgumentCaptor;
import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
public class PreferenceListTest extends AndroidTestCase {
private static final String TAG = "PreferenceListTest";
import static android.support.test.espresso.matcher.ViewMatchers.isSelected;
import static android.support.test.espresso.matcher.ViewMatchers.withResourceName;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.anything;
import static org.junit.Assert.assertEquals;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.google.common.truth.Truth.assertThat;
-
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
-import static org.mockito.Mockito.atMost;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@RunWith(AndroidJUnit4.class)
public class WifiSettingsUiTest {
private static final String TEST_SSID = "\"Test Ssid\"";
package com.android.settings.wifi.tether;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
import static android.net.ConnectivityManager.EXTRA_ADD_TETHER_TYPE;
import static android.net.ConnectivityManager.EXTRA_PROVISION_CALLBACK;
import static android.net.ConnectivityManager.EXTRA_REM_TETHER_TYPE;
import static android.net.ConnectivityManager.TETHERING_WIFI;
import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
import static android.net.ConnectivityManager.TETHER_ERROR_PROVISION_FAILED;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import android.app.Activity;
import android.app.AlarmManager;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
-import android.content.pm.ResolveInfo;
import android.content.pm.PackageManager;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
+import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
package com.android.settings.wifi.tether;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class WifiTetherSettingsTest {