Home
last modified time | relevance | path

Searched refs:json (Results 1 – 25 of 62) sorted by relevance

123

/packages/apps/UnifiedEmail/src/com/android/mail/providers/
DSettings.java37 import org.json.JSONException;
38 import org.json.JSONObject;
203 private Settings(JSONObject json) { in Settings() argument
204 signature = json.optString(SettingsColumns.SIGNATURE, sDefault.signature); in Settings()
205 mAutoAdvance = json.optInt(SettingsColumns.AUTO_ADVANCE, sDefault.getAutoAdvanceSetting()); in Settings()
206 snapHeaders = json.optInt(SettingsColumns.SNAP_HEADERS, sDefault.snapHeaders); in Settings()
207 replyBehavior = json.optInt(SettingsColumns.REPLY_BEHAVIOR, sDefault.replyBehavior); in Settings()
208 convListIcon = json.optInt(SettingsColumns.CONV_LIST_ICON, sDefault.convListIcon); in Settings()
209 confirmDelete = json.optBoolean(SettingsColumns.CONFIRM_DELETE, sDefault.confirmDelete); in Settings()
210 confirmArchive = json.optBoolean(SettingsColumns.CONFIRM_ARCHIVE, sDefault.confirmArchive); in Settings()
[all …]
DAccount.java41 import org.json.JSONArray;
42 import org.json.JSONException;
43 import org.json.JSONObject;
263 JSONObject json = new JSONObject(); in serialize() local
265 json.put(AccountColumns.NAME, displayName); in serialize()
266 json.put(AccountColumns.TYPE, type); in serialize()
267 json.put(AccountColumns.SENDER_NAME, senderName); in serialize()
268 json.put(AccountColumns.ACCOUNT_MANAGER_NAME, accountManagerName); in serialize()
269 json.put(AccountColumns.ACCOUNT_ID, accountId); in serialize()
270 json.put(AccountColumns.PROVIDER_VERSION, providerVersion); in serialize()
[all …]
DReplyFromAccount.java28 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 …]
DListParams.java25 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()
/packages/apps/Bluetooth/src/com/android/bluetooth/pbapclient/
DBluetoothPbapCard.java24 import org.json.JSONArray;
25 import org.json.JSONException;
26 import org.json.JSONObject;
65 JSONObject json = new JSONObject();
68 json.put("handle", handle);
69 json.put("N", N);
70 json.put("lastName", lastName);
71 json.put("firstName", firstName);
72 json.put("middleName", middleName);
73 json.put("prefix", prefix);
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Djsoncheckertest.cpp44 char* json = (char*)malloc(length + 1); in ReadFile() local
45 size_t readLength = fread(json, 1, length, fp); in ReadFile()
46 json[readLength] = '\0'; in ReadFile()
48 return json; in ReadFile()
63 char* json = ReadFile(filename, length); in TEST() local
64 if (!json) { in TEST()
71 document.Parse((const char*)json); in TEST()
74 document.Parse<kParseIterativeFlag>((const char*)json); in TEST()
77 free(json); in TEST()
84 char* json = ReadFile(filename, length); in TEST() local
[all …]
Dnamespacetest.cpp19 #define RAPIDJSON_NAMESPACE my::rapid::json
20 #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json {
32 static const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\"… variable
39 doc.Parse(json); in TEST()
50 StringStream s(json); in TEST()
57 EXPECT_STREQ(json, buffer.GetString()); in TEST()
58 EXPECT_EQ(sizeof(json)-1, buffer.GetSize()); in TEST()
68 EXPECT_STREQ(json, buffer.GetString()); in TEST()
Dprettywritertest.cpp154 char* json = (char*)malloc(size + 1); in TEST() local
155 size_t readLength = fread(json, 1, size, fp); in TEST()
156 json[readLength] = '\0'; in TEST()
159 EXPECT_STREQ(kPrettyJson, json); in TEST()
160 free(json); in TEST()
Dwritertest.cpp37 #define TEST_ROUNDTRIP(json) \ argument
39 StringStream s(json); \
44 EXPECT_STREQ(json, buffer.GetString()); \
111 …const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.141… in TEST() local
115 StringStream s(json); in TEST()
120 EXPECT_STREQ(json, buffer.GetString()); in TEST()
125 StringStream s(json); in TEST()
137 EXPECT_STREQ(json, buffer2.GetString()); in TEST()
Dreadertest.cpp714 char *json = StrDup("[ ] "); in TEST() local
715 InsituStringStream s(json); in TEST()
720 free(json); in TEST()
724 char *json = StrDup("[1, 2, 3, 4]"); in TEST() local
725 InsituStringStream s(json); in TEST()
730 free(json); in TEST()
798 …const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123,… in TEST() local
802 char* json2 = StrDup(json); in TEST()
813 StringStream s(json); in TEST()
1009 …const char* json = "{ \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123,… in TEST() local
[all …]
/packages/services/Car/bluetooth/bt-map-client-lib/src/com/google/android/auto/mapservice/
DBluetoothMapMessagesListing.java30 import org.json.JSONException;
31 import org.json.JSONObject;
149 JSONObject json = new JSONObject(); in toString() local
151 json.put("handle", mHandle); in toString()
152 json.put("subject", mSubject); in toString()
153 json.put("datetime", mDateTime); in toString()
154 json.put("sender_name", mSender); in toString()
155 json.put("sender_addressing", mSenderAddress); in toString()
156 json.put("replyto_addressing", mReplyAddress); in toString()
157 json.put("recipient_name", mRecipient); in toString()
[all …]
/packages/experimental/procstatlog/
Dprocstatreport.py19 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/tests/src/com/android/emailcommon/provider/
DAccountTest.java22 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 …]
DHostAuthTests.java24 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/
DSimpleBackupSharedPreference.java21 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 …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
DHostAuth.java32 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 …]
DAccount.java38 import org.json.JSONException;
39 import org.json.JSONObject;
757 final JSONObject json = toJson(); in toJsonString() local
758 if (json != null) { in toJsonString()
759 return json.toString(); in toJsonString()
766 final JSONObject json = new JSONObject(); in toJson() local
767 json.putOpt(AccountColumns.DISPLAY_NAME, mDisplayName); in toJson()
768 json.put(AccountColumns.EMAIL_ADDRESS, mEmailAddress); in toJson()
769 json.put(AccountColumns.SYNC_LOOKBACK, mSyncLookback); in toJson()
770 json.put(AccountColumns.SYNC_INTERVAL, mSyncInterval); in toJson()
[all …]
DCredential.java15 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/UnifiedEmail/tests/src/com/android/mail/providers/
DAccountTests.java25 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/Launcher2/src/com/android/launcher2/
DInstallShortcutReceiver.java38 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/Test/connectivity/sl4n/rapidjson/example/tutorial/
Dtutorial.cpp15 …const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":12… in main() local
16 printf("Original JSON:\n %s\n", json); in main()
22 if (document.Parse(json).HasParseError()) in main()
26 char buffer[sizeof(json)]; in main()
27 memcpy(buffer, json, sizeof(json)); in main()
/packages/apps/Launcher3/src/com/android/launcher3/
DInstallShortcutReceiver.java38 import org.json.JSONException;
39 import org.json.JSONObject;
40 import org.json.JSONStringer;
41 import org.json.JSONTokener;
327 JSONStringer json = new JSONStringer() in encodeToString() local
333 json = json.key(ICON_KEY).value( in encodeToString()
338 json = json.key(ICON_RESOURCE_NAME_KEY).value(iconResource.resourceName); in encodeToString()
339 json = json.key(ICON_RESOURCE_PACKAGE_NAME_KEY) in encodeToString()
342 return json.endObject().toString(); in encodeToString()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DJsonBackedSuggestionExtras.java18 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/ContactsCommon/src/com/android/contacts/common/list/
DPhoneNumberPickerFragment.java36 import org.json.JSONException;
37 import org.json.JSONObject;
386 JSONObject json = new JSONObject(lookupKey); in maybeTrackAnalytics() local
388 String analyticsCategory = json.getString( in maybeTrackAnalytics()
390 String analyticsAction = json.getString( in maybeTrackAnalytics()
392 String analyticsValue = json.getString( in maybeTrackAnalytics()
/packages/apps/Test/connectivity/sl4n/rapidjson/doc/
Dstream.md21 const char json[] = "[1, 2, 3, 4]";
22 StringStream s(json);
32 const char json[] = "[1, 2, 3, 4]";
34 d.Parse(json);
80 FILE* fp = fopen("big.json", "rb"); // non-Windows use "r"
106 d.Parse(json);
109 FILE* fp = fopen("output.json", "wb"); // non-Windows use "w"
146 FILE* fp = fopen("utf16le.json", "rb"); // non-Windows use "r"
171 FILE* fp = fopen("output_utf32le.json", "wb"); // non-Windows use "w"
199 FILE* fp = fopen("any.json", "rb"); // non-Windows use "r"
[all …]

123