Use InputSettings in Settings app
At the moment the settings app will make use of certain exposed functions in InputManager that are being moved to a separate class. This CL migrates those usages to the new internal API. Bug: 267758905 Test: compiles, and should pass presubmit Change-Id: I30dcb83aa1cc8830650fe856775a462ed37c2dda
This commit is contained in:
committed by
Josep del Río
parent
eb8ec1b1e4
commit
8411d1c663
@@ -17,29 +17,25 @@
|
||||
package com.android.settings.inputmethod;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.hardware.input.InputSettings;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class TrackpadTapToClickPreferenceController extends TogglePreferenceController {
|
||||
|
||||
private InputManager mIm;
|
||||
|
||||
public TrackpadTapToClickPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
|
||||
mIm = context.getSystemService(InputManager.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return mIm.useTouchpadTapToClick(mContext);
|
||||
return InputSettings.useTouchpadTapToClick(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
mIm.setTouchpadTapToClick(mContext, isChecked);
|
||||
InputSettings.setTouchpadTapToClick(mContext, isChecked);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user