Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors. Test: We can't test it now. But we will have an integration test later. Bug: 110259478 Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
This commit is contained in:
@@ -21,7 +21,7 @@ import android.content.Context;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
import com.android.settingslib.widget.FooterPreferenceMixin;
|
||||
import com.android.settingslib.widget.FooterPreferenceMixinCompat;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
@@ -31,14 +31,15 @@ public class MultiUserFooterPreferenceController extends BasePreferenceControlle
|
||||
@VisibleForTesting
|
||||
final UserCapabilities mUserCaps;
|
||||
|
||||
private FooterPreferenceMixin mFooterMixin;
|
||||
private FooterPreferenceMixinCompat mFooterMixin;
|
||||
|
||||
public MultiUserFooterPreferenceController(Context context) {
|
||||
super(context, "dummy_key");
|
||||
mUserCaps = UserCapabilities.create(context);
|
||||
}
|
||||
|
||||
public MultiUserFooterPreferenceController setFooterMixin(FooterPreferenceMixin footerMixin) {
|
||||
public MultiUserFooterPreferenceController setFooterMixin(
|
||||
FooterPreferenceMixinCompat footerMixin) {
|
||||
mFooterMixin = footerMixin;
|
||||
return this;
|
||||
}
|
||||
|
@@ -216,7 +216,7 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
final SwitchBar switchBar = activity.getSwitchBar();
|
||||
mSwitchBarController = new MultiUserSwitchBarController(activity,
|
||||
new SwitchBarController(switchBar), this /* listener */);
|
||||
getLifecycle().addObserver(mSwitchBarController);
|
||||
getSettingsLifecycle().addObserver(mSwitchBarController);
|
||||
switchBar.show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user