/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
D | Account.java | 42 import org.json.JSONArray; 43 import org.json.JSONException; 44 import org.json.JSONObject; 253 JSONObject json = new JSONObject(); in serialize() local 255 json.put(AccountColumns.NAME, displayName); in serialize() 256 json.put(AccountColumns.TYPE, type); in serialize() 257 json.put(AccountColumns.SENDER_NAME, senderName); in serialize() 258 json.put(AccountColumns.ACCOUNT_MANAGER_NAME, accountManagerName); in serialize() 259 json.put(AccountColumns.ACCOUNT_ID, accountId); in serialize() 260 json.put(AccountColumns.PROVIDER_VERSION, providerVersion); in serialize() [all …]
|
D | Settings.java | 36 import org.json.JSONException; 37 import org.json.JSONObject; 201 private Settings(JSONObject json) { in Settings() argument 202 signature = json.optString(SettingsColumns.SIGNATURE, sDefault.signature); in Settings() 203 mAutoAdvance = json.optInt(SettingsColumns.AUTO_ADVANCE, sDefault.getAutoAdvanceSetting()); in Settings() 204 snapHeaders = json.optInt(SettingsColumns.SNAP_HEADERS, sDefault.snapHeaders); in Settings() 205 replyBehavior = json.optInt(SettingsColumns.REPLY_BEHAVIOR, sDefault.replyBehavior); in Settings() 206 convListIcon = json.optInt(SettingsColumns.CONV_LIST_ICON, sDefault.convListIcon); in Settings() 207 confirmDelete = json.optBoolean(SettingsColumns.CONFIRM_DELETE, sDefault.confirmDelete); in Settings() 208 confirmArchive = json.optBoolean(SettingsColumns.CONFIRM_ARCHIVE, sDefault.confirmArchive); in Settings() [all …]
|
D | ReplyFromAccount.java | 28 import org.json.JSONException; 29 import org.json.JSONObject; 65 JSONObject json = new JSONObject(); in serialize() local 67 json.put(BASE_ACCOUNT_URI, baseAccountUri); in serialize() 68 json.put(ADDRESS_STRING, address); in serialize() 69 json.put(NAME_STRING, name); in serialize() 70 json.put(REPLY_TO, replyTo); in serialize() 71 json.put(IS_DEFAULT, isDefault); in serialize() 72 json.put(IS_CUSTOM_FROM, isCustomFrom); in serialize() 76 return json; in serialize() [all …]
|
D | ListParams.java | 25 import org.json.JSONException; 26 import org.json.JSONObject; 91 JSONObject json = new JSONObject(); in serialize() local 93 json.put(LIMIT_KEY, mLimit); in serialize() 94 json.put(USE_NETWORK_KEY, mUseNetwork); in serialize() 98 return json.toString(); in serialize() 112 JSONObject json = null; in newinstance() local 114 json = new JSONObject(serializedParams); in newinstance() 115 final int limit = json.getInt(LIMIT_KEY); in newinstance() 116 final boolean useNetwork = json.getBoolean(USE_NETWORK_KEY); in newinstance()
|
D | MailAppProvider.java | 45 import org.json.JSONArray; 46 import org.json.JSONException; 47 import org.json.JSONObject;
|
D | Attachment.java | 44 import org.json.JSONArray; 45 import org.json.JSONException; 46 import org.json.JSONObject;
|
/packages/experimental/procstatlog/ |
D | procstatreport.py | 19 import json 201 "id_js": json.write("total_cpu"), 203 "filename_js": json.write(files_url + "/total_cpu.csv"), 204 "options_js": json.write({ 243 "id_js": json.write("cpu_speed"), 245 "filename_js": json.write(files_url + "/cpu_speed.csv"), 246 "options_js": json.write({ 275 "id_js": json.write("context_switches"), 277 "filename_js": json.write(files_url + "/context_switches.csv"), 278 "options_js": json.write({ [all …]
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/ |
D | Account.java | 38 import org.json.JSONException; 39 import org.json.JSONObject; 751 final JSONObject json = toJson(); in toJsonString() local 752 if (json != null) { in toJsonString() 753 return json.toString(); in toJsonString() 760 final JSONObject json = new JSONObject(); in toJson() local 761 json.putOpt(AccountColumns.DISPLAY_NAME, mDisplayName); in toJson() 762 json.put(AccountColumns.EMAIL_ADDRESS, mEmailAddress); in toJson() 763 json.put(AccountColumns.SYNC_LOOKBACK, mSyncLookback); in toJson() 764 json.put(AccountColumns.SYNC_INTERVAL, mSyncInterval); in toJson() [all …]
|
D | HostAuth.java | 32 import org.json.JSONException; 33 import org.json.JSONObject; 258 final JSONObject json = new JSONObject(); in toJson() local 259 json.put(HostAuthColumns.PROTOCOL, mProtocol); in toJson() 260 json.put(HostAuthColumns.ADDRESS, mAddress); in toJson() 261 json.put(HostAuthColumns.PORT, mPort); in toJson() 262 json.put(HostAuthColumns.FLAGS, mFlags); in toJson() 263 json.put(HostAuthColumns.LOGIN, mLogin); in toJson() 264 json.putOpt(HostAuthColumns.PASSWORD, mPassword); in toJson() 265 json.putOpt(HostAuthColumns.DOMAIN, mDomain); in toJson() [all …]
|
D | Credential.java | 15 import org.json.JSONException; 16 import org.json.JSONObject; 174 final JSONObject json = new JSONObject(); in toJson() local 175 json.put(PROVIDER_COLUMN, mProviderId); in toJson() 176 json.putOpt(ACCESS_TOKEN_COLUMN, mAccessToken); in toJson() 177 json.putOpt(REFRESH_TOKEN_COLUMN, mRefreshToken); in toJson() 178 json.put(EXPIRATION_COLUMN, mExpiration); in toJson() 179 return json; in toJson() 186 protected static Credential fromJson(final JSONObject json) { in fromJson() argument 189 c.mProviderId = json.getString(PROVIDER_COLUMN); in fromJson() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | InstallShortcutReceiver.java | 35 import org.json.JSONObject; 36 import org.json.JSONStringer; 37 import org.json.JSONTokener; 88 JSONStringer json = new JSONStringer() in addToInstallQueue() local 95 json = json.key(ICON_KEY).value( in addToInstallQueue() 100 json = json.key(ICON_RESOURCE_NAME_KEY).value(info.iconResource.resourceName); in addToInstallQueue() 101 json = json.key(ICON_RESOURCE_PACKAGE_NAME_KEY) in addToInstallQueue() 104 json = json.endObject(); in addToInstallQueue() 106 if (DBG) Log.d(TAG, "Adding to APPS_PENDING_INSTALL: " + json); in addToInstallQueue() 107 addToStringSet(sharedPrefs, editor, APPS_PENDING_INSTALL, json.toString()); in addToInstallQueue() [all …]
|
/packages/apps/Email/tests/src/com/android/emailcommon/provider/ |
D | AccountTest.java | 22 import org.json.JSONException; 23 import org.json.JSONObject; 29 final JSONObject json = new JSONObject(); in testDeserializeFromJSON() local 30 json.put(EmailContent.AccountColumns.DISPLAY_NAME, "David Hasselhoff"); in testDeserializeFromJSON() 31 json.put(EmailContent.AccountColumns.EMAIL_ADDRESS, "dhoff@example.com"); in testDeserializeFromJSON() 32 json.put(EmailContent.AccountColumns.SYNC_LOOKBACK, 42); in testDeserializeFromJSON() 33 json.put(EmailContent.AccountColumns.SYNC_INTERVAL, 99); in testDeserializeFromJSON() 34 json.put(Account.JSON_TAG_HOST_AUTH_RECV, getHostAuthJSON("receiver", "recpass").toJson()); in testDeserializeFromJSON() 35 json.put(Account.JSON_TAG_HOST_AUTH_SEND, getHostAuthJSON("send", "sendpass").toJson()); in testDeserializeFromJSON() 36 json.put(EmailContent.AccountColumns.FLAGS, 22); in testDeserializeFromJSON() [all …]
|
D | HostAuthTests.java | 24 import org.json.JSONException; 25 import org.json.JSONObject; 224 final JSONObject json = new JSONObject(); in testDeserializeFromJSON() local 225 json.put(EmailContent.HostAuthColumns.PROTOCOL, "IMAP"); in testDeserializeFromJSON() 226 json.put(EmailContent.HostAuthColumns.ADDRESS, "dhoff@example.com"); in testDeserializeFromJSON() 227 json.put(EmailContent.HostAuthColumns.PORT, 1337); in testDeserializeFromJSON() 228 json.put(EmailContent.HostAuthColumns.FLAGS, 293847); in testDeserializeFromJSON() 229 json.put(EmailContent.HostAuthColumns.LOGIN, "dhoff"); in testDeserializeFromJSON() 230 json.put(EmailContent.HostAuthColumns.PASSWORD, "daknightrida"); in testDeserializeFromJSON() 231 json.put(EmailContent.HostAuthColumns.DOMAIN, "example.com"); in testDeserializeFromJSON() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/preferences/ |
D | SimpleBackupSharedPreference.java | 21 import org.json.JSONArray; 22 import org.json.JSONException; 23 import org.json.JSONObject; 58 final JSONObject json = new JSONObject(); in toJson() local 59 json.put(KEY, mKey); in toJson() 66 json.put(VALUE, array); in toJson() 68 json.put(VALUE, mValue); in toJson() 70 return json; in toJson() 73 public static BackupSharedPreference fromJson(final JSONObject json) throws JSONException { in fromJson() argument 74 Object value = json.get(VALUE); in fromJson() [all …]
|
D | BackupSharedPreference.java | 19 import org.json.JSONException; 20 import org.json.JSONObject;
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | InstallShortcutReceiver.java | 38 import org.json.*; 84 JSONStringer json = new JSONStringer() in addToInstallQueue() local 91 json = json.key(ICON_KEY).value( in addToInstallQueue() 96 json = json.key(ICON_RESOURCE_NAME_KEY).value(info.iconResource.resourceName); in addToInstallQueue() 97 json = json.key(ICON_RESOURCE_PACKAGE_NAME_KEY) in addToInstallQueue() 100 json = json.endObject(); in addToInstallQueue() 102 addToStringSet(sharedPrefs, editor, APPS_PENDING_INSTALL, json.toString()); in addToInstallQueue() 104 } catch (org.json.JSONException e) { in addToInstallQueue() 119 for (String json : strings) { in getAndClearInstallQueue() 121 JSONObject object = (JSONObject) new JSONTokener(json).nextValue(); in getAndClearInstallQueue() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/compat/ |
D | PackageInstallerCompatV16.java | 26 import org.json.JSONException; 27 import org.json.JSONObject; 28 import org.json.JSONStringer; 29 import org.json.JSONTokener; 91 final String json = mPrefs.getString(packageName, null); in replayUpdates() local 92 if (!TextUtils.isEmpty(json)) { in replayUpdates() 93 updates.add(infoFromJson(packageName, json)); in replayUpdates() 144 private static PackageInstallInfo infoFromJson(String packageName, String json) { in infoFromJson() argument 147 JSONObject object = (JSONObject) new JSONTokener(json).nextValue(); in infoFromJson() 159 JSONStringer json = new JSONStringer() in infoToJson() local [all …]
|
/packages/apps/UnifiedEmail/tests/src/com/android/mail/providers/ |
D | AccountTests.java | 25 import org.json.JSONException; 26 import org.json.JSONObject; 63 final JSONObject json = new JSONObject(); in testDeserializeNullSenderNameUsingJSON() local 65 json.put(UIProvider.AccountColumns.NAME, "name"); in testDeserializeNullSenderNameUsingJSON() 66 json.put(UIProvider.AccountColumns.TYPE, "type"); in testDeserializeNullSenderNameUsingJSON() 67 json.put(UIProvider.AccountColumns.PROVIDER_VERSION, 1); in testDeserializeNullSenderNameUsingJSON() 68 json.put(UIProvider.AccountColumns.CAPABILITIES, 2); in testDeserializeNullSenderNameUsingJSON() 71 json.put(UIProvider.AccountColumns.SENDER_NAME, null); in testDeserializeNullSenderNameUsingJSON() 73 final Account account = Account.newInstance(json.toString()); in testDeserializeNullSenderNameUsingJSON()
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/model/ |
D | ContactLoader.java | 57 import org.json.JSONArray; 58 import org.json.JSONException; 59 import org.json.JSONObject; 354 final JSONObject json = new JSONObject(jsonString); in loadEncodedContactEntity() local 359 final String displayName = json.optString(Contacts.DISPLAY_NAME); in loadEncodedContactEntity() 360 final String altDisplayName = json.optString( in loadEncodedContactEntity() 362 final int displayNameSource = json.getInt(Contacts.DISPLAY_NAME_SOURCE); in loadEncodedContactEntity() 363 final String photoUri = json.optString(Contacts.PHOTO_URI, null); in loadEncodedContactEntity() 385 final String accountName = json.optString(RawContacts.ACCOUNT_NAME, null); in loadEncodedContactEntity() 388 final String accountType = json.getString(RawContacts.ACCOUNT_TYPE); in loadEncodedContactEntity() [all …]
|
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/model/ |
D | ContactLoaderTest.java | 42 import org.json.JSONException; 43 import org.json.JSONObject; 279 JSONObject json = new JSONObject(); in testLoadContactReturnDirectoryContactWithoutDisplayName() local 280 json.put(Contacts.NAME_RAW_CONTACT_ID, CONTACT_ID); in testLoadContactReturnDirectoryContactWithoutDisplayName() 281 json.put(Contacts.DISPLAY_NAME_SOURCE, DisplayNameSources.STRUCTURED_NAME); in testLoadContactReturnDirectoryContactWithoutDisplayName() 282 json.put(Contacts.CONTENT_ITEM_TYPE, itemJson); in testLoadContactReturnDirectoryContactWithoutDisplayName() 285 .encodedFragment(json.toString()) in testLoadContactReturnDirectoryContactWithoutDisplayName()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | JsonBackedSuggestionExtras.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 36 public JsonBackedSuggestionExtras(String json) throws JSONException { in JsonBackedSuggestionExtras() argument 37 mExtras = new JSONObject(json); in JsonBackedSuggestionExtras()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/data/ |
D | UserPresetsManager.java | 85 String json; field in UserPresetsManager.SaveOperation 92 op.json = preset.getJsonString(ImagePreset.JASON_SAVED); in save() 133 mUserPresets.insertStack(op.name, op.json.getBytes()); in processSave()
|
D | FilterStackSource.java | 147 String json = new String(b); in getAllUserPresets() local 150 preset.readJsonFromString(json); in getAllUserPresets()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/ |
D | GoogleSuggestClient.java | 41 import org.json.JSONArray; 42 import org.json.JSONException;
|
/packages/apps/Email/src/com/android/email/ |
D | Preferences.java | 27 import org.json.JSONArray; 28 import org.json.JSONException;
|