From: masensio Date: Fri, 4 Apr 2014 12:49:20 +0000 (+0200) Subject: Grant that OperationsService doesn't keep old saved results forever X-Git-Tag: oc-android-1.7.0_signed~345^2~9 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/d535c420f2e04f399d1abbd88b497b0b98bc4494?ds=inline;hp=-c Grant that OperationsService doesn't keep old saved results forever --- d535c420f2e04f399d1abbd88b497b0b98bc4494 diff --git a/src/com/owncloud/android/services/OperationsService.java b/src/com/owncloud/android/services/OperationsService.java index af177075..798c371d 100644 --- a/src/com/owncloud/android/services/OperationsService.java +++ b/src/com/owncloud/android/services/OperationsService.java @@ -156,7 +156,16 @@ public class OperationsService extends Service { return START_NOT_STICKY; } - + @Override + public void onDestroy() { + //Log.wtf(TAG, "onDestroy init" ); + super.onDestroy(); + //Log.wtf(TAG, "Clear mOperationResults" ); + mOperationResults.clear(); + //Log.wtf(TAG, "onDestroy end" ); + } + + /** * Provides a binder object that clients can use to perform actions on the queue of operations, * except the addition of new operations. @@ -338,9 +347,9 @@ public class OperationsService extends Service { } } - public RemoteOperationResult getOperationResultIfFinished(int mDetectAuthOpId) { - //Log_OC.wtf(TAG, "Searching result for operation with id " + mDetectAuthOpId); - return mOperationResults.remove(mDetectAuthOpId); + public RemoteOperationResult getOperationResultIfFinished(int operationId) { + //Log_OC.wtf(TAG, "Searching result for operation with id " + operationId); + return mOperationResults.remove(operationId); } }