AndyScherzinger 8 年之前
父节点
当前提交
a04b3e63dc

+ 1 - 2
build.gradle

@@ -101,7 +101,7 @@ android {
     // see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
 
     dexOptions {
-        // Skip pre-dexing whe`n running on Travis CI or when disabled via -Dpre-dex=false.
+        // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
         preDexLibraries = preDexEnabled && !travisBuild
     }
 
@@ -176,7 +176,6 @@ dependencies {
     compile name: 'touch-image-view'
     compile 'com.android.support:multidex:1.0.1'
 
-
     compile 'com.github.nextcloud:android-library:notifications-push-SNAPSHOT'
     compile "com.android.support:support-v4:${supportLibraryVersion}"
     compile "com.android.support:design:${supportLibraryVersion}"

+ 0 - 2
build.gradle.modified

@@ -176,7 +176,6 @@ dependencies {
     compile name: 'touch-image-view'
     compile 'com.android.support:multidex:1.0.1'
 
-
     compile 'com.github.nextcloud:android-library:notifications-push-SNAPSHOT'
     compile "com.android.support:support-v4:${supportLibraryVersion}"
     compile "com.android.support:design:${supportLibraryVersion}"
@@ -219,7 +218,6 @@ dependencies {
     //androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
     // fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
     //androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
-
 }
 
 configurations.all {

+ 0 - 57
drawable_resources/ic_list_empty_upload_backup.svg

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   version="1.1"
-   width="24"
-   height="24"
-   viewBox="0 0 24 24"
-   id="svg2"
-   inkscape:version="0.91 r13725"
-   sodipodi:docname="ic_list_empty_upload.svg"
-   inkscape:export-filename="C:\DEV\src\Android\Nextcloud\designTweaks\res\drawable-xxxhdpi\ic_list_empty_upload.png"
-   inkscape:export-xdpi="1080"
-   inkscape:export-ydpi="1080">
-  <metadata
-     id="metadata10">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <defs
-     id="defs8" />
-  <sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="1005"
-     id="namedview6"
-     showgrid="false"
-     inkscape:zoom="9.8333333"
-     inkscape:cx="-15.305085"
-     inkscape:cy="12"
-     inkscape:window-x="-9"
-     inkscape:window-y="-9"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg2" />
-  <path
-     d="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"
-     id="path4"
-     style="fill:#99cde9;fill-opacity:1" />
-</svg>

+ 0 - 50
drawable_resources/notification-icon_backup.svg

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   version="1.1"
-   xml:space="preserve"
-   height="62"
-   width="62"
-   enable-background="new 0 0 196.6 72"
-   y="0px"
-   x="0px"
-   viewBox="0 0 62.000002 62"
-   id="svg2"
-   inkscape:version="0.91 r13725"
-   sodipodi:docname="notification-icon.svg"
-   inkscape:export-filename="C:\DEV\src\Android\nextcloud_android\res\drawable-xxxhdpi\notification_icon.png"
-   inkscape:export-xdpi="139.35001"
-   inkscape:export-ydpi="139.35001"><metadata
-     id="metadata10"><rdf:RDF><cc:Work
-         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
-     id="defs8" /><sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="1005"
-     id="namedview6"
-     showgrid="false"
-     inkscape:zoom="6.9411765"
-     inkscape:cx="31"
-     inkscape:cy="17"
-     inkscape:window-x="-9"
-     inkscape:window-y="-9"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg2" /><path
-     style="color:#000000;text-indent:0;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;text-transform:none;block-progression:tb;white-space:normal;isolation:auto;mix-blend-mode:normal;solid-color:#000000;fill:#ffffff;color-rendering:auto;image-rendering:auto;shape-rendering:auto;enable-background:accumulate"
-     d="m 31.023729,17.856035 c -5.95,6e-4 -10.947,4.0745 -12.473,9.5549 -1.333,-2.931 -4.266,-5.0088 -7.674,-5.0092 -4.6384002,5e-4 -8.4524002,3.8142 -8.4530002,8.4532 -8.321e-4,4.6397 3.8137,8.4544 8.4534002,8.455 3.4081,-4.09e-4 6.3392,-2.0792 7.6716,-5.011 1.5261,5.4817 6.5242,9.5569 12.475,9.5569 5.918,4.57e-4 10.89,-4.0302 12.448,-9.4649 1.3541,2.8776 4.242,4.9184 7.6106,4.9188 4.6406,8.28e-4 8.4558,-3.8144 8.4551,-8.455 -4.57e-4,-4.6397 -3.8154,-8.454 -8.4551,-8.4533 -3.3687,8.57e-4 -6.2587,2.0412 -7.6123,4.9188 -1.559,-5.4338 -6.528,-9.4644 -12.446,-9.464 z m 0,4.9623 c 4.4687,-2.97e-4 8.0384,3.5683 8.0389,8.0371 2.28e-4,4.4693 -3.5696,8.0391 -8.0389,8.0388 -4.4687,-4.38e-4 -8.0375,-3.5701 -8.0372,-8.0388 4.57e-4,-4.4682 3.5689,-8.0366 8.0372,-8.0371 z m -20.147,4.5456 c 1.9576,2.26e-4 3.4908,1.5334 3.4911,3.491 3.43e-4,1.958 -1.533,3.4925 -3.4911,3.4927 -1.9580002,-2.28e-4 -3.4913002,-1.5347 -3.4911002,-3.4927 2.284e-4,-1.9575 1.5334,-3.4907 3.4911002,-3.491 z m 40.205,0 c 1.9579,-3.43e-4 3.4925,1.533 3.4927,3.491 4.57e-4,1.9584 -1.5343,3.493 -3.4927,3.4927 -1.958,-2.28e-4 -3.4914,-1.5347 -3.4911,-3.4927 2.21e-4,-1.9575 1.5335,-3.4907 3.4911,-3.491 z"
-     id="path4"
-     inkscape:connector-curvature="0" /></svg>

+ 0 - 1
src/main/java/com/owncloud/android/files/services/FileUploader.java

@@ -1079,7 +1079,6 @@ public class FileUploader extends Service
             );
 
             if (needsToUpdateCredentials) {
-                // let the user update credentials with one click
                 // let the user update credentials with one click
                 Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);
                 updateAccountCredentials.putExtra(

+ 0 - 1
src/main/java/com/owncloud/android/syncadapter/FileSyncAdapter.java

@@ -398,7 +398,6 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
                 ResultCode.UNAUTHORIZED.equals(mLastFailedResult.getCode())
         );
         if (needsToUpdateCredentials) {
-            // let the user update credentials with one click
             // let the user update credentials with one click
             Intent updateAccountCredentials = new Intent(getContext(), AuthenticatorActivity.class);
             updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, getAccount());

+ 4 - 6
src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -175,11 +175,9 @@ public class FileDisplayActivity extends HookActivity
 
         /// Load of saved instance state
         if (savedInstanceState != null) {
-            mWaitingToPreview = savedInstanceState.getParcelable(
-                    FileDisplayActivity.KEY_WAITING_TO_PREVIEW);
+            mWaitingToPreview = savedInstanceState.getParcelable(FileDisplayActivity.KEY_WAITING_TO_PREVIEW);
             mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS);
-            mWaitingToSend = savedInstanceState.getParcelable(
-                    FileDisplayActivity.KEY_WAITING_TO_SEND);
+            mWaitingToSend = savedInstanceState.getParcelable(FileDisplayActivity.KEY_WAITING_TO_SEND);
             searchQuery = savedInstanceState.getString(KEY_SEARCH_QUERY);
         } else {
             mWaitingToPreview = null;
@@ -250,11 +248,11 @@ public class FileDisplayActivity extends HookActivity
             }
         }
 
-        if (getIntent().getParcelableExtra(OCFileListFragment.SEARCH_EVENT) != null){
+        if (getIntent().getParcelableExtra(OCFileListFragment.SEARCH_EVENT) != null) {
             switchToSearchFragment();
 
             int menuId = getIntent().getIntExtra(DRAWER_MENU_ID, -1);
-            if (menuId != -1){
+            if (menuId != -1) {
                 setupDrawer(menuId);
             }
         } else if (savedInstanceState == null) {

+ 9 - 10
src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java

@@ -160,8 +160,10 @@ public class NotificationsActivity extends FileActivity {
         recyclerView.setAdapter(adapter);
 
         LinearLayoutManager layoutManager = new LinearLayoutManager(this);
-        DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(),
-                layoutManager.getOrientation());
+        DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(
+                recyclerView.getContext(),
+                layoutManager.getOrientation()
+        );
 
         recyclerView.setLayoutManager(layoutManager);
         recyclerView.addItemDecoration(dividerItemDecoration);
@@ -179,19 +181,15 @@ public class NotificationsActivity extends FileActivity {
 
         Thread t = new Thread(new Runnable() {
             public void run() {
-                OwnCloudAccount ocAccount = null;
+                OwnCloudAccount ocAccount;
                 try {
-                    ocAccount = new OwnCloudAccount(
-                            currentAccount,
-                            context
-                    );
+                    ocAccount = new OwnCloudAccount(currentAccount, context);
                     OwnCloudClient mClient = OwnCloudClientManagerFactory.getDefaultSingleton().
                             getClientFor(ocAccount, MainApp.getAppContext());
                     mClient.setOwnCloudVersion(AccountUtils.getServerVersion(currentAccount));
 
                     RemoteOperation getRemoteNotificationOperation = new GetRemoteNotificationsOperation();
-                    final RemoteOperationResult result =
-                            getRemoteNotificationOperation.execute(mClient);
+                    final RemoteOperationResult result = getRemoteNotificationOperation.execute(mClient);
 
                     if (result.isSuccess() && result.getNotificationData() != null) {
                         final List<Notification> notifications = result.getNotificationData();
@@ -249,7 +247,7 @@ public class NotificationsActivity extends FileActivity {
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        boolean retval;
+        boolean retval = true;
 
         switch (item.getItemId()) {
             case android.R.id.home:
@@ -258,6 +256,7 @@ public class NotificationsActivity extends FileActivity {
                 } else {
                     openDrawer();
                 }
+                break;
 
             default:
                 retval = super.onOptionsItemSelected(item);