This source file includes following definitions.
- addIntentExtras
- toString
package org.chromium.content.app;
import android.content.Intent;
public class ChromiumLinkerParams {
public final long mBaseLoadAddress;
public final boolean mWaitForSharedRelro;
public final String mTestRunnerClassName;
private static final String EXTRA_LINKER_PARAMS_BASE_LOAD_ADDRESS =
"org.chromium.content.common.linker_params.base_load_address";
private static final String EXTRA_LINKER_PARAMS_WAIT_FOR_SHARED_RELRO =
"org.chromium.content.common.linker_params.wait_for_shared_relro";
private static final String EXTRA_LINKER_PARAMS_TEST_RUNNER_CLASS_NAME =
"org.chromium.content.common.linker_params.test_runner_class_name";
public ChromiumLinkerParams(long baseLoadAddress,
boolean waitForSharedRelro,
String testRunnerClassName) {
mBaseLoadAddress = baseLoadAddress;
mWaitForSharedRelro = waitForSharedRelro;
mTestRunnerClassName = testRunnerClassName;
}
public ChromiumLinkerParams(Intent intent) {
mBaseLoadAddress = intent.getLongExtra(EXTRA_LINKER_PARAMS_BASE_LOAD_ADDRESS, 0);
mWaitForSharedRelro = intent.getBooleanExtra(
EXTRA_LINKER_PARAMS_WAIT_FOR_SHARED_RELRO, false);
mTestRunnerClassName = intent.getStringExtra(
EXTRA_LINKER_PARAMS_TEST_RUNNER_CLASS_NAME);
}
public void addIntentExtras(Intent intent) {
intent.putExtra(EXTRA_LINKER_PARAMS_BASE_LOAD_ADDRESS, mBaseLoadAddress);
intent.putExtra(EXTRA_LINKER_PARAMS_WAIT_FOR_SHARED_RELRO, mWaitForSharedRelro);
intent.putExtra(EXTRA_LINKER_PARAMS_TEST_RUNNER_CLASS_NAME, mTestRunnerClassName);
}
public String toString() {
return String.format(
"LinkerParams(baseLoadAddress:0x%x, waitForSharedRelro:%s, " +
"testRunnerClassName:%s",
mBaseLoadAddress,
mWaitForSharedRelro ? "true" : "false",
mTestRunnerClassName);
}
}