import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.applications.ProcStatsData;
import com.android.settings.fuelgauge.batterytip.AnomalyConfigJobService;
import com.android.settingslib.net.DataUsageController;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import androidx.annotation.VisibleForTesting;
+
public class SettingsDumpService extends Service {
@VisibleForTesting
static final String KEY_SERVICE = "service";
import android.util.Log;
import android.util.SparseArray;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.AccessiblePreferenceCategory;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import java.util.Comparator;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceGroup;
import android.os.Bundle;
import android.provider.Settings;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.applications.AppStateUsageBridge.UsageState;
import com.android.settings.overlay.FeatureFactory;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.Preference.OnPreferenceClickListener;
import android.view.Window;
import android.view.WindowManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.applications.AppInfoWithHeader;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.applications.ApplicationsState.AppEntry;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.Preference.OnPreferenceClickListener;
private static final String KEY_APP_OPS_SETTINGS_SWITCH = "app_ops_settings_switch";
private static final String LOG_TAG = "DrawOverlayDetails";
- private static final int [] APP_OPS_OP_CODE = {
+ private static final int[] APP_OPS_OP_CODE = {
AppOpsManager.OP_SYSTEM_ALERT_WINDOW
};
logSpecialPermissionChange(newState, mPackageName);
mAppOpsManager.setMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
mPackageInfo.applicationInfo.uid, mPackageName, newState
- ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_ERRORED);
+ ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_ERRORED);
}
@VisibleForTesting
public static CharSequence getSummary(Context context, OverlayState overlayState) {
return context.getString(overlayState.isPermissible() ?
- R.string.app_permission_summary_allowed : R.string.app_permission_summary_not_allowed);
+ R.string.app_permission_summary_allowed
+ : R.string.app_permission_summary_not_allowed);
}
}
import android.os.UserHandle;
import android.provider.Settings;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.AssistUtils;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;
import java.util.Arrays;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.TwoStatePreference;
import android.content.Context;
import android.os.Bundle;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.applications.AppInfoWithHeader;
import com.android.settings.overlay.FeatureFactory;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.SwitchPreference;
import android.util.Pair;
import android.view.View;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.applications.AppInfoBase;
import java.util.Comparator;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceScreen;
import android.provider.SearchIndexableResource;
import android.view.View;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.telephony.SmsUsageMonitor;
import com.android.settings.R;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.DropDownPreference;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import android.provider.Settings;
import android.service.vr.VrListenerService;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
+
@SearchIndexable
public class VrListenerSettings extends ManagedServiceSettings {
private static final String TAG = VrListenerSettings.class.getSimpleName();
import android.graphics.drawable.Drawable;
import android.util.Pair;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.applications.LayoutPreference;
import com.android.settings.widget.EntityHeaderController;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceScreen;
import android.provider.Settings;
import android.widget.Toast;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.widget.SwitchWidgetController;
import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import androidx.annotation.VisibleForTesting;
+
/**
* BluetoothEnabler is a helper to manage the Bluetooth on/off checkbox
* preference. It turns on/off Bluetooth and ensures the summary of the
import android.widget.EditText;
import android.widget.TextView;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+import androidx.annotation.VisibleForTesting;
+
/**
* A dialogFragment used by {@link BluetoothPairingDialog} to create an appropriately styled dialog
* for the bluetooth device.
import android.content.Context;
import android.view.View;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settingslib.core.lifecycle.events.OnStop;
import com.android.settingslib.widget.FooterPreference;
+import androidx.annotation.VisibleForTesting;
+
/**
* PreferenceController to update of bluetooth state. All behavior except managing the footer text
* is delegated to the SwitchWidgetController it uses.
import android.content.DialogInterface;
import android.os.Bundle;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
+import androidx.annotation.VisibleForTesting;
+
/** Implements an AlertDialog for confirming that a user wishes to unpair or "forget" a paired
* device*/
public class ForgetDeviceDialogFragment extends InstrumentedDialogFragment {
import android.content.Context;
import android.os.Bundle;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
+import androidx.annotation.VisibleForTesting;
+
/** Provides a dialog for changing the display name of a remote bluetooth device. */
public class RemoteDeviceNameDialogFragment extends BluetoothNameDialogFragment {
public static final String TAG = "RemoteDeviceName";
import android.graphics.drawable.Drawable;
import android.os.Bundle;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.Utils;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
+
/**
* Provides options for selecting the default USB mode.
*/
import android.content.Context;
import android.os.Handler;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;
import androidx.annotation.UiThread;
+import androidx.annotation.VisibleForTesting;
/**
* This class provides common members and refresh functionality for usb controllers.
import android.widget.NumberPicker;
import android.widget.Spinner;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import android.os.Bundle;
import android.util.AttributeSet;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher;
import com.android.settingslib.net.DataUsageController;
+import androidx.annotation.VisibleForTesting;
import androidx.core.content.res.TypedArrayUtils;
import androidx.preference.Preference;
import android.widget.ProgressBar;
import android.widget.TextView;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceViewHolder;
import android.content.Context;
import android.os.UserHandle;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.applications.AppStateBaseBridge;
import java.util.Set;
import java.util.TreeSet;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.os.SystemProperties;
import android.text.TextUtils;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.development.DeveloperOptionsPreferenceController;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import android.os.ServiceManager;
import android.util.Log;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.ColorDisplayController;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
+import androidx.annotation.VisibleForTesting;
+
public class ColorModePreferenceController extends BasePreferenceController {
private static final String TAG = "ColorModePreference";
import android.content.Context;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.BatteryStatsHelper;
import com.android.settingslib.utils.AsyncLoaderCompat;
+import androidx.annotation.VisibleForTesting;
+
/**
* Loader that can be used by classes to load BatteryInfo in a background thread. This loader will
* automatically grab enhanced battery estimates if available or fall back to the system estimate
import android.widget.Checkable;
import android.widget.TextView;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.applications.AppInfoBase;
import com.android.settingslib.applications.ApplicationsState.AppEntry;
import com.android.settingslib.fuelgauge.PowerWhitelistBackend;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
public class HighPowerDetail extends InstrumentedDialogFragment implements OnClickListener,
import android.os.UserHandle;
import android.util.IconDrawableFactory;
-import com.android.internal.annotations.VisibleForTesting;
+import androidx.annotation.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import android.os.UserHandle;
import android.util.IconDrawableFactory;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.Utils;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.CheckBoxPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import android.os.Parcel;
import android.util.Pair;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.Utils;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
+
/**
* Tip to suggest user to restrict some bad apps
*/
import android.content.Context;
import android.os.Parcel;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.fuelgauge.batterytip.AppInfo;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
+import androidx.annotation.VisibleForTesting;
+
/**
* Tip to suggest user to remove app restriction. This is the empty tip and it is only used in
* {@link com.android.settings.fuelgauge.AdvancedPowerUsageDetail} to create dialog.
import android.content.Context;
import android.provider.Settings;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.util.Log;
import com.android.ims.ImsManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.Utils;
import com.android.settings.slices.SettingsSliceProvider;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import androidx.annotation.VisibleForTesting;
import androidx.core.graphics.drawable.IconCompat;
import androidx.slice.Slice;
import androidx.slice.builders.ListBuilder;
import android.service.notification.ScheduleCalendar;
import android.service.notification.ZenModeConfig;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.os.UserHandle;
import android.os.UserManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.accounts.AccountRestrictionHelper;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settings.core.SliderPreferenceController;
import com.android.settingslib.RestrictedPreference;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
/**
import android.provider.Settings;
import android.service.notification.NotificationListenerService;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
/**
import android.util.IconDrawableFactory;
import android.util.Log;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settingslib.R;
import com.android.settingslib.Utils;
import com.android.settingslib.utils.StringUtil;
import java.util.List;
import java.util.Map;
+import androidx.annotation.VisibleForTesting;
+
public class NotificationBackend {
private static final String TAG = "NotificationBackend";
import android.net.Uri;
import android.os.Handler;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.content.Context;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.notification.VolumeSeekBarPreference.Callback;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
import androidx.preference.PreferenceScreen;
import android.os.UserManager;
import android.provider.Settings;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.DefaultRingtonePreference;
import com.android.settings.R;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.FragmentManager;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import android.util.Log;
import android.view.View;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import java.util.Collections;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceScreen;
import android.provider.Settings;
import android.text.TextUtils;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.provider.Settings;
import android.text.TextUtils;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.provider.Contacts;
import android.provider.ContactsContract;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settingslib.core.lifecycle.Lifecycle;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import android.os.Bundle;
import android.os.UserManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.SettingsActivity;
import com.android.settings.Utils;
import com.android.setupwizardlib.util.WizardManagerHelper;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
public final class ChooseLockSettingsHelper {
import android.os.IBinder;
import android.os.UserManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.Utils;
+import androidx.annotation.VisibleForTesting;
+
/**
* Business logic for {@link SetNewPasswordActivity}.
*
import android.provider.SettingsSlicesContract;
import android.util.Log;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.slices.SettingsSliceProvider;
import com.android.settings.slices.SliceDeepLinkSpringBoard;
import java.util.Collection;
import java.util.concurrent.CountDownLatch;
+import androidx.annotation.VisibleForTesting;
import androidx.slice.Slice;
import androidx.slice.SliceItem;
import androidx.slice.SliceMetadata;
import android.util.Xml;
import android.view.accessibility.AccessibilityManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.accessibility.AccessibilitySettings;
import com.android.settings.accessibility.AccessibilitySlicePreferenceController;
import java.util.List;
import java.util.Set;
+import androidx.annotation.VisibleForTesting;
+
/**
* Converts all Slice sources into {@link SliceData}.
* This includes:
import android.text.TextUtils;
import android.util.Log;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.net.VpnConfig;
import com.android.internal.util.ArrayUtils;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.DialogFragment;
import androidx.preference.Preference;
import android.view.MenuItem;
import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnConfig;
import java.util.Map;
import java.util.Set;
+import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import android.util.AttributeSet;
import android.view.View;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.Utils;
import java.util.Locale;
import androidx.annotation.ColorRes;
+import androidx.annotation.VisibleForTesting;
/**
* DonutView represents a donut graph. It visualizes a certain percentage of fullness with a
import com.android.ims.ImsConfig;
import com.android.ims.ImsManager;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.Utils;
import com.android.settings.slices.SettingsSliceProvider;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import androidx.annotation.VisibleForTesting;
import androidx.core.graphics.drawable.IconCompat;
import androidx.slice.Slice;
import androidx.slice.builders.ListBuilder;
import android.widget.ImageView;
import android.widget.Toast;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.Utils;
import java.util.StringJoiner;
import java.util.stream.Collectors;
+import androidx.annotation.VisibleForTesting;
import androidx.core.text.BidiFormatter;
import androidx.fragment.app.Fragment;
import androidx.preference.Preference;
import android.util.ArrayMap;
import android.util.Log;
-import com.android.internal.annotations.VisibleForTesting;
-
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.VisibleForTesting;
+
public class TetherService extends Service {
private static final String TAG = "TetherService";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);