+++ /dev/null
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.bluetooth;
-
-/**
- * Feature provider for bluetooth feature
- */
-public interface BluetoothFeatureProvider {
- /**
- * @return whether additional pairing page is enabled
- */
- boolean isPairingPageEnabled();
-
- /**
- * @return whether device details should be shown as a separate page (true) or a dialog (false)
- */
- boolean isDeviceDetailPageEnabled();
-}
+++ /dev/null
-package com.android.settings.bluetooth;
-
-/**
- * Impl for bluetooth feature provider
- */
-public class BluetoothFeatureProviderImpl implements BluetoothFeatureProvider {
-
- @Override
- public boolean isPairingPageEnabled() {
- return false;
- }
-
- @Override
- public boolean isDeviceDetailPageEnabled() {
- return false;
- }
-}
\ No newline at end of file
import com.android.settings.R;
import com.android.settings.accounts.AccountFeatureProvider;
import com.android.settings.applications.ApplicationFeatureProvider;
-import com.android.settings.bluetooth.BluetoothFeatureProvider;
import com.android.settings.dashboard.DashboardFeatureProvider;
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
public abstract UserFeatureProvider getUserFeatureProvider(Context context);
- public abstract BluetoothFeatureProvider getBluetoothFeatureProvider(Context context);
-
public abstract SlicesFeatureProvider getSlicesFeatureProvider();
public abstract AccountFeatureProvider getAccountFeatureProvider();
import android.net.ConnectivityManager;
import android.os.UserManager;
+import androidx.annotation.Keep;
+
import com.android.settings.accounts.AccountFeatureProvider;
import com.android.settings.accounts.AccountFeatureProviderImpl;
import com.android.settings.applications.ApplicationFeatureProvider;
import com.android.settings.applications.ApplicationFeatureProviderImpl;
-import com.android.settings.bluetooth.BluetoothFeatureProvider;
-import com.android.settings.bluetooth.BluetoothFeatureProviderImpl;
import com.android.settings.connecteddevice.dock.DockUpdaterFeatureProviderImpl;
import com.android.settings.dashboard.DashboardFeatureProvider;
import com.android.settings.dashboard.DashboardFeatureProviderImpl;
import com.android.settings.users.UserFeatureProviderImpl;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
-import androidx.annotation.Keep;
-
/**
* {@link FeatureFactory} implementation for AOSP Settings.
*/
private PowerUsageFeatureProvider mPowerUsageFeatureProvider;
private AssistGestureFeatureProvider mAssistGestureFeatureProvider;
private UserFeatureProvider mUserFeatureProvider;
- private BluetoothFeatureProvider mBluetoothFeatureProvider;
private SlicesFeatureProvider mSlicesFeatureProvider;
private AccountFeatureProvider mAccountFeatureProvider;
private DeviceIndexFeatureProviderImpl mDeviceIndexFeatureProvider;
}
@Override
- public BluetoothFeatureProvider getBluetoothFeatureProvider(Context context) {
- if (mBluetoothFeatureProvider == null) {
- mBluetoothFeatureProvider = new BluetoothFeatureProviderImpl();
- }
- return mBluetoothFeatureProvider;
- }
-
- @Override
public AssistGestureFeatureProvider getAssistGestureFeatureProvider() {
if (mAssistGestureFeatureProvider == null) {
mAssistGestureFeatureProvider = new AssistGestureFeatureProviderImpl();
import com.android.settings.accounts.AccountFeatureProvider;
import com.android.settings.applications.ApplicationFeatureProvider;
-import com.android.settings.bluetooth.BluetoothFeatureProvider;
import com.android.settings.dashboard.DashboardFeatureProvider;
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
public final SuggestionFeatureProvider suggestionsFeatureProvider;
public final UserFeatureProvider userFeatureProvider;
public final AssistGestureFeatureProvider assistGestureFeatureProvider;
- public final BluetoothFeatureProvider bluetoothFeatureProvider;
public final AccountFeatureProvider mAccountFeatureProvider;
public final DeviceIndexFeatureProvider deviceIndexFeatureProvider;
suggestionsFeatureProvider = mock(SuggestionFeatureProvider.class);
userFeatureProvider = mock(UserFeatureProvider.class);
assistGestureFeatureProvider = mock(AssistGestureFeatureProvider.class);
- bluetoothFeatureProvider = mock(BluetoothFeatureProvider.class);
slicesFeatureProvider = mock(SlicesFeatureProvider.class);
mAccountFeatureProvider = mock(AccountFeatureProvider.class);
deviceIndexFeatureProvider = mock(DeviceIndexFeatureProvider.class);
}
@Override
- public BluetoothFeatureProvider getBluetoothFeatureProvider(Context context) {
- return bluetoothFeatureProvider;
- }
-
- @Override
public AssistGestureFeatureProvider getAssistGestureFeatureProvider() {
return assistGestureFeatureProvider;
}