summaryrefslogtreecommitdiffstats
path: root/emailcommon
diff options
context:
space:
mode:
authorTony Mantler <nicoya@google.com>2014-06-10 11:27:55 -0700
committerTony Mantler <nicoya@google.com>2014-06-10 11:29:17 -0700
commit51af59fc6643657d6ff7fb9ed05c5ce298b8d653 (patch)
tree5a4b373a01fc8909d0199ce0dcffa7a66d1850dd /emailcommon
parent8b38cc1739f25cc85eead69a1c74b50d596a817d (diff)
downloadandroid_packages_apps_Email-51af59fc6643657d6ff7fb9ed05c5ce298b8d653.tar.gz
android_packages_apps_Email-51af59fc6643657d6ff7fb9ed05c5ce298b8d653.tar.bz2
android_packages_apps_Email-51af59fc6643657d6ff7fb9ed05c5ce298b8d653.zip
Remove unused preferences and dead code
Change-Id: Ica8bd735a91417ed44bd547ab7176832745d729e
Diffstat (limited to 'emailcommon')
-rwxr-xr-xemailcommon/src/com/android/emailcommon/provider/Account.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/emailcommon/src/com/android/emailcommon/provider/Account.java b/emailcommon/src/com/android/emailcommon/provider/Account.java
index 2e4075fce..54e12e8a9 100755
--- a/emailcommon/src/com/android/emailcommon/provider/Account.java
+++ b/emailcommon/src/com/android/emailcommon/provider/Account.java
@@ -26,8 +26,6 @@ import android.content.OperationApplicationException;
import android.database.ContentObserver;
import android.database.Cursor;
import android.media.RingtoneManager;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -594,33 +592,6 @@ public final class Account extends EmailContent implements Parcelable {
}
}
- /**
- * Given an account id, determine whether the account is currently prohibited from automatic
- * sync, due to roaming while the account's policy disables this
- * @param context the caller's context
- * @param accountId the account id
- * @return true if the account can't automatically sync due to roaming; false otherwise
- */
- public static boolean isAutomaticSyncDisabledByRoaming(Context context, long accountId) {
- Account account = Account.restoreAccountWithId(context, accountId);
- // Account being deleted; just return
- if (account == null) return false;
- long policyKey = account.mPolicyKey;
- // If no security policy, we're good
- if (policyKey <= 0) return false;
-
- ConnectivityManager cm =
- (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo info = cm.getActiveNetworkInfo();
- // If we're not on mobile, we're good
- if (info == null || (info.getType() != ConnectivityManager.TYPE_MOBILE)) return false;
- // If we're not roaming, we're good
- if (!info.isRoaming()) return false;
- Policy policy = Policy.restorePolicyWithId(context, policyKey);
- // Account being deleted; just return
- return policy != null && policy.mRequireManualSyncWhenRoaming;
- }
-
/*
* Override this so that we can store the HostAuth's first and link them to the Account
* (non-Javadoc)