Home
last modified time | relevance | path

Searched refs:Utility (Results 1 – 25 of 86) sorted by relevance

1234

/packages/apps/Email/tests/src/com/android/emailcommon/utility/
DUtilityUnitTests.java28 import com.android.emailcommon.utility.Utility.NewFileCreator;
69 assertNull(Utility.toUtf8(null)); in testToUtf8()
70 MoreAsserts.assertEquals(new byte[] {}, Utility.toUtf8("")); in testToUtf8()
71 MoreAsserts.assertEquals(b('a'), Utility.toUtf8("a")); in testToUtf8()
72 MoreAsserts.assertEquals(b('A', 'B', 'C'), Utility.toUtf8("ABC")); in testToUtf8()
74 Utility.toUtf8("\u65E5\u672C\u8A9E")); in testToUtf8()
78 assertNull(Utility.fromUtf8(null)); in testFromUtf8()
79 assertEquals("", Utility.fromUtf8(new byte[] {})); in testFromUtf8()
80 assertEquals("a", Utility.fromUtf8(b('a'))); in testFromUtf8()
81 assertEquals("ABC", Utility.fromUtf8(b('A', 'B', 'C'))); in testFromUtf8()
[all …]
DUtilityMediumTests.java71 Account acct = Utility.findExistingAccount(mMockContext, -1, "address-ha1", "login-ha1"); in testFindExistingAccount()
74 acct = Utility.findExistingAccount(mMockContext, -1, "address-ha2", "login-ha2"); in testFindExistingAccount()
78 acct = Utility.findExistingAccount(mMockContext, -1, "address-ha3", "login-ha3"); in testFindExistingAccount()
81 acct = Utility.findExistingAccount(mMockContext, account1.mId, "address-ha1", "login-ha1"); in testFindExistingAccount()
89 acct = Utility.findExistingAccount(mMockContext, -1, "address-foo_ba", "login-foo.ba"); in testFindExistingAccount()
91 acct = Utility.findExistingAccount(mMockContext, -1, "address-foo_ba", "login-foo_ba"); in testFindExistingAccount()
98 assertFalse(Utility.attachmentExists(mMockContext, null)); in testAttachmentExists()
108 assertFalse(Utility.attachmentExists(mMockContext, attachment)); in testAttachmentExists()
112 assertTrue(Utility.attachmentExists(mMockContext, attachment)); in testAttachmentExists()
122 assertFalse(Utility.attachmentExists(mMockContext, attachment)); in testAttachmentExists()
[all …]
/packages/apps/Exchange/exchange2/src/com/android/exchange/utility/
DSimpleIcsWriter.java18 import com.android.emailcommon.utility.Utility;
42 for (byte b : Utility.toUtf8(string)) { in writeLine()
48 && Utility.isFirstUtf8Byte(b)) { // Only wrappable if it's before the first byte in writeLine()
107 return Utility.fromUtf8(getBytes()); in toString()
/packages/apps/Email/emailcommon/src/com/android/emailcommon/
DTrafficFlags.java23 import com.android.emailcommon.utility.Utility;
71 int protocolIndex = Utility.arrayIndex(PROTOCOLS, account.getProtocol(context)); in getSyncFlags()
83 int protocolIndex = Utility.arrayIndex(PROTOCOLS, account.getProtocol(context)); in getAttachmentFlags()
DDevice.java24 import com.android.emailcommon.utility.Utility;
110 return Utility.getSmallHash(deviceId); in getConsistentDeviceId()
/packages/apps/Exchange/tests/src/com/android/exchange/utility/
DSimpleIcsWriterTests.java18 import com.android.emailcommon.utility.Utility;
48 final String actual = Utility.fromUtf8(ics.getBytes()); in testWriteTag()
102 final String actual = Utility.fromUtf8(bytes); in checkWriteLine()
/packages/apps/Exchange/exchange2/tests/src/com/android/exchange/utility/
DSimpleIcsWriterTests.java18 import com.android.emailcommon.utility.Utility;
48 final String actual = Utility.fromUtf8(ics.getBytes()); in testWriteTag()
102 final String actual = Utility.fromUtf8(bytes); in checkWriteLine()
/packages/apps/Email/tests/src/com/android/email/mail/store/imap/
DImapStringTest.java22 import com.android.emailcommon.utility.Utility;
49 assertEquals("", Utility.fromAscii(IOUtils.toByteArray(ImapString.EMPTY.getAsStream()))); in testEmpty()
65 assertEquals("AbcD", Utility.fromAscii(IOUtils.toByteArray(s.getAsStream()))); in testBasics()
147 assertEquals(content, Utility.fromAscii(IOUtils.toByteArray(s.getAsStream()))); in doLiteralTest()
DImapTestUtils.java26 import com.android.emailcommon.utility.Utility;
89 new ByteArrayInputStream(Utility.toAscii(line + "\r\n")), new DiscourseLogger(4)); in parseResponse()
103 ByteArrayInputStream in = new ByteArrayInputStream(Utility.toAscii(content + "#trailing")); in createFixedLengthInputStream()
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DHostAuth.java30 import com.android.emailcommon.utility.Utility;
372 && Utility.areStringsEqual(mProtocol, that.mProtocol) in equals()
373 && Utility.areStringsEqual(mAddress, that.mAddress) in equals()
374 && Utility.areStringsEqual(mLogin, that.mLogin) in equals()
375 && Utility.areStringsEqual(mPassword, that.mPassword) in equals()
376 && Utility.areStringsEqual(mDomain, that.mDomain) in equals()
377 && Utility.areStringsEqual(mClientCertAlias, that.mClientCertAlias); in equals()
DMailbox.java32 import com.android.emailcommon.utility.Utility;
396 return Utility.getFirstRowLong(context, Mailbox.CONTENT_URI, in findMailboxOfType()
414 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI, in getUnreadCountByAccountAndMailboxType()
422 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI, in getUnreadCountByMailboxType()
429 return Utility.getFirstRowInt(context, Mailbox.CONTENT_URI, in getMessageCountByMailboxType()
455 return Utility.getFirstRowInt(context, url, MAILBOX_TYPE_PROJECTION, in getMailboxType()
464 return Utility.getFirstRowString(context, url, MAILBOX_DISPLAY_NAME_PROJECTION, in getDisplayName()
/packages/apps/Email/src/com/android/email/mail/store/imap/
DImapSimpleString.java19 import com.android.emailcommon.utility.Utility;
47 return new ByteArrayInputStream(Utility.toAscii(mString)); in getAsStream()
DImapMemoryLiteral.java21 import com.android.emailcommon.utility.Utility;
60 return Utility.fromAscii(mData); in getString()
DImapTempFileLiteral.java22 import com.android.emailcommon.utility.Utility;
91 return Utility.fromAscii(IOUtils.toByteArray(getAsStream())); in getString()
/packages/apps/Email/src/com/android/email/activity/
DMoveMessageToDialog.java40 import com.android.emailcommon.utility.Utility;
184 Utility.getMainThreadHandler().post(new Runnable() { in dismissAsync()
292 Utility.showToast( in loadInBackground()
300 Utility.showToast(mActivity, R.string.cannot_move_special_mailboxes_toast); in loadInBackground()
308 Utility.showToast(mActivity, R.string.cannot_move_multiple_accounts_toast); in loadInBackground()
DMessageFileViewFragment.java31 import com.android.emailcommon.utility.Utility;
118 Utility.showToast(activity, R.string.message_view_parse_message_toast); in openMessageSync()
122 Utility.showToast(activity, R.string.message_view_display_attachment_toast); in openMessageSync()
DActivityHelper.java34 import com.android.emailcommon.utility.Utility;
97 Utility.showToast(context, in deleteMessage()
114 Utility.showToast(context, message); in moveMessages()
DMessageList.java22 import com.android.emailcommon.utility.Utility;
55 Utility.showToast(me, R.string.toast_account_not_found); in onCreate()
DMessageOrderManager.java32 import com.android.emailcommon.utility.Utility;
127 this(context, listContext, callback, new DelayedOperations(Utility.getMainThreadHandler())); in MessageOrderManager()
201 Utility.cancelTaskInterrupt(mLoadMessageListTask); in cancelTask()
/packages/apps/Email/src/com/android/email/
DAttachmentInfo.java22 import com.android.emailcommon.utility.Utility;
114 if (!Utility.isExternalStorageMounted()) { in AttachmentInfo()
129 Utility.arrayContains(AttachmentUtilities.UNACCEPTABLE_ATTACHMENT_EXTENSIONS, in AttachmentInfo()
146 Utility.arrayContains(AttachmentUtilities.INSTALLABLE_ATTACHMENT_EXTENSIONS, in AttachmentInfo()
/packages/apps/Email/emailcommon/src/com/android/emailcommon/internet/
DMimeHeader.java20 import com.android.emailcommon.utility.Utility;
117 if (!Utility.arrayContains(WRITE_OMIT_FIELDS, field.name)) { in writeToString()
127 if (!Utility.arrayContains(WRITE_OMIT_FIELDS, field.name)) { in writeTo()
/packages/apps/Email/tests/src/com/android/email/
DUtilityLargeTest.java21 import com.android.emailcommon.utility.Utility;
62 new Utility.ForEachAccount(mProviderContext) { in testForEachAccount()
DSingleRunningTaskTest.java20 import com.android.emailcommon.utility.Utility;
99 Utility.runAsync(new Runnable() { in testParallel()
/packages/apps/Email/src/com/android/email/view/
DRigidWebView.java29 import com.android.emailcommon.utility.Utility;
58 }, Utility.getMainThreadHandler(),
/packages/apps/Email/src/com/android/email/activity/setup/
DAccountSetupOutgoingFragment.java44 import com.android.emailcommon.utility.Utility;
292 Utility.isServerNameValid(mServerView) && Utility.isPortFieldValid(mPortView); in validateFields()
295 enabled = (Utility.isTextViewNotEmpty(mUsernameView) in validateFields()
296 && Utility.isTextViewNotEmpty(mPasswordView)); in validateFields()

1234