Revert "Delete SmartAutoRotatePreference and move callback logic to controller"
This reverts commit c69bf78181
.
Reason for revert: b/200111886
Change-Id: I232fef4ddef955223140db606d4ed6a5e8c8caf6
This commit is contained in:
@@ -22,7 +22,6 @@ import static android.provider.Settings.Secure.CAMERA_AUTOROTATE;
|
||||
import static com.android.settings.display.SmartAutoRotateController.hasSufficientPermission;
|
||||
import static com.android.settings.display.SmartAutoRotateController.isRotationResolverServiceAvailable;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -80,16 +79,6 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSliceable() {
|
||||
return TextUtils.equals(getPreferenceKey(), "auto_rotate");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPublicSlice() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
super.displayPreference(screen);
|
||||
@@ -111,7 +100,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
@Override
|
||||
public void onChange() {
|
||||
if (mPreference != null) {
|
||||
updateState(mPreference);
|
||||
refreshSummary(mPreference);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -174,4 +163,4 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
}
|
||||
return mContext.getString(activeStringId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user