MCPcopy Index your code
hub / github.com/callstack/agent-device / applyAndroidRuntimeHints

Function applyAndroidRuntimeHints

src/daemon/runtime-hints.ts:79–93  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  packageName: string,
  transport: ResolvedRuntimeTransport,
)

Source from the content-addressed store, hash-verified

77}
78
79async function applyAndroidRuntimeHints(
80 device: DeviceInfo,
81 packageName: string,
82 transport: ResolvedRuntimeTransport,
83): Promise<void> {
84 assertAndroidRuntimePackageName(packageName);
85 const currentXml = await readAndroidDevPrefs(device, packageName);
86 let nextXml = upsertAndroidStringPref(
87 currentXml,
88 ANDROID_DEBUG_HOST_KEY,
89 `${transport.host}:${transport.port}`,
90 );
91 nextXml = upsertAndroidBooleanPref(nextXml, ANDROID_HTTPS_KEY, transport.scheme === 'https');
92 await writeAndroidDevPrefs(device, packageName, nextXml);
93}
94
95async function clearAndroidRuntimeHints(device: DeviceInfo, packageName: string): Promise<void> {
96 assertAndroidRuntimePackageName(packageName);

Callers 1

applyRuntimeHintsToAppFunction · 0.85

Calls 5

readAndroidDevPrefsFunction · 0.85
upsertAndroidStringPrefFunction · 0.85
upsertAndroidBooleanPrefFunction · 0.85
writeAndroidDevPrefsFunction · 0.85

Tested by

no test coverage detected