Snap for 10306978 from decc428857
to udc-release
Change-Id: I48bcab4f28d9750df250f50c6a9b10c75b8a40a7
This commit is contained in:
@@ -131,7 +131,7 @@
|
|||||||
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls related page. [CHAR LIMIT=65] -->
|
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls related page. [CHAR LIMIT=65] -->
|
||||||
<string name="bluetooth_device_controls_title">Hearing device settings</string>
|
<string name="bluetooth_device_controls_title">Hearing device settings</string>
|
||||||
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls related page. [CHAR LIMIT=65] -->
|
<!-- Connected devices settings. Title of the preference to show the entrance of the hearing device controls related page. [CHAR LIMIT=65] -->
|
||||||
<string name="bluetooth_device_controls_summary">Audio output, shortcut, hearing aid compatibility</string>
|
<string name="bluetooth_device_controls_summary">Shortcut, hearing aid compatibility</string>
|
||||||
<!-- Title for this device specific controls section. [CHAR LIMIT=30] -->
|
<!-- Title for this device specific controls section. [CHAR LIMIT=30] -->
|
||||||
<string name="bluetooth_device_controls_specific">For this device</string>
|
<string name="bluetooth_device_controls_specific">For this device</string>
|
||||||
<!-- Connected devices settings. Title of the preference to show the entrance of the audio output page. It can change different types of audio are played on phone or other bluetooth devices. [CHAR LIMIT=35] -->
|
<!-- Connected devices settings. Title of the preference to show the entrance of the audio output page. It can change different types of audio are played on phone or other bluetooth devices. [CHAR LIMIT=35] -->
|
||||||
@@ -2642,6 +2642,8 @@
|
|||||||
<string name="model_info">Model</string>
|
<string name="model_info">Model</string>
|
||||||
<!-- Label for device's hardware revision value [CHAR LIMIT=40] -->
|
<!-- Label for device's hardware revision value [CHAR LIMIT=40] -->
|
||||||
<string name="hardware_revision">Hardware version</string>
|
<string name="hardware_revision">Hardware version</string>
|
||||||
|
<!-- Label for device's manufactured year value [CHAR LIMIT=40] -->
|
||||||
|
<string name="manufactured_year">Manufactured year</string>
|
||||||
<!-- About phone screen, fcc equipment id label [CHAR LIMIT=40] -->
|
<!-- About phone screen, fcc equipment id label [CHAR LIMIT=40] -->
|
||||||
<string name="fcc_equipment_id">Equipment ID</string>
|
<string name="fcc_equipment_id">Equipment ID</string>
|
||||||
<!-- About phone screen, setting option name [CHAR LIMIT=40] -->
|
<!-- About phone screen, setting option name [CHAR LIMIT=40] -->
|
||||||
|
@@ -48,4 +48,13 @@
|
|||||||
settings:controller="com.android.settings.deviceinfo.hardwareinfo.HardwareRevisionPreferenceController"
|
settings:controller="com.android.settings.deviceinfo.hardwareinfo.HardwareRevisionPreferenceController"
|
||||||
settings:enableCopying="true"/>
|
settings:enableCopying="true"/>
|
||||||
|
|
||||||
|
<!-- Manufactured year -->
|
||||||
|
<Preference
|
||||||
|
android:key="hardware_info_manufactured_year"
|
||||||
|
android:title="@string/manufactured_year"
|
||||||
|
android:summary="@string/summary_placeholder"
|
||||||
|
android:selectable="false"
|
||||||
|
settings:controller="com.android.settings.deviceinfo.hardwareinfo.ManufacturedYearPreferenceController"
|
||||||
|
settings:enableCopying="true"/>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -66,6 +66,7 @@ import android.text.TextUtils.TruncateAt;
|
|||||||
import android.util.EventLog;
|
import android.util.EventLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -155,12 +156,12 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
|
|
||||||
mHandler = new Handler(getMainLooper());
|
mHandler = new Handler(getMainLooper());
|
||||||
|
|
||||||
mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
|
mDPM = getSystemService(DevicePolicyManager.class);
|
||||||
mAppOps = (AppOpsManager)getSystemService(Context.APP_OPS_SERVICE);
|
mAppOps = getSystemService(AppOpsManager.class);
|
||||||
mLayoutInflaternflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
mLayoutInflaternflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
PackageManager packageManager = getPackageManager();
|
PackageManager packageManager = getPackageManager();
|
||||||
|
|
||||||
if ((getIntent().getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
|
if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
|
||||||
Log.w(TAG, "Cannot start ADD_DEVICE_ADMIN as a new task");
|
Log.w(TAG, "Cannot start ADD_DEVICE_ADMIN as a new task");
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
@@ -170,7 +171,7 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
EXTRA_CALLED_FROM_SUPPORT_DIALOG, false);
|
EXTRA_CALLED_FROM_SUPPORT_DIALOG, false);
|
||||||
|
|
||||||
String action = getIntent().getAction();
|
String action = getIntent().getAction();
|
||||||
ComponentName who = (ComponentName)getIntent().getParcelableExtra(
|
ComponentName who = (ComponentName) getIntent().getParcelableExtra(
|
||||||
DevicePolicyManager.EXTRA_DEVICE_ADMIN);
|
DevicePolicyManager.EXTRA_DEVICE_ADMIN);
|
||||||
if (who == null) {
|
if (who == null) {
|
||||||
String packageName = getIntent().getStringExtra(EXTRA_DEVICE_ADMIN_PACKAGE_NAME);
|
String packageName = getIntent().getStringExtra(EXTRA_DEVICE_ADMIN_PACKAGE_NAME);
|
||||||
@@ -226,7 +227,7 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
|
PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS);
|
||||||
int count = avail == null ? 0 : avail.size();
|
int count = avail == null ? 0 : avail.size();
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (int i=0; i<count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
ResolveInfo ri = avail.get(i);
|
ResolveInfo ri = avail.get(i);
|
||||||
if (ai.packageName.equals(ri.activityInfo.packageName)
|
if (ai.packageName.equals(ri.activityInfo.packageName)
|
||||||
&& ai.name.equals(ri.activityInfo.name)) {
|
&& ai.name.equals(ri.activityInfo.name)) {
|
||||||
@@ -345,21 +346,21 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
mAdminWarning.setText(
|
mAdminWarning.setText(
|
||||||
mDPM.getResources().getString(NEW_DEVICE_ADMIN_WARNING_SIMPLIFIED, () ->
|
mDPM.getResources().getString(NEW_DEVICE_ADMIN_WARNING_SIMPLIFIED, () ->
|
||||||
getString(R.string.device_admin_warning_simplified,
|
getString(R.string.device_admin_warning_simplified,
|
||||||
profileOwnerName), profileOwnerName));
|
profileOwnerName), profileOwnerName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setContentView(R.layout.device_admin_add);
|
setContentView(R.layout.device_admin_add);
|
||||||
|
|
||||||
mAdminIcon = (ImageView)findViewById(R.id.admin_icon);
|
mAdminIcon = (ImageView) findViewById(R.id.admin_icon);
|
||||||
mAdminName = (TextView)findViewById(R.id.admin_name);
|
mAdminName = (TextView) findViewById(R.id.admin_name);
|
||||||
mAdminDescription = (TextView)findViewById(R.id.admin_description);
|
mAdminDescription = (TextView) findViewById(R.id.admin_description);
|
||||||
mProfileOwnerWarning = (TextView) findViewById(R.id.profile_owner_warning);
|
mProfileOwnerWarning = (TextView) findViewById(R.id.profile_owner_warning);
|
||||||
|
|
||||||
mProfileOwnerWarning.setText(
|
mProfileOwnerWarning.setText(
|
||||||
mDPM.getResources().getString(SET_PROFILE_OWNER_POSTSETUP_WARNING,
|
mDPM.getResources().getString(SET_PROFILE_OWNER_POSTSETUP_WARNING,
|
||||||
() -> getString(R.string.adding_profile_owner_warning)));
|
() -> getString(R.string.adding_profile_owner_warning)));
|
||||||
|
|
||||||
mAddMsg = (TextView)findViewById(R.id.add_msg);
|
mAddMsg = (TextView) findViewById(R.id.add_msg);
|
||||||
mAddMsgExpander = (ImageView) findViewById(R.id.add_msg_expander);
|
mAddMsgExpander = (ImageView) findViewById(R.id.add_msg_expander);
|
||||||
final View.OnClickListener onClickListener = new View.OnClickListener() {
|
final View.OnClickListener onClickListener = new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -380,7 +381,7 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
boolean hideMsgExpander = mAddMsg.getLineCount() <= maxLines;
|
boolean hideMsgExpander = mAddMsg.getLineCount() <= maxLines;
|
||||||
mAddMsgExpander.setVisibility(hideMsgExpander ? View.GONE : View.VISIBLE);
|
mAddMsgExpander.setVisibility(hideMsgExpander ? View.GONE : View.VISIBLE);
|
||||||
if (hideMsgExpander) {
|
if (hideMsgExpander) {
|
||||||
((View)mAddMsgExpander.getParent()).invalidate();
|
((View) mAddMsgExpander.getParent()).invalidate();
|
||||||
}
|
}
|
||||||
mAddMsg.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
mAddMsg.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
}
|
}
|
||||||
@@ -398,7 +399,7 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
mCancelButton.setOnClickListener(new View.OnClickListener() {
|
mCancelButton.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
EventLog.writeEvent(EventLogTags.EXP_DET_DEVICE_ADMIN_DECLINED_BY_USER,
|
EventLog.writeEvent(EventLogTags.EXP_DET_DEVICE_ADMIN_DECLINED_BY_USER,
|
||||||
mDeviceAdmin.getActivityInfo().applicationInfo.uid);
|
mDeviceAdmin.getActivityInfo().applicationInfo.uid);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -420,58 +421,64 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity {
|
|||||||
|
|
||||||
final View restrictedAction = findViewById(R.id.restricted_action);
|
final View restrictedAction = findViewById(R.id.restricted_action);
|
||||||
restrictedAction.setFilterTouchesWhenObscured(true);
|
restrictedAction.setFilterTouchesWhenObscured(true);
|
||||||
restrictedAction.setOnClickListener(new View.OnClickListener() {
|
|
||||||
public void onClick(View v) {
|
final View.OnClickListener restrictedActionClickListener = v -> {
|
||||||
if (!mActionButton.isEnabled()) {
|
if (!mActionButton.isEnabled()) {
|
||||||
showPolicyTransparencyDialogIfRequired();
|
showPolicyTransparencyDialogIfRequired();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
if (mAdding) {
|
|
||||||
addAndFinish();
|
|
||||||
} else if (isManagedProfile(mDeviceAdmin)
|
|
||||||
&& mDeviceAdmin.getComponent().equals(mDPM.getProfileOwner())) {
|
|
||||||
final int userId = UserHandle.myUserId();
|
|
||||||
UserDialogs.createRemoveDialog(DeviceAdminAdd.this, userId,
|
|
||||||
new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
UserManager um = UserManager.get(DeviceAdminAdd.this);
|
|
||||||
um.removeUser(userId);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
).show();
|
|
||||||
} else if (mUninstalling) {
|
|
||||||
mDPM.uninstallPackageWithActiveAdmins(mDeviceAdmin.getPackageName());
|
|
||||||
finish();
|
|
||||||
} else if (!mWaitingForRemoveMsg) {
|
|
||||||
try {
|
|
||||||
// Don't allow the admin to put a dialog up in front
|
|
||||||
// of us while we interact with the user.
|
|
||||||
ActivityManager.getService().stopAppSwitches();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
}
|
|
||||||
mWaitingForRemoveMsg = true;
|
|
||||||
mDPM.getRemoveWarning(mDeviceAdmin.getComponent(),
|
|
||||||
new RemoteCallback(new RemoteCallback.OnResultListener() {
|
|
||||||
@Override
|
|
||||||
public void onResult(Bundle result) {
|
|
||||||
CharSequence msg = result != null
|
|
||||||
? result.getCharSequence(
|
|
||||||
DeviceAdminReceiver.EXTRA_DISABLE_WARNING)
|
|
||||||
: null;
|
|
||||||
continueRemoveAction(msg);
|
|
||||||
}
|
|
||||||
}, mHandler));
|
|
||||||
// Don't want to wait too long.
|
|
||||||
getWindow().getDecorView().getHandler().postDelayed(new Runnable() {
|
|
||||||
@Override public void run() {
|
|
||||||
continueRemoveAction(null);
|
|
||||||
}
|
|
||||||
}, 2*1000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (mAdding) {
|
||||||
|
addAndFinish();
|
||||||
|
} else if (isManagedProfile(mDeviceAdmin)
|
||||||
|
&& mDeviceAdmin.getComponent().equals(mDPM.getProfileOwner())) {
|
||||||
|
final int userId = UserHandle.myUserId();
|
||||||
|
UserDialogs.createRemoveDialog(DeviceAdminAdd.this, userId,
|
||||||
|
new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
UserManager um = UserManager.get(DeviceAdminAdd.this);
|
||||||
|
um.removeUser(userId);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).show();
|
||||||
|
} else if (mUninstalling) {
|
||||||
|
mDPM.uninstallPackageWithActiveAdmins(mDeviceAdmin.getPackageName());
|
||||||
|
finish();
|
||||||
|
} else if (!mWaitingForRemoveMsg) {
|
||||||
|
try {
|
||||||
|
// Don't allow the admin to put a dialog up in front
|
||||||
|
// of us while we interact with the user.
|
||||||
|
ActivityManager.getService().stopAppSwitches();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
|
mWaitingForRemoveMsg = true;
|
||||||
|
mDPM.getRemoveWarning(mDeviceAdmin.getComponent(),
|
||||||
|
new RemoteCallback(new RemoteCallback.OnResultListener() {
|
||||||
|
@Override
|
||||||
|
public void onResult(Bundle result) {
|
||||||
|
CharSequence msg = result != null
|
||||||
|
? result.getCharSequence(
|
||||||
|
DeviceAdminReceiver.EXTRA_DISABLE_WARNING)
|
||||||
|
: null;
|
||||||
|
continueRemoveAction(msg);
|
||||||
|
}
|
||||||
|
}, mHandler));
|
||||||
|
// Don't want to wait too long.
|
||||||
|
getWindow().getDecorView().getHandler().postDelayed(
|
||||||
|
() -> continueRemoveAction(null), 2 * 1000);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
restrictedAction.setOnKeyListener((view, keyCode, keyEvent) -> {
|
||||||
|
if ((keyEvent.getFlags() & KeyEvent.FLAG_FROM_SYSTEM) == 0) {
|
||||||
|
Log.e(TAG, "Can not activate device-admin with KeyEvent from non-system app.");
|
||||||
|
// Consume event to suppress click.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Fallback to view click handler.
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
restrictedAction.setOnClickListener(restrictedActionClickListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 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.deviceinfo.hardwareinfo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Feature provider for hardware info
|
||||||
|
*/
|
||||||
|
interface HardwareInfoFeatureProvider {
|
||||||
|
/**
|
||||||
|
* Returns the manufactured year
|
||||||
|
*/
|
||||||
|
val manufacturedYear: String?
|
||||||
|
}
|
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 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.deviceinfo.hardwareinfo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Feature provider for hardware info
|
||||||
|
*/
|
||||||
|
object HardwareInfoFeatureProviderImpl : HardwareInfoFeatureProvider {
|
||||||
|
override val manufacturedYear: String?
|
||||||
|
get() = null
|
||||||
|
}
|
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 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.deviceinfo.hardwareinfo
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.android.settings.core.BasePreferenceController
|
||||||
|
import com.android.settings.overlay.FeatureFactory
|
||||||
|
|
||||||
|
/** Preference controller for Manufactured Year. */
|
||||||
|
class ManufacturedYearPreferenceController(context: Context, preferenceKey: String) :
|
||||||
|
BasePreferenceController(context, preferenceKey) {
|
||||||
|
private val year: String? =
|
||||||
|
FeatureFactory.getFactory(context).hardwareInfoFeatureProvider.manufacturedYear
|
||||||
|
|
||||||
|
override fun getAvailabilityStatus(): Int =
|
||||||
|
if (!year.isNullOrEmpty()) AVAILABLE else UNSUPPORTED_ON_DEVICE
|
||||||
|
|
||||||
|
override fun getSummary(): CharSequence = year ?: ""
|
||||||
|
}
|
@@ -33,6 +33,7 @@ import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider;
|
|||||||
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
||||||
import com.android.settings.dashboard.DashboardFeatureProvider;
|
import com.android.settings.dashboard.DashboardFeatureProvider;
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProvider;
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
||||||
@@ -109,6 +110,11 @@ public abstract class FeatureFactory {
|
|||||||
*/
|
*/
|
||||||
public abstract SuggestionFeatureProvider getSuggestionFeatureProvider();
|
public abstract SuggestionFeatureProvider getSuggestionFeatureProvider();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves implementation for Hardware Info feature.
|
||||||
|
*/
|
||||||
|
public abstract HardwareInfoFeatureProvider getHardwareInfoFeatureProvider();
|
||||||
|
|
||||||
public abstract SupportFeatureProvider getSupportFeatureProvider(Context context);
|
public abstract SupportFeatureProvider getSupportFeatureProvider(Context context);
|
||||||
|
|
||||||
public abstract MetricsFeatureProvider getMetricsFeatureProvider();
|
public abstract MetricsFeatureProvider getMetricsFeatureProvider();
|
||||||
|
@@ -47,6 +47,8 @@ import com.android.settings.dashboard.DashboardFeatureProvider;
|
|||||||
import com.android.settings.dashboard.DashboardFeatureProviderImpl;
|
import com.android.settings.dashboard.DashboardFeatureProviderImpl;
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProviderImpl;
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProviderImpl;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProviderImpl;
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProviderImpl;
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProviderImpl;
|
||||||
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
||||||
@@ -115,6 +117,11 @@ public class FeatureFactoryImpl extends FeatureFactory {
|
|||||||
private AdvancedVpnFeatureProvider mAdvancedVpnFeatureProvider;
|
private AdvancedVpnFeatureProvider mAdvancedVpnFeatureProvider;
|
||||||
private WifiFeatureProvider mWifiFeatureProvider;
|
private WifiFeatureProvider mWifiFeatureProvider;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HardwareInfoFeatureProvider getHardwareInfoFeatureProvider() {
|
||||||
|
return HardwareInfoFeatureProviderImpl.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupportFeatureProvider getSupportFeatureProvider(Context context) {
|
public SupportFeatureProvider getSupportFeatureProvider(Context context) {
|
||||||
return null;
|
return null;
|
||||||
|
@@ -31,6 +31,8 @@ import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider;
|
|||||||
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
||||||
import com.android.settings.dashboard.DashboardFeatureProvider;
|
import com.android.settings.dashboard.DashboardFeatureProvider;
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProviderImpl;
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
||||||
@@ -287,6 +289,11 @@ public class FakeFeatureFactory extends FeatureFactory {
|
|||||||
return mAccessibilityMetricsFeatureProvider;
|
return mAccessibilityMetricsFeatureProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HardwareInfoFeatureProvider getHardwareInfoFeatureProvider() {
|
||||||
|
return HardwareInfoFeatureProviderImpl.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AdvancedVpnFeatureProvider getAdvancedVpnFeatureProvider() {
|
public AdvancedVpnFeatureProvider getAdvancedVpnFeatureProvider() {
|
||||||
return mAdvancedVpnFeatureProvider;
|
return mAdvancedVpnFeatureProvider;
|
||||||
|
@@ -27,6 +27,7 @@ import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider
|
|||||||
import com.android.settings.bluetooth.BluetoothFeatureProvider
|
import com.android.settings.bluetooth.BluetoothFeatureProvider
|
||||||
import com.android.settings.dashboard.DashboardFeatureProvider
|
import com.android.settings.dashboard.DashboardFeatureProvider
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProvider
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider
|
||||||
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider
|
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider
|
||||||
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider
|
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider
|
||||||
@@ -175,6 +176,10 @@ class FakeFeatureFactory : FeatureFactory() {
|
|||||||
TODO("Not yet implemented")
|
TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getHardwareInfoFeatureProvider(): HardwareInfoFeatureProvider {
|
||||||
|
TODO("Not yet implemented")
|
||||||
|
}
|
||||||
|
|
||||||
override fun getAdvancedVpnFeatureProvider(): AdvancedVpnFeatureProvider {
|
override fun getAdvancedVpnFeatureProvider(): AdvancedVpnFeatureProvider {
|
||||||
TODO("Not yet implemented")
|
TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,8 @@ import com.android.settings.biometrics2.factory.BiometricsRepositoryProvider;
|
|||||||
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
import com.android.settings.bluetooth.BluetoothFeatureProvider;
|
||||||
import com.android.settings.dashboard.DashboardFeatureProvider;
|
import com.android.settings.dashboard.DashboardFeatureProvider;
|
||||||
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProvider;
|
||||||
|
import com.android.settings.deviceinfo.hardwareinfo.HardwareInfoFeatureProviderImpl;
|
||||||
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
import com.android.settings.enterprise.EnterprisePrivacyFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
import com.android.settings.fuelgauge.BatterySettingsFeatureProvider;
|
||||||
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
import com.android.settings.fuelgauge.BatteryStatusFeatureProvider;
|
||||||
@@ -273,6 +275,11 @@ public class FakeFeatureFactory extends FeatureFactory {
|
|||||||
return mAccessibilityMetricsFeatureProvider;
|
return mAccessibilityMetricsFeatureProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HardwareInfoFeatureProvider getHardwareInfoFeatureProvider() {
|
||||||
|
return HardwareInfoFeatureProviderImpl.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AdvancedVpnFeatureProvider getAdvancedVpnFeatureProvider() {
|
public AdvancedVpnFeatureProvider getAdvancedVpnFeatureProvider() {
|
||||||
return mAdvancedVpnFeatureProvider;
|
return mAdvancedVpnFeatureProvider;
|
||||||
|
Reference in New Issue
Block a user