Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ce2a538 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Use Context.getSystemService(Class<T>) for InputManager.

This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving InputManager.
Note those are bundled code.  Hence we don't need to make sure
Build.VERSION.SDK_INT >= 23.

Change-Id: Iee47e374e1349720e3100bab33ed139e1f47c169
parent 777ef95e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ public class PointerLocationView extends View implements InputDeviceListener,
        super(c);
        setFocusableInTouchMode(true);

        mIm = (InputManager)c.getSystemService(Context.INPUT_SERVICE);
        mIm = c.getSystemService(InputManager.class);

        mVC = ViewConfiguration.get(c);
        mTextPaint = new Paint();
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ public class KeyboardUI extends SystemUI implements InputManager.OnTabletModeCha
        mProfileManager = bluetoothManager.getProfileManager();
        bluetoothManager.getEventManager().registerCallback(new BluetoothCallbackHandler());

        InputManager im = (InputManager) context.getSystemService(Context.INPUT_SERVICE);
        InputManager im = context.getSystemService(InputManager.class);
        im.registerOnTabletModeChangedListener(this, mHandler);
        mInTabletMode = im.isInTabletMode();

+1 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ public class VibratorService extends IVibratorService.Stub
    }

    public void systemReady() {
        mIm = (InputManager)mContext.getSystemService(Context.INPUT_SERVICE);
        mIm = mContext.getSystemService(InputManager.class);
        mSettingObserver = new SettingsObserver(mH);

        mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);