Explorar o código

Merge pull request #2433 from nextcloud/removeChangePassword

Removal of change password menu entry
Andy Scherzinger %!s(int64=7) %!d(string=hai) anos
pai
achega
2f86cbff98

+ 0 - 14
src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java

@@ -63,7 +63,6 @@ import com.bumptech.glide.request.target.SimpleTarget;
 import com.google.gson.Gson;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AccountUtils;
-import com.owncloud.android.authentication.AuthenticatorActivity;
 import com.owncloud.android.datamodel.ArbitraryDataProvider;
 import com.owncloud.android.datamodel.PushConfigurationState;
 import com.owncloud.android.lib.common.UserInfo;
@@ -176,9 +175,6 @@ public class UserInfoActivity extends FileActivity {
             case android.R.id.home:
                 onBackPressed();
                 break;
-            case R.id.change_password:
-                changeAccountPassword(account);
-                break;
             case R.id.delete_account:
                 openAccountRemovalConfirmationDialog(account, getFragmentManager(), false);
                 break;
@@ -312,15 +308,6 @@ public class UserInfoActivity extends FileActivity {
             info.add(new UserInfoDetailsItem(icon, text, getResources().getString(contentDescriptionInt)));
     }
 
-    private void changeAccountPassword(Account account) {
-        // let the user update credentials with one click
-        Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);
-        updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, account);
-        updateAccountCredentials.putExtra(AuthenticatorActivity.EXTRA_ACTION,
-                AuthenticatorActivity.ACTION_UPDATE_TOKEN);
-        startActivity(updateAccountCredentials);
-    }
-
     public static void openAccountRemovalConfirmationDialog(Account account, FragmentManager fragmentManager,
                                                             boolean removeDirectly) {
         UserInfoActivity.AccountRemovalConfirmationDialog dialog =
@@ -417,7 +404,6 @@ public class UserInfoActivity extends FileActivity {
                                     Intent start = new Intent(getActivity(), FileDisplayActivity.class);
                                     start.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                     startActivity(start);
-
                                 }
 
                             })

+ 19 - 5
src/main/res/menu/user_info_menu.xml

@@ -1,10 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
+<!--
+  Nextcloud Android client application
 
-    <item
-        android:id="@+id/change_password"
-        android:title="@string/change_password">
-    </item>
+  Copyright (C) 2017-2018 Andy Scherzinger
+  Copyright (C) 2017-2018 Nextcloud
+
+  This program is free software; you can redistribute it and/or
+  modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+  License as published by the Free Software Foundation; either
+  version 3 of the License, or any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+  You should have received a copy of the GNU Affero General Public
+  License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
 
     <item
         android:id="@+id/delete_account"

+ 1 - 2
src/main/res/values/strings.xml

@@ -133,7 +133,6 @@
     <string name="common_pending">Pending</string>
     <string name="common_delete">Delete</string>
     <string name="about_title">About</string>
-    <string name="change_password">Change password</string>
     <string name="delete_account">Remove account</string>
     <string name="delete_account_warning">Remove account %s and delete all local files?\n\nDeletion cannot be undone.</string>
     <string name="avatar">Avatar</string>
@@ -771,7 +770,7 @@
     <string name="end_to_end_encryption_storing_keys">Storing keys</string>
     <string name="copy_move_to_encrypted_folder_not_supported">Copy/move into encrypted folder currently not supported.</string>
     <string name="untrusted_domain">Access through untrusted domain. Please see documentation for further info.</string>
-    <string name="upload_list_loading">Loading uploads</string>
+    <string name="upload_list_loading">Loading uploads&#8230;</string>
     <string name="notification_channel_push_name">Push notifications</string>
     <string name="notification_channel_push_description">Show push notifications sent by the server: Mentions in comments, reception of new remote shares, announcements posted by an admin etc.</string>
     <string name="sendbutton_description">Send button icon</string>