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

Commit 41b59714 authored by Michael Wright's avatar Michael Wright
Browse files

Force InputManagerService to communicate via InputManagerInterface

Bug: 160010896
Test: compiles, manual
Change-Id: I0c4078b2a822d2fe71dc9c83ba4b2ff9d7ea57b0
parent 286bf801
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ protected:
public:
    NativeInputManager(jobject contextObj, jobject serviceObj, const sp<Looper>& looper);

    inline sp<InputManager> getInputManager() const { return mInputManager; }
    inline sp<InputManagerInterface> getInputManager() const { return mInputManager; }

    void dump(std::string& dump);

@@ -270,7 +270,7 @@ public:
    virtual int32_t getCustomPointerIconId();

private:
    sp<InputManager> mInputManager;
    sp<InputManagerInterface> mInputManager;

    jobject mServiceObj;
    sp<Looper> mLooper;
@@ -342,9 +342,9 @@ NativeInputManager::NativeInputManager(jobject contextObj,
    }
    mInteractive = true;

    mInputManager = new InputManager(this, this);
    defaultServiceManager()->addService(String16("inputflinger"),
            mInputManager, false);
    InputManager* im = new InputManager(this, this);
    mInputManager = im;
    defaultServiceManager()->addService(String16("inputflinger"), im);
}

NativeInputManager::~NativeInputManager() {
@@ -1253,7 +1253,7 @@ int32_t NativeInputManager::getCustomPointerIconId() {
}

void NativeInputManager::setMotionClassifierEnabled(bool enabled) {
    mInputManager->setMotionClassifierEnabled(enabled);
    mInputManager->getClassifier()->setMotionClassifierEnabled(enabled);
}

// ----------------------------------------------------------------------------