Adds the device data to the report.
@param context
@throws JSONException if the device data cannot be added
550201
private void buildDeviceData(Context context) throws JSONException {
        device = new JSONObject();
        device.put("device", Build.DEVICE);
        device.put("brand", Build.BRAND);

        Object windowService = context.getSystemService(Context.WINDOW_SERVICE);
        if (windowService instanceof WindowManager) {
            Display display = ((WindowManager)windowService).getDefaultDisplay();
            device.put("resolution", display.getWidth() + "x" + display.getHeight());
            device.put("orientation", display.getOrientation());
        }
        device.put("display", Build.DISPLAY);
        device.put("manufacturer", Build.MANUFACTURER);
        device.put("model", Build.MODEL);
        device.put("product", Build.PRODUCT);
        device.put("build.type", Build.TYPE);
        device.put("android.version", Build.VERSION.SDK_INT);
    }
1319095
public void init(HttpInboundServiceContext context) {
        this.isc = context;
        this.message = context.getResponse();
        this.body = null;
    }
300585
public void setContext(Context context) {
        context.put(JavacElements.class, this);
        javaCompiler = JavaCompiler.instance(context);
        syms = Symtab.instance(context);
        names = Names.instance(context);
        types = Types.instance(context);
        enter = Enter.instance(context);
    }
384322
@Override
    public void putContext(@SuppressWarnings("rawtypes") Class key,
            Object contextObject) {
        if (wrappedContext == null) {
            super.putContext(key, contextObject);
        } else {
            wrappedContext.putContext(key, contextObject);
        }
    }
148033
protected void configureContext(Context context) {
		this.contextLifecycleListeners.forEach(context::addLifecycleListener);
		new DisableReferenceClearingContextCustomizer().customize(context);
		this.tomcatContextCustomizers
				.forEach((customizer) -> customizer.customize(context));
	}
517244
@Override
	public void setData(int contextId, int type, List<String> dataList) throws DatabaseException {
		this.deleteAllDataForContextAndType(contextId, type);
		for (String data : dataList) {
			this.insert(contextId, type, data);
		}
	}
507578
void writeODataMetadata(String contextURL) throws XMLStreamException {

        xmlWriter.writeNamespace(METADATA, nsConfigurationProvider.getOdataMetadataNs());
        xmlWriter.writeNamespace(ODATA_DATA, nsConfigurationProvider.getOdataDataNs());
        xmlWriter.writeDefaultNamespace(ATOM_NS);
        xmlWriter.writeAttribute(nsConfigurationProvider.getOdataMetadataNs(), ODATA_CONTEXT, contextURL);
        xmlWriter.writeAttribute(ODATA_XML_BASE, oDataUri.serviceRoot());
    }
310991
public static void startActivity(@NonNull Context context, @Nullable JSONObject jsonObject) {
        Intent intent = new Intent(context, JSONViewerActivity.class);
        Bundle bundle = new Bundle();
        if (jsonObject != null) {
            bundle.putString(JSON_OBJECT_STATE, jsonObject.toString());
        }
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
441093
public void insert(final DeviceData deviceData, final String[] argin) {
        DevVarStringArrayHelper.insert(deviceData.getAny(), argin);
    }
970825
def handle_device_json(self, data):
        """"""
        self._device_json.insert(0, data)
        self._device_json.pop()
636364
public ApiResponse<DeviceEnvelope> addDeviceWithHttpInfo(Device device) throws ApiException {
        com.squareup.okhttp.Call call = addDeviceValidateBeforeCall(device, null, null);
        Type localVarReturnType = new TypeToken<DeviceEnvelope>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1250055
public function addContext(Context $context) {
    $contexts = $this->get('contextOut');
    $contexts[] = $context;
    $this->add('contextOut', $contexts);
  }
447800
@Override
  public void addUserMetadata(String key, String value)
  {
    this.s3Metadata.addUserMetadata(key, value);
  }
456993
public void addData(LofPoint addedPoint)
    {
        this.dataIdList.add(addedPoint.getDataId());
        this.dataMap.put(addedPoint.getDataId(), addedPoint);
    }
1089512
def added(self, context):
        """"""
        context.ansi = ANSIFormatter(self._enable)
        context.aprint = context.ansi.aprint
142988
public void setFromJSON(Context context, JSONObject properties) {
        String backgroundResStr = optString(properties, Properties.background);
        if (backgroundResStr != null && !backgroundResStr.isEmpty()) {
            final int backgroundResId = getId(context, backgroundResStr, "drawable");
            setBackGround(context.getResources().getDrawable(backgroundResId, null));
        }

        setBackgroundColor(getJSONColor(properties, Properties.background_color, getBackgroundColor()));
        setGravity(optInt(properties, TextContainer.Properties.gravity, getGravity()));
        setRefreshFrequency(optEnum(properties, Properties.refresh_freq, getRefreshFrequency()));
        setTextColor(getJSONColor(properties, Properties.text_color, getTextColor()));
        setText(optString(properties, Properties.text, (String) getText()));
        setTextSize(optFloat(properties, Properties.text_size, getTextSize()));

        final JSONObject typefaceJson = optJSONObject(properties, Properties.typeface);

        if (typefaceJson != null) {
            try {
                Typeface typeface = WidgetLib.getTypefaceManager().getTypeface(typefaceJson);
                setTypeface(typeface);
            } catch (Throwable e) {
                Log.e(TAG, e, "Couldn't set typeface from properties: %s", typefaceJson);
            }
        }
    }
584794
@Override
    public void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts) throws IOException, RDFParseException, RepositoryException {
        getClient().sendAdd(in, baseURI, dataFormat, contexts);
    }