diff options
author | Markos Rapitis <mrapitis@ford.com> | 2016-02-04 15:18:04 -0500 |
---|---|---|
committer | Markos Rapitis <mrapitis@ford.com> | 2016-02-04 15:18:04 -0500 |
commit | ba85adceccd0ae868e54c03bdcd38d194e9ef6cd (patch) | |
tree | 54926e3a03510ed62ab4a6e0f7e05c51e195de66 | |
parent | ff204a1d36e122923917d4174a243f94133c09e1 (diff) | |
download | sdl_android-feature/improved_resume_with_data.tar.gz |
Made changes to better handle app resumption with data persistence to key off of a combination of success and the result code.feature/improved_resume_with_data
-rw-r--r-- | sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java index 17c479050..23d66a555 100644 --- a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java @@ -1714,13 +1714,13 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> if (_bAppResumeEnabled)
{
- if ( (msg.getResultCode() == Result.RESUME_FAILED) || (msg.getResultCode() != Result.SUCCESS) )
+ if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess()) && (msg.getResultCode() != Result.RESUME_FAILED) )
+ _bResumeSuccess = true;
+ else
{
_bResumeSuccess = false;
_lastHashID = null;
}
- else if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getResultCode() == Result.SUCCESS) )
- _bResumeSuccess = true;
}
_diagModes = msg.getSupportedDiagModes();
@@ -1867,15 +1867,15 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> if (_bAppResumeEnabled)
{
- if ( (msg.getResultCode() == Result.RESUME_FAILED) || (msg.getResultCode() != Result.SUCCESS) )
+ if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getSuccess()) && (msg.getResultCode() != Result.RESUME_FAILED) )
+ _bResumeSuccess = true;
+ else
{
_bResumeSuccess = false;
_lastHashID = null;
}
- else if ( (_sdlMsgVersion.getMajorVersion() > 2) && (_lastHashID != null) && (msg.getResultCode() == Result.SUCCESS) )
- _bResumeSuccess = true;
- }
-
+ }
+
_diagModes = msg.getSupportedDiagModes();
if (!isDebugEnabled())
|