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

Commit 86aa2b8a authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "[AChoreographer] Add const qualifiers for getFd()."

parents 584a4263 921b277e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ void DisplayEventDispatcher::toggleConfigEvents(ISurfaceComposer::ConfigChanged
    mConfigChangeFlag = configChangeFlag;
}

int DisplayEventDispatcher::getFd() {
int DisplayEventDispatcher::getFd() const {
    return mReceiver.getFd();
}

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public:
    void dispose();
    status_t scheduleVsync();
    void toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag);
    int getFd();
    int getFd() const;
    virtual int handleEvent(int receiveFd, int events, void* data);

protected:
+6 −1
Original line number Diff line number Diff line
@@ -264,6 +264,11 @@ static inline Choreographer* AChoreographer_to_Choreographer(AChoreographer* cho
    return reinterpret_cast<Choreographer*>(choreographer);
}

static inline const Choreographer* AChoreographer_to_Choreographer(
        const AChoreographer* choreographer) {
    return reinterpret_cast<const Choreographer*>(choreographer);
}

static inline AChoreographer* Choreographer_to_AChoreographer(Choreographer* choreographer) {
    return reinterpret_cast<AChoreographer*>(choreographer);
}
@@ -321,7 +326,7 @@ void AChoreographer_destroy(AChoreographer* choreographer) {
    delete AChoreographer_to_Choreographer(choreographer);
}

int AChoreographer_getFd(AChoreographer* choreographer) {
int AChoreographer_getFd(const AChoreographer* choreographer) {
    return AChoreographer_to_Choreographer(choreographer)->getFd();
}

+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ void AChoreographer_destroy(AChoreographer* choreographer);
 * events. One such way is registering the file descriptor to a Looper instance,
 * although this is not a requirement.
 */
int AChoreographer_getFd(AChoreographer* choreographer);
int AChoreographer_getFd(const AChoreographer* choreographer);

/**
 * Provides a callback to handle all pending events emitted by this