Clean up AccessibilitySettings

Since AccessibilitySettings has been converted to DashboardFragment, and
those preference controllers are moved to corresponding xml files which
will be loaded statically, so here we are removing those in-code
preference controllers as we no longer need them.

The following controllers will be removed:
ColorInversionPreferenceController
LockScreenRotationPreferenceController
FontSizePreferenceController
MagnificationPreferenceController

There are still some controllers used here. We will remove them soon
once they are all converted to static ones.

Bug: 135056871
Test: manual, robotests
Change-Id: I7897b984b2275e98f958ad65b576dd08aaab3f06
This commit is contained in:
Mill Chen
2019-06-21 21:03:52 +08:00
parent 1a01faa457
commit 2e3d08e8d4
2 changed files with 10 additions and 50 deletions

View File

@@ -25,11 +25,11 @@ import com.android.internal.view.RotationPolicy;
import com.android.internal.view.RotationPolicy.RotationPolicyListener;
import com.android.settings.core.TogglePreferenceController;
import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
import com.android.settingslib.core.lifecycle.events.OnStart;
import com.android.settingslib.core.lifecycle.events.OnStop;
public class LockScreenRotationPreferenceController extends TogglePreferenceController implements
LifecycleObserver, OnPause, OnResume {
LifecycleObserver, OnStart, OnStop {
private Preference mPreference;
private RotationPolicyListener mRotationPolicyListener;
@@ -62,14 +62,14 @@ public class LockScreenRotationPreferenceController extends TogglePreferenceCont
}
@Override
public void onPause() {
public void onStop() {
if (mRotationPolicyListener != null) {
RotationPolicy.unregisterRotationPolicyListener(mContext, mRotationPolicyListener);
}
}
@Override
public void onResume() {
public void onStart() {
if (mRotationPolicyListener == null) {
mRotationPolicyListener = new RotationPolicyListener() {
@Override