Skip to content

Commit

Permalink
fix issue[89]
Browse files Browse the repository at this point in the history
fix issue [89]
  • Loading branch information
vasdeveloper committed Sep 11, 2017
1 parent b5dd794 commit 6d84ba8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ public class QuickSonicSession extends SonicSession implements Handler.Callback
@Override
public boolean handleMessage(Message msg) {

super.handleMessage(msg);
// fix issue[https://github.com/Tencent/VasSonic/issues/89]
if (super.handleMessage(msg)) {
return true; // handled by super class
}

if (CLIENT_CORE_MSG_BEGIN < msg.what && msg.what < CLIENT_CORE_MSG_END && !clientIsReady.get()) {
pendingClientCoreMessage = Message.obtain(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ public boolean handleMessage(Message msg) {

if (isDestroyedOrWaitingForDestroy()) {
SonicUtils.log(TAG, Log.ERROR, "session(" + sId + ") handleMessage error: is destroyed or waiting for destroy.");
return false;
return true;
}

if (SonicUtils.shouldLog(Log.DEBUG)) {
SonicUtils.log(TAG, Log.DEBUG, "session(" + sId + ") handleMessage: msg what = " + msg.what + ".");
}

return true;
return false;
}

SonicSession(String id, String url, SonicSessionConfig config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public int getSrcResultCode() {
@Override
public boolean handleMessage(Message msg) {

super.handleMessage(msg);
// fix issue[https://github.com/Tencent/VasSonic/issues/89]
if (super.handleMessage(msg)) {
return true; // handled by super class
}

switch (msg.what) {
case CLIENT_MSG_CLIENT_READY: {
Expand All @@ -77,7 +80,7 @@ public boolean handleMessage(Message msg) {
case CLIENT_MSG_NOTIFY_RESULT: {
if (msg.arg2 == SONIC_RESULT_CODE_DATA_UPDATE) {
Bundle data = msg.getData();
pendingDiffData = data.getString(DATA_UPDATE_BUNDLE_PARAMS_DIFF) != null ? data.getString(DATA_UPDATE_BUNDLE_PARAMS_DIFF) : null;
pendingDiffData = data.getString(DATA_UPDATE_BUNDLE_PARAMS_DIFF);
} else if (msg.arg2 == SONIC_RESULT_CODE_TEMPLATE_CHANGE) {
Bundle data = msg.getData();
if (data.getBoolean(TEMPLATE_CHANGE_BUNDLE_PARAMS_REFRESH, false)) {
Expand Down

0 comments on commit 6d84ba8

Please sign in to comment.