瀏覽代碼

OC-2918: Fix bug: It's not possible to share a file in samsung galaxy mini. (Some strings comparisons are wrong in OperationService#onStartCommand)

masensio 11 年之前
父節點
當前提交
822245d11d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/com/owncloud/android/services/OperationsService.java

+ 2 - 2
src/com/owncloud/android/services/OperationsService.java

@@ -124,14 +124,14 @@ public class OperationsService extends Service {
             RemoteOperation operation = null;
             RemoteOperation operation = null;
             
             
             String action = intent.getAction();
             String action = intent.getAction();
-            if (action == ACTION_CREATE_SHARE) {  // Create Share
+            if (action.equals(ACTION_CREATE_SHARE)) {  // Create Share
                 String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
                 String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
                 Intent sendIntent = intent.getParcelableExtra(EXTRA_SEND_INTENT);
                 Intent sendIntent = intent.getParcelableExtra(EXTRA_SEND_INTENT);
                 if (remotePath.length() > 0) {
                 if (remotePath.length() > 0) {
                     operation = new CreateShareOperation(remotePath, ShareType.PUBLIC_LINK, 
                     operation = new CreateShareOperation(remotePath, ShareType.PUBLIC_LINK, 
                             "", false, "", 1, sendIntent);
                             "", false, "", 1, sendIntent);
                 }
                 }
-            } else if (action == ACTION_UNSHARE) {  // Unshare file
+            } else if (action.equals(ACTION_UNSHARE)) {  // Unshare file
                 String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
                 String remotePath = intent.getStringExtra(EXTRA_REMOTE_PATH);
                 if (remotePath.length() > 0) {
                 if (remotePath.length() > 0) {
                     operation = new UnshareLinkOperation(remotePath, this.getApplicationContext());
                     operation = new UnshareLinkOperation(remotePath, this.getApplicationContext());