/developers/build/prebuilts/gradle/DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/ |
Alarm.java | 20 import org.json.JSONObject; 60 JSONObject jsonObject = new JSONObject(); 62 jsonObject.put("id", id); 63 jsonObject.put("month", month); 64 jsonObject.put("date", date); 65 jsonObject.put("hour", hour); 66 jsonObject.put("minute", minute); 70 return jsonObject.toString() [all...] |
/developers/samples/android/security/DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/ |
Alarm.java | 20 import org.json.JSONObject; 60 JSONObject jsonObject = new JSONObject(); 62 jsonObject.put("id", id); 63 jsonObject.put("month", month); 64 jsonObject.put("date", date); 65 jsonObject.put("hour", hour); 66 jsonObject.put("minute", minute); 70 return jsonObject.toString() [all...] |
/development/samples/browseable/DirectBoot/src/com.example.android.directboot/alarms/ |
Alarm.java | 20 import org.json.JSONObject; 60 JSONObject jsonObject = new JSONObject(); 62 jsonObject.put("id", id); 63 jsonObject.put("month", month); 64 jsonObject.put("date", date); 65 jsonObject.put("hour", hour); 66 jsonObject.put("minute", minute); 70 return jsonObject.toString() [all...] |
/external/vogar/src/vogar/monitor/ |
TargetMonitor.java | 20 import com.google.gson.JsonObject; 67 JsonObject jsonObject = new JsonObject(); 68 jsonObject.addProperty("outcome", outcomeName); 69 writer.print(marker + gson.toJson(jsonObject) + "\n"); 77 JsonObject jsonObject = new JsonObject(); 78 jsonObject.addProperty("result", result.name()) [all...] |
HostMonitor.java | 19 import com.google.gson.JsonObject; 122 } else if (o instanceof JsonObject) { 123 JsonObject jsonObject = (JsonObject) o; 124 if (jsonObject.get("outcome") != null) { 125 currentOutcome = jsonObject.get("outcome").getAsString(); 128 } else if (jsonObject.get("result") != null) { 129 Result currentResult = Result.valueOf(jsonObject.get("result").getAsString()); 133 } else if (jsonObject.get("completedNormally") != null) [all...] |
/tools/tradefederation/core/src/com/android/tradefed/util/ |
SubprocessEventHelper.java | 22 import org.json.JSONObject; 64 public TestRunStartedEventInfo(JSONObject jsonObject) throws JSONException { 65 mRunName = jsonObject.getString(RUNNAME_KEY); 66 mTestCount = jsonObject.getInt(TESTCOUNT_KEY); 71 JSONObject tags = new JSONObject(); 96 public TestRunFailedEventInfo(JSONObject jsonObject) throws JSONException { 97 mReason = jsonObject.getString(REASON_KEY) [all...] |
/developers/build/prebuilts/gradle/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/service/model/ |
SavedAutofillValue.java | 23 import org.json.JSONObject; 32 public static SavedAutofillValue fromJson(JSONObject jsonObject) { 33 if (jsonObject == null) { 40 !jsonObject.isNull("textValue") ? jsonObject.getString("textValue") : null; 42 !jsonObject.isNull("dateValue") ? jsonObject.getLong("dateValue") : null; 44 (!jsonObject.isNull("toggleValue") ? jsonObject.getBoolean("toggleValue") : null) [all...] |
ClientFormData.java | 26 import org.json.JSONObject; 51 public static ClientFormData fromJson(JSONObject jsonObject) { 54 String datasetName = jsonObject.has("datasetName") ? 55 jsonObject.getString("datasetName") : null; 56 JSONObject valuesJson = jsonObject.getJSONObject("values"); 60 JSONObject valueAsJson = valuesJson 158 public JSONObject toJson() { 159 JSONObject jsonObject = new JSONObject() [all...] |
/developers/build/prebuilts/gradle/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/service/model/ |
SavedAutofillValue.java | 23 import org.json.JSONObject; 32 public static SavedAutofillValue fromJson(JSONObject jsonObject) { 33 if (jsonObject == null) { 40 !jsonObject.isNull("textValue") ? jsonObject.getString("textValue") : null; 42 !jsonObject.isNull("dateValue") ? jsonObject.getLong("dateValue") : null; 44 (!jsonObject.isNull("toggleValue") ? jsonObject.getBoolean("toggleValue") : null) [all...] |
ClientFormData.java | 26 import org.json.JSONObject; 51 public static ClientFormData fromJson(JSONObject jsonObject) { 54 String datasetName = jsonObject.has("datasetName") ? 55 jsonObject.getString("datasetName") : null; 56 JSONObject valuesJson = jsonObject.getJSONObject("values"); 60 JSONObject valueAsJson = valuesJson 158 public JSONObject toJson() { 159 JSONObject jsonObject = new JSONObject() [all...] |
/frameworks/av/drm/mediadrm/plugins/clearkey/ |
JsonWebKey.h | 50 bool findKey(const String8& jsonObject, String8* keyId, 53 bool isJsonWebKeySet(const String8& jsonObject) const; 54 bool parseJsonObject(const String8& jsonObject, Vector<String8>* tokens);
|
JsonWebKey.cpp | 132 bool JsonWebKey::findKey(const String8& jsonObject, String8* keyId, 138 if (jsonObject.find(kKeyTypeTag) >= 0) { 144 if (jsonObject.find(kKeyIdTag) >= 0) { 148 if (jsonObject.find(kKeyTag) >= 0) { 170 bool JsonWebKey::isJsonWebKeySet(const String8& jsonObject) const { 171 if (jsonObject.find(kKeysTag) == -1) { 183 bool JsonWebKey::parseJsonObject(const String8& jsonObject, 189 jsonObject.string(), jsonObject.size(), NULL, 0); 200 int status = jsmn_parse(&parser, jsonObject.string() [all...] |
/frameworks/av/drm/mediacas/plugins/clearkey/ |
JsonAssetLoader.h | 47 bool findKey(const String8& jsonObject, Asset *asset); 51 const String8& jsonObject, Vector<String8>* tokens);
|
JsonAssetLoader.cpp | 88 bool JsonAssetLoader::findKey(const String8& jsonObject, Asset *asset) { 92 if (jsonObject.find(kIdTag) < 0) { 99 if (jsonObject.find(kNameTag) < 0) { 106 if (jsonObject.find(kLowerCaseOgranizationNameTag) < 0) { 113 if (jsonObject.find(kCasTypeTag) < 0) { 145 bool JsonAssetLoader::parseJsonObject(const String8& jsonObject, 151 jsonObject.string(), jsonObject.size(), NULL, 0); 162 int status = jsmn_parse(&parser, jsonObject.string(), 163 jsonObject.size(), mJsmnTokens.editArray(), numTokens) [all...] |
/test/vts/harnesses/tradefed/src/com/android/tradefed/testtype/ |
VtsMultiDeviceTest.java | 40 import org.json.JSONObject; 485 * Populate a jsonObject with default fields. 490 * @param jsonObject the target json object to populate 495 private void populateDefaultJsonFields(JSONObject jsonObject, String testCaseDataDir) 499 JSONObject defaultJsonObject = new JSONObject(content); 501 JsonUtil.deepMergeJsonObjects(jsonObject, defaultJsonObject); 507 * This method calls populateDefaultJsonFields to populate the config JSONObject if the config file is missing 508 * or some required fields is missing from the JSONObject. If test name is not specified, this metho [all...] |
/developers/build/prebuilts/gradle/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
AssetUtils.java | 25 import org.json.JSONObject; 47 public static JSONObject loadJSONAsset(Context context, String asset) { 49 JSONObject jsonObject = null; 51 jsonObject = new JSONObject(jsonString); 55 return jsonObject;
|
RecipeActivity.java | 35 import org.json.JSONObject; 87 JSONObject jsonObject = AssetUtils.loadJSONAsset(this, mRecipeName); 88 if (jsonObject != null) { 89 mRecipe = Recipe.fromJson(this, jsonObject);
|
RecipeListAdapter.java | 32 import org.json.JSONObject; 57 JSONObject jsonObject = AssetUtils.loadJSONAsset(mContext, Constants.RECIPE_LIST_FILE); 58 if (jsonObject != null) { 59 List<Item> items = parseJson(jsonObject); 64 private List<Item> parseJson(JSONObject json) { 69 JSONObject item = items.getJSONObject(i);
|
/developers/samples/android/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
AssetUtils.java | 25 import org.json.JSONObject; 47 public static JSONObject loadJSONAsset(Context context, String asset) { 49 JSONObject jsonObject = null; 51 jsonObject = new JSONObject(jsonString); 55 return jsonObject;
|
RecipeActivity.java | 35 import org.json.JSONObject; 87 JSONObject jsonObject = AssetUtils.loadJSONAsset(this, mRecipeName); 88 if (jsonObject != null) { 89 mRecipe = Recipe.fromJson(this, jsonObject);
|
RecipeListAdapter.java | 32 import org.json.JSONObject; 57 JSONObject jsonObject = AssetUtils.loadJSONAsset(mContext, Constants.RECIPE_LIST_FILE); 58 if (jsonObject != null) { 59 List<Item> items = parseJson(jsonObject); 64 private List<Item> parseJson(JSONObject json) { 69 JSONObject item = items.getJSONObject(i);
|
/development/samples/browseable/RecipeAssistant/Application/src/com.example.android.wearable.recipeassistant/ |
AssetUtils.java | 25 import org.json.JSONObject; 47 public static JSONObject loadJSONAsset(Context context, String asset) { 49 JSONObject jsonObject = null; 51 jsonObject = new JSONObject(jsonString); 55 return jsonObject;
|
RecipeActivity.java | 35 import org.json.JSONObject; 87 JSONObject jsonObject = AssetUtils.loadJSONAsset(this, mRecipeName); 88 if (jsonObject != null) { 89 mRecipe = Recipe.fromJson(this, jsonObject);
|
/external/sl4a/Common/src/com/googlecode/android_scripting/rpc/ |
MethodDescriptor.java | 42 import org.json.JSONObject; 77 * (possibly an exception) in a JSONObject. 110 * (possibly an exception) in a JSONObject. 198 } else if (type == JSONObject.class) { 245 public static Object buildIntent(JSONObject jsonObject) throws JSONException { 247 if (jsonObject.has("action")) { 248 intent.setAction(jsonObject.getString("action")); 250 if (jsonObject.has("data") && jsonObject.has("type")) [all...] |
/cts/common/device-side/util/tests/src/com/android/compatibility/common/util/ |
DeviceReportTest.java | 29 import org.json.JSONObject; 136 JSONObject jsonObject = new JSONObject(metrics); 138 jsonObject.getJSONObject(STREAM_NAME_1).getDouble(TEST_MESSAGE_1) == TEST_VALUE_1); 140 jsonObject.getJSONObject(STREAM_NAME_2).getDouble(TEST_MESSAGE_2) == TEST_VALUE_2); 148 jsonObject = new JSONObject(metrics); 150 jsonObject.getJSONObject(STREAM_NAME_3).getDouble(TEST_MESSAGE_3) == TEST_VALUE_3); 152 jsonObject.getJSONObject(STREAM_NAME_4).getDouble(TEST_MESSAGE_4) == TEST_VALUE_4) [all...] |