Browse Source

cleanups due to the code review, removing unused code

Andy Scherzinger 9 năm trước cách đây
mục cha
commit
880ac5f412

+ 1 - 1
src/com/owncloud/android/ui/TextDrawable.java

@@ -83,7 +83,7 @@ public class TextDrawable extends Drawable {
     }
 
     /**
-     * creates an avatar in form of  a TextDrawable with the first letter of the account name in a circle with the
+     * creates an avatar in form of a TextDrawable with the first letter of the account name in a circle with the
      * given radius.
      *
      * @param accountName the account name

+ 7 - 7
src/com/owncloud/android/ui/activity/BaseActivity.java

@@ -18,7 +18,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.resources.status.OCCapability;
 
 /**
- * Base ctivity with common behaviour for activities dealing with ownCloud {@link Account}s .
+ * Base activity with common behaviour for activities dealing with ownCloud {@link Account}s .
  */
 public abstract class BaseActivity extends AppCompatActivity {
     private static final String TAG = BaseActivity.class.getSimpleName();
@@ -29,7 +29,7 @@ public abstract class BaseActivity extends AppCompatActivity {
     private Account mCurrentAccount;
 
     /**
-     * Capabilites of the server where {@link #mCurrentAccount} lives.
+     * Capabilities of the server where {@link #mCurrentAccount} lives.
      */
     private OCCapability mCapabilities;
 
@@ -80,9 +80,9 @@ public abstract class BaseActivity extends AppCompatActivity {
 
     /**
      * Sets and validates the ownCloud {@link Account} associated to the Activity.
-     * <p/>
+     *
      * If not valid, tries to swap it for other valid and existing ownCloud {@link Account}.
-     * <p/>
+     *
      * POSTCONDITION: updates {@link #mAccountWasSet} and {@link #mAccountWasRestored}.
      *
      * @param account      New {@link Account} to set.
@@ -105,10 +105,10 @@ public abstract class BaseActivity extends AppCompatActivity {
 
     /**
      * Tries to swap the current ownCloud {@link Account} for other valid and existing.
-     * <p/>
+     *
      * If no valid ownCloud {@link Account} exists, the the user is requested
      * to create a new ownCloud {@link Account}.
-     * <p/>
+     *
      * POSTCONDITION: updates {@link #mAccountWasSet} and {@link #mAccountWasRestored}.
      */
     protected void swapToDefaultAccount() {
@@ -144,7 +144,7 @@ public abstract class BaseActivity extends AppCompatActivity {
 
     /**
      * Called when the ownCloud {@link Account} associated to the Activity was just updated.
-     * <p/>
+     *
      * Child classes must grant that state depending on the {@link Account} is updated.
      */
     protected void onAccountSet(boolean stateWasRecovered) {

+ 0 - 4
src/com/owncloud/android/ui/activity/ToolbarActivity.java

@@ -93,10 +93,6 @@ public abstract class ToolbarActivity extends BaseActivity {
         View actionBarTitleView = getWindow().getDecorView().findViewById(
                 getResources().getIdentifier("action_bar_title", "id", "android")
         );
-        // TODO remove legacy code
-        if (actionBarTitleView != null) {    // it's null in Android 2.x
-            actionBarTitleView.setContentDescription(titleToSet);
-        }
 
         // set home button properties
         actionBar.setDisplayHomeAsUpEnabled(true);

+ 0 - 1
src/com/owncloud/android/utils/BitmapUtils.java

@@ -288,7 +288,6 @@ public class BitmapUtils {
         String username = AccountUtils.getAccountUsername(accountName);
         byte[] seed = username.getBytes("UTF-8");
         MessageDigest md = MessageDigest.getInstance("MD5");
-//      Integer seedMd5Int = Math.abs(new String(Hex.encodeHex(seedMd5)).hashCode());
         Integer seedMd5Int = String.format(Locale.ROOT, "%032x",
                 new BigInteger(1, md.digest(seed))).hashCode();