Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #74 from allstarschh/Bug1098253
Browse files Browse the repository at this point in the history
Bug 1098253 - return rfState in changeRFResponse. r=dimi
  • Loading branch information
allstarschh committed Nov 14, 2014
2 parents 9663d24 + c80f6cd commit 5502ba6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/MessageHandler.cpp
Expand Up @@ -25,7 +25,7 @@
#include "NfcDebug.h"

#define MAJOR_VERSION (1)
#define MINOR_VERSION (15)
#define MINOR_VERSION (16)

using android::Parcel;

Expand Down Expand Up @@ -276,6 +276,7 @@ bool MessageHandler::handleMakeNdefReadonlyRequest(Parcel& parcel)

bool MessageHandler::handleChangeRFStateResponse(Parcel& parcel, void* data)
{
parcel.writeInt32(*reinterpret_cast<int*>(data));
sendResponse(parcel);
return true;
}
Expand Down
8 changes: 5 additions & 3 deletions src/NfcService.cpp
Expand Up @@ -55,8 +55,8 @@ typedef enum {

typedef enum {
STATE_NFC_OFF = 0,
STATE_NFC_ON,
STATE_NFC_ON_LOW_POWER,
STATE_NFC_ON,
} NfcState;

class NfcEvent {
Expand Down Expand Up @@ -588,7 +588,8 @@ void NfcService::handleEnterLowPowerResponse(NfcEvent* event)

NfcErrorCode code = setLowPowerMode(low);

mMsgHandler->processResponse(NFC_RESPONSE_CHANGE_RF_STATE, code, NULL);
ALOGD("XXX %s mState=%d", __func__, mState);
mMsgHandler->processResponse(NFC_RESPONSE_CHANGE_RF_STATE, code, &mState);
}

bool NfcService::handleEnableRequest(bool enable)
Expand Down Expand Up @@ -629,7 +630,8 @@ void NfcService::handleEnableResponse(NfcEvent* event)
code = disableNfc();
}
TheEnd:
mMsgHandler->processResponse(NFC_RESPONSE_CHANGE_RF_STATE, code, NULL);
ALOGD("XXX %s mState=%d", __func__, mState);
mMsgHandler->processResponse(NFC_RESPONSE_CHANGE_RF_STATE, code, &mState);
}

NfcErrorCode NfcService::enableNfc()
Expand Down

0 comments on commit 5502ba6

Please sign in to comment.