forked from Blendman974/faceclaw
Add a light-sensor demo to the Developer app
This commit is contained in:
1 parent
aef6194687
commit
c37a9eec45
9 files changed
+525
-20
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
package com.faceclaw.app;
|
||||
|
||||
public interface FaceclawAmbientLightListener {
|
||||
/**
|
||||
* A CFW ambient-light report (settings-channel field 105) from the master
|
||||
* temple. body is the raw 24-byte ['A','L',ver,reason,...] record; it is
|
||||
* decoded on the TS side (app/native/ambient-light.ts).
|
||||
*/
|
||||
void onAmbientLight(byte[] body);
|
||||
}
|
||||
@@ -73,6 +73,8 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
|
||||
private final java.util.List<CompassSubscription> compassSubscriptions =
|
||||
new java.util.concurrent.CopyOnWriteArrayList<>();
|
||||
private final java.util.List<FaceclawAmbientLightListener> ambientLightListeners =
|
||||
new java.util.concurrent.CopyOnWriteArrayList<>();
|
||||
private final java.util.List<FaceclawMicStatusListener> micStatusListeners =
|
||||
new java.util.concurrent.CopyOnWriteArrayList<>();
|
||||
private volatile String lastFirmwareCapabilities = "";
|
||||
@@ -595,6 +597,91 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
return lastFirmwareCapabilities;
|
||||
}
|
||||
|
||||
public void addAmbientLightListener(FaceclawAmbientLightListener listener) {
|
||||
if (listener != null) {
|
||||
ambientLightListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAmbientLightListener(FaceclawAmbientLightListener listener) {
|
||||
if (listener != null) {
|
||||
ambientLightListeners.remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
private void emitAmbientLight(byte[] body) {
|
||||
if (ambientLightListeners.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
byte[] copy = java.util.Arrays.copyOf(body, body.length);
|
||||
mainHandler.post(() -> {
|
||||
for (FaceclawAmbientLightListener alsListener : ambientLightListeners) {
|
||||
try {
|
||||
alsListener.onAmbientLight(copy);
|
||||
} catch (Throwable t) {
|
||||
Log.w(TAG, "ambient light listener failed", t);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Request one CFW ambient-light report (image-handler mode 16 op 0). */
|
||||
public void queryAmbientLight() {
|
||||
synchronized (lock) {
|
||||
enqueueAmbientLightControlLocked(new byte[] { (byte) 16, (byte) 0 }, "als query", false);
|
||||
}
|
||||
interruptibleSleep.interrupt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Start or stop CFW passive light-sensor polling (image-handler mode 16
|
||||
* ops 1/2). While polling, the firmware reads its OPT3001 every intervalMs
|
||||
* (clamped 100..5000 by the firmware), never steps the panel brightness
|
||||
* itself, and pushes a field-105 report when the reading moved by at least
|
||||
* minDelta or heartbeatMs elapsed. bindToLease stops polling automatically
|
||||
* when the Faceclaw framebuffer lease is released or lapses. Starting is
|
||||
* idempotent and re-opens the sensor if the stock firmware closed it.
|
||||
*/
|
||||
public void setAmbientLightPolling(boolean enable, int intervalMs, int minDelta,
|
||||
int heartbeatMs, boolean bindToLease) {
|
||||
byte[] payload = enable
|
||||
? new byte[] {
|
||||
(byte) 16,
|
||||
(byte) 1,
|
||||
(byte) (bindToLease ? 1 : 0),
|
||||
(byte) (intervalMs & 0xff),
|
||||
(byte) ((intervalMs >> 8) & 0xff),
|
||||
(byte) (minDelta & 0xff),
|
||||
(byte) ((minDelta >> 8) & 0xff),
|
||||
(byte) (heartbeatMs & 0xff),
|
||||
(byte) ((heartbeatMs >> 8) & 0xff),
|
||||
}
|
||||
: new byte[] { (byte) 16, (byte) 2 };
|
||||
synchronized (lock) {
|
||||
clearMessagesOfKindLocked("als-control");
|
||||
enqueueAmbientLightControlLocked(payload, "als polling " + (enable ? "start" : "stop"), true);
|
||||
}
|
||||
interruptibleSleep.interrupt();
|
||||
}
|
||||
|
||||
private void enqueueAmbientLightControlLocked(byte[] payload, String label, boolean priority) {
|
||||
if (!running || !sessionReady || shutdownRequested || !fixedLayoutCreated) {
|
||||
logLine("skip " + label + "; display path not ready");
|
||||
return;
|
||||
}
|
||||
OutboundMessage message = messageBuilder.imagePayload(
|
||||
"als-control",
|
||||
DASHBOARD_TILE,
|
||||
nextMapSessionId(),
|
||||
payload,
|
||||
label,
|
||||
connectionOptions.sendImagesToLeft);
|
||||
message.onTimeout = () -> logLine(label + " ack timeout");
|
||||
if (priority) pendingMessages.addFirst(message);
|
||||
else pendingMessages.addLast(message);
|
||||
logLine("queue " + label);
|
||||
}
|
||||
|
||||
public void addMicStatusListener(FaceclawMicStatusListener listener) {
|
||||
if (listener != null) {
|
||||
micStatusListeners.add(listener);
|
||||
@@ -1410,6 +1497,15 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
emitMicStatus(micStatus, address);
|
||||
}
|
||||
}
|
||||
if (!faceclawWakeNotification
|
||||
&& frame.ok
|
||||
&& frame.sid == BleProtocol.SID_UI_SETTING) {
|
||||
// CFW ambient-light report (field 105) from the master temple.
|
||||
byte[] alsReport = BleProtocol.parseFaceclawAlsReport(frame.pb);
|
||||
if (alsReport != null) {
|
||||
emitAmbientLight(alsReport);
|
||||
}
|
||||
}
|
||||
if (!faceclawWakeNotification
|
||||
&& decodedWearState < 0
|
||||
&& frame.ok
|
||||
|
||||
@@ -57,6 +57,12 @@ public class BleProtocol {
|
||||
*/
|
||||
public static final int FACECLAW_MIC_CONTROL_FIELD = 103;
|
||||
public static final int FACECLAW_MIC_STATUS_FIELD = 104;
|
||||
/**
|
||||
* CFW als_sensor (EVENCFW/18, caps token als16): ambient-light reports on
|
||||
* settings-channel field 105, 24-byte ['A','L',ver,reason,...] records from
|
||||
* the master temple (decoded in app/native/ambient-light.ts).
|
||||
*/
|
||||
public static final int FACECLAW_ALS_REPORT_FIELD = 105;
|
||||
public static final int FACECLAW_WAKE_OP_ACQUIRE = 1;
|
||||
public static final int FACECLAW_WAKE_OP_RELEASE = 2;
|
||||
public static final int FACECLAW_WAKE_OP_CLAIM = 3;
|
||||
@@ -449,6 +455,26 @@ public class BleProtocol {
|
||||
return body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the raw CFW ambient-light report from a sid-0x09 frame, or null
|
||||
* when this is an ordinary settings frame. Only the 'A','L',version prelude
|
||||
* is validated here; the fields are decoded on the TS side.
|
||||
*/
|
||||
public static byte[] parseFaceclawAlsReport(byte[] pb) {
|
||||
if (pb == null) {
|
||||
return null;
|
||||
}
|
||||
byte[] body = readFieldBytes(stripTrailingCrc(pb), FACECLAW_ALS_REPORT_FIELD);
|
||||
if (body == null
|
||||
|| body.length < 24
|
||||
|| body[0] != 'A'
|
||||
|| body[1] != 'L'
|
||||
|| (body[2] & 0xff) != 1) {
|
||||
return null;
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the uint16 wake nonce from a CFW field-102 notification, or -1
|
||||
* when this is an ordinary settings frame.
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Add a keyboard-input button to the phone home screen
|
||||
* Navigate app: Location indicator rotates based on the compass
|
||||
* Navigate app: Darken the map background color
|
||||
* Add a light sensor demo to the Developer app
|
||||
|
||||
## 0.6.4 - 2026-09-02
|
||||
* Context menus are centered and include window title
|
||||
|
||||
@@ -2,6 +2,7 @@ import { MenuLayer, drawSubmenuIndicator, type MenuItem } from "../../ui/menu";
|
||||
import { ScreenTestLayer } from "./screen-test";
|
||||
import { BuzzerDemoLayer } from "./buzzer-demo";
|
||||
import { AccelerometerDemoLayer } from "./accelerometer-demo";
|
||||
import { LightSensorDemoLayer } from "./light-sensor-demo";
|
||||
import { ResourceUsageLayer } from "./resource-usage";
|
||||
import { LoadAppFromQrLayer, LoadAppFromUrlLayer } from "./load-app";
|
||||
import { type AppContext } from "../app-definition";
|
||||
@@ -67,6 +68,12 @@ function debugTestsMenu(): MenuLayer {
|
||||
ctx.stack.push(new AccelerometerDemoLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Light sensor",
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new LightSensorDemoLayer(DEVELOPER_WINDOW_ID, ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
],
|
||||
MENU_LAYOUT,
|
||||
);
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { GrayImage } from "../../graphics/image";
|
||||
import { clamp } from "../../util/numeric-util";
|
||||
import {
|
||||
addAmbientLightListener,
|
||||
queryAmbientLight,
|
||||
setAmbientLightPolling,
|
||||
type AmbientLightReport,
|
||||
} from "../../native/ambient-light";
|
||||
import { GESTURE_DOUBLE_CLICK, type InputEvent } from "../../ui/gestures";
|
||||
import { Layer, type LayerContext } from "../../ui/layers";
|
||||
import { shell } from "../../ui/shell/shell";
|
||||
|
||||
// Passive poll period requested from the firmware (it clamps to 100..5000 ms).
|
||||
const POLL_INTERVAL_MS = 250;
|
||||
// Report every poll (min delta 0) so the trace shows the raw reading; the
|
||||
// heartbeat only matters if the firmware ever starts filtering.
|
||||
const POLL_MIN_DELTA = 0;
|
||||
const POLL_HEARTBEAT_MS = 1_000;
|
||||
// How often to reconcile the polling on/off state with window visibility.
|
||||
const RECONCILE_INTERVAL_MS = 400;
|
||||
// Length of the on-screen trace.
|
||||
const HISTORY_MS = 30_000;
|
||||
const MAX_SAMPLES = Math.ceil(HISTORY_MS / 100) + 2;
|
||||
|
||||
type Sample = { atMs: number; value: number; peak: number };
|
||||
|
||||
/**
|
||||
* Light sensor demo: turns CFW passive light-sensor polling (mode 16) on while
|
||||
* this page is visible and off otherwise, and shows the latest OPT3001
|
||||
* reading, the stock driver's peak/target, and a 30 s trace.
|
||||
*
|
||||
* While passive polling is on the stock auto-brightness adjuster does not step
|
||||
* the panel, so the level shown here stays wherever it was set. Leaving the
|
||||
* page hands the sensor back to the stock firmware.
|
||||
*/
|
||||
export class LightSensorDemoLayer implements Layer {
|
||||
private report: AmbientLightReport | null = null;
|
||||
private readonly samples: Sample[] = [];
|
||||
private reportCount = 0;
|
||||
private enabled = false;
|
||||
private removed = false;
|
||||
private reconcileTimer: ReturnType<typeof setInterval> | null = null;
|
||||
private unsubscribe: (() => void) | null = null;
|
||||
|
||||
constructor(
|
||||
private readonly windowId: string,
|
||||
private readonly requestRender: () => void,
|
||||
) {
|
||||
this.start();
|
||||
}
|
||||
|
||||
private start(): void {
|
||||
this.unsubscribe = addAmbientLightListener((report) => {
|
||||
if (this.removed) return;
|
||||
this.report = report;
|
||||
this.reportCount++;
|
||||
const atMs = Date.now();
|
||||
if (report.readOk || !report.passive) {
|
||||
this.samples.push({ atMs, value: report.alsValue, peak: report.peak });
|
||||
const cutoff = atMs - HISTORY_MS;
|
||||
while (this.samples.length > 1 && this.samples[0]!.atMs < cutoff) this.samples.shift();
|
||||
while (this.samples.length > MAX_SAMPLES) this.samples.shift();
|
||||
}
|
||||
this.requestRender();
|
||||
});
|
||||
// Show whatever the driver currently holds before polling has started.
|
||||
queryAmbientLight();
|
||||
this.reconcileTimer = setInterval(() => this.reconcile(), RECONCILE_INTERVAL_MS);
|
||||
this.reconcile();
|
||||
}
|
||||
|
||||
/** Match the polling on/off state to whether this page is currently visible. */
|
||||
private reconcile(): void {
|
||||
if (this.removed) return;
|
||||
const visible = shell.isWindowVisible(this.windowId);
|
||||
if (visible === this.enabled) return;
|
||||
this.enabled = visible;
|
||||
setAmbientLightPolling(visible, {
|
||||
intervalMs: POLL_INTERVAL_MS,
|
||||
minDelta: POLL_MIN_DELTA,
|
||||
heartbeatMs: POLL_HEARTBEAT_MS,
|
||||
bindToLease: true,
|
||||
});
|
||||
this.requestRender();
|
||||
}
|
||||
|
||||
onRemoved(): void {
|
||||
this.removed = true;
|
||||
if (this.reconcileTimer !== null) {
|
||||
clearInterval(this.reconcileTimer);
|
||||
this.reconcileTimer = null;
|
||||
}
|
||||
this.unsubscribe?.();
|
||||
this.unsubscribe = null;
|
||||
if (this.enabled) {
|
||||
setAmbientLightPolling(false);
|
||||
this.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
paint(ctx: LayerContext): GrayImage {
|
||||
const small = getDefaultSmallFont();
|
||||
const medium = getDefaultMediumFont();
|
||||
const { width, height } = ctx.stack.getBaseSize();
|
||||
const image = new GrayImage(width, height, 0);
|
||||
|
||||
image.drawText(small, 20, 8, "Light sensor", 220);
|
||||
const status = this.enabled ? "polling" : "paused";
|
||||
image.drawText(small, width - 20 - small.measureText(status), 8, status, 150);
|
||||
|
||||
const report = this.report;
|
||||
if (!report) {
|
||||
const message = this.enabled ? "Waiting for a report…" : "Paused (page not visible).";
|
||||
image.drawText(small, 22, 44, message, 190);
|
||||
image.drawText(small, 22, 66, "Needs custom firmware with the als16", 120);
|
||||
image.drawText(small, 22, 82, "extension (EVENCFW/18 or newer).", 120);
|
||||
image.drawText(small, 20, height - 16, `${GESTURE_DOUBLE_CLICK} back`, 110);
|
||||
return image;
|
||||
}
|
||||
|
||||
// Headline reading. The stock driver's unit is roughly a tenth of a lux.
|
||||
const lux = (report.alsValue / 10).toFixed(1);
|
||||
image.drawText(medium, 22, 30, `${lux} lux`, 245);
|
||||
const peakText = `peak ${(report.peak / 10).toFixed(1)}`;
|
||||
image.drawText(small, 22 + medium.measureText(`${lux} lux`) + 14, 36, peakText, 170);
|
||||
|
||||
const flags: string[] = [];
|
||||
if (!report.opened) flags.push("sensor closed");
|
||||
if (report.passive) flags.push("passive");
|
||||
if (report.autoBrightness) flags.push("auto on");
|
||||
if (report.passive && !report.readOk) flags.push("read failed");
|
||||
image.drawText(small, 22, 58, flags.join(" ") || "stock polling", 150);
|
||||
|
||||
image.drawText(
|
||||
small,
|
||||
22,
|
||||
76,
|
||||
`brightness ${report.brightness} stock target ${report.stockTarget} gear ${report.gear} scale ${(report.scaleQ10 / 1024).toFixed(2)}`,
|
||||
170,
|
||||
);
|
||||
|
||||
// 30 s trace of the reading (bright) and the driver's 5-sample peak (dim).
|
||||
// The axis label sits between the stats line and the chart, so the chart
|
||||
// starts a full text line lower than the stats.
|
||||
const chartTop = 76 + small.lineHeight * 2 + 4;
|
||||
const bounds = { x: 20, y: chartTop, width: width - 40, height: height - chartTop - 34 };
|
||||
const maxValue = Math.max(...this.samples.map((sample) => Math.max(sample.value, sample.peak)), 10);
|
||||
const scale = roundUpScale(maxValue * 1.08);
|
||||
image.drawText(small, bounds.x, bounds.y - small.lineHeight - 2, `0–${(scale / 10).toFixed(0)} lux, last 30 s`, 120);
|
||||
drawTrace(image, this.samples, Date.now(), bounds, scale);
|
||||
|
||||
image.drawText(small, 20, height - 16, `reports: ${this.reportCount}`, 110);
|
||||
const back = `${GESTURE_DOUBLE_CLICK} back`;
|
||||
image.drawText(small, width - 20 - small.measureText(back), height - 16, back, 110);
|
||||
return image;
|
||||
}
|
||||
|
||||
async handleInput(event: InputEvent, ctx: LayerContext): Promise<void> {
|
||||
if (event.type === "double-click") {
|
||||
ctx.stack.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Round a trace ceiling up to 1/2/5 × 10^n so the axis label stays tidy. */
|
||||
function roundUpScale(value: number): number {
|
||||
const magnitude = 10 ** Math.floor(Math.log10(Math.max(value, 1)));
|
||||
for (const step of [1, 2, 5, 10]) {
|
||||
if (value <= step * magnitude) return step * magnitude;
|
||||
}
|
||||
return 10 * magnitude;
|
||||
}
|
||||
|
||||
function drawTrace(
|
||||
image: GrayImage,
|
||||
samples: readonly Sample[],
|
||||
nowMs: number,
|
||||
bounds: { x: number; y: number; width: number; height: number },
|
||||
scale: number,
|
||||
): void {
|
||||
image.drawRect(bounds.x, bounds.y, bounds.width, bounds.height, 45);
|
||||
const startMs = nowMs - HISTORY_MS;
|
||||
const series: Array<[(sample: Sample) => number, number]> = [
|
||||
[(sample) => sample.peak, 90],
|
||||
[(sample) => sample.value, 235],
|
||||
];
|
||||
for (const [value, shade] of series) {
|
||||
let previous: { x: number; y: number } | null = null;
|
||||
for (const sample of samples) {
|
||||
if (sample.atMs < startMs) continue;
|
||||
const x = bounds.x + Math.round(clamp((sample.atMs - startMs) / HISTORY_MS, 0, 1) * (bounds.width - 1));
|
||||
const y = bounds.y + bounds.height - 1 - Math.round(clamp(value(sample) / scale, 0, 1) * (bounds.height - 1));
|
||||
if (previous) image.drawLine(previous.x, previous.y, x, y, shade);
|
||||
else image.setPixel(x, y, shade);
|
||||
previous = { x, y };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,15 @@ export function hasMicControl(info: FirmwareInfo): boolean {
|
||||
return info.capabilities.trim().split(/\s+/).includes("micctl");
|
||||
}
|
||||
|
||||
/**
|
||||
* True when the firmware advertises the optional ambient-light extension:
|
||||
* image-handler mode 16 (query / passive polling of the OPT3001 light sensor)
|
||||
* with field-105 reports, used to drive a phone-side brightness policy.
|
||||
*/
|
||||
export function hasAmbientLightSensor(info: FirmwareInfo): boolean {
|
||||
return info.capabilities.trim().split(/\s+/).includes("als16");
|
||||
}
|
||||
|
||||
/** The higher of the two arms' reported versions, or "" if none reported. */
|
||||
export function reportedFirmwareVersion(info: FirmwareInfo): string {
|
||||
const versions = [info.leftVersion, info.rightVersion].map((v) => v.trim()).filter(Boolean);
|
||||
|
||||
@@ -19,7 +19,7 @@ export type FirmwarePatchSet = {
|
||||
export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
"base": "g2_2.2.9.22.bin",
|
||||
"baseSha256": "a03fbea9f68a9de6bc271daabb9f3a41c59053d1086622c76a4e990f829cc561",
|
||||
"outputSha256": "e70cfcad3b244a27d370b32377d846b4b46776d3da6bd42640617139b5cde83f",
|
||||
"outputSha256": "920f5e45129453c155d7fb004b93049985594744be973e793cf41e8b6e07005a",
|
||||
"patches": [
|
||||
{
|
||||
"offset": 1124178,
|
||||
@@ -48,7 +48,7 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1516784,
|
||||
"old": "70f775ff",
|
||||
"new": "d6f217fb",
|
||||
"new": "d6f295fa",
|
||||
"desc": "bl snapshot_side @ 0x4ec0ee (shared image-complete helper)"
|
||||
},
|
||||
{
|
||||
@@ -60,55 +60,55 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1222660,
|
||||
"old": "49f0daff",
|
||||
"new": "1ef391f9",
|
||||
"new": "1ef30ff9",
|
||||
"desc": "bl image_deferred (deferred consumer -> FIFO restore + worker, both lenses)"
|
||||
},
|
||||
{
|
||||
"offset": 1242342,
|
||||
"old": "d4f790fb",
|
||||
"new": "1af3fcfa",
|
||||
"new": "1af3faf9",
|
||||
"desc": "bl settings_send_wrapper (append caps field 100)"
|
||||
},
|
||||
{
|
||||
"offset": 1240038,
|
||||
"old": "f5f710f9",
|
||||
"new": "1af39cfc",
|
||||
"new": "1af3bafb",
|
||||
"desc": "bl settings_decode_wrapper (Faceclaw lease field 101)"
|
||||
},
|
||||
{
|
||||
"offset": 939336,
|
||||
"old": "0bf02af9",
|
||||
"new": "63f307ff",
|
||||
"new": "63f325fe",
|
||||
"desc": "bl faceclaw_display_start @ 0x45f146 (fail-open double-tap takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 939528,
|
||||
"old": "0bf0caf8",
|
||||
"new": "63f3a7fe",
|
||||
"new": "63f3c5fd",
|
||||
"desc": "bl faceclaw_display_start @ 0x45f206 (fail-open double-tap takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 831036,
|
||||
"old": "1df057fc",
|
||||
"new": "7ff39bfb",
|
||||
"new": "7ff3b3fd",
|
||||
"desc": "bl gesture_press (Faceclaw lease gates event 9 vs stock UI event 8)"
|
||||
},
|
||||
{
|
||||
"offset": 831042,
|
||||
"old": "24f023f9",
|
||||
"new": "7ff33cfc",
|
||||
"new": "7ff354fe",
|
||||
"desc": "bl gesture_short_long (Faceclaw lease gates event 11 vs stock Menu path)"
|
||||
},
|
||||
{
|
||||
"offset": 831800,
|
||||
"old": "1df0d9fa",
|
||||
"new": "7ff321fa",
|
||||
"new": "7ff339fc",
|
||||
"desc": "bl gesture_release (source-qualified event 10 vs stock UI event 0x4a)"
|
||||
},
|
||||
{
|
||||
"offset": 1553752,
|
||||
"old": "7fb50600",
|
||||
"new": "cef2b1ba",
|
||||
"new": "cef2afb9",
|
||||
"desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline"
|
||||
},
|
||||
{
|
||||
@@ -126,13 +126,13 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1255404,
|
||||
"old": "d9f758ff",
|
||||
"new": "16f3bdfc",
|
||||
"new": "16f3fbfb",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4ac3ea (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1255504,
|
||||
"old": "d9f726ff",
|
||||
"new": "16f38bfc",
|
||||
"new": "16f3c9fb",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4ac44e (outside onboarding)"
|
||||
},
|
||||
{
|
||||
@@ -144,43 +144,43 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 4476518,
|
||||
"old": "",
|
||||
"new": "02fb01f000e000bfb0b54ff2ac44c2f229040146206846f23f52c5f28802b2eb500f40f258304cf2e9124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304cf20732c2f20000c0f24802104770b500284ed001684ef66862ccf2ff02914218bf70bd90f8081190f8095146f6756c8d42c0f2510c2ad205eb8501014491f80d2191f80e4191f80ae191f80b3191f80c1142ea0424012c4ff0010298bf14466e1c054680f80961b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f80811bde870406047e047d5f8040138b142f64d42c0f244022146bde87040104770bd00bf70b542f2ed23c0f2460314460d4698474ff2a841c2f229010e6831466ff39601b1f1005f0ad131684ef66862ccf2ff02914218bf0026412d03d070bd0026412dfbd1002cf9d04cf6dd71c0f2450105468847002e01462846efd00129edd196f807120029e9d02168002948bf70bd4ff27d42c0f2590208469047284670bd00bf2de9f04f9db04ff2a84ac2f2290adaf800b058466ff39600b0f1005f40f07d81dbf800004ef66867ccf2ff07b84240f074819bf82802002800f05d81dbf82442002c00f0588140f6b400c2f20000d0f8008004a802f0caffb8f1000f00f01982032045f24075cff68070a4f1600108f160026ff0bf03c0f2020500bf0e6ed41826664e6ec03366668e6eab42a666ce6ee6660e6f26674e6f66678e6fa667ce6fe667d1f88060c4f88060d1f88460c4f88460d1f88860c4f88860d1f88c60c4f88c60d1f89060c4f89060d1f89460c4f89460d1f89860c4f89860d1f89c60c4f89c60d1f8a060c4f8a060d1f8a460c4f8a460d1f8a860c4f8a860d1f8ac60c4f8ac60d1f8b060c4f8b060d1f8b460c4f8b460d1f8b860c4f8b860d1f8bc60c4f8bc6051f8c06fc4f8c0604e68c4f8c4608e68c4f8c860ce68c4f8cc600e69c4f8d0604e69c4f8d4608e69c4f8d860ce69c4f8dc600e6ac4f8e0604e6ac4f8e4608e6ac4f8e860ce6ac4f8ec600e6bc4f8f0604e6bc4f8f4608e6bc4f8f860ce6bc4f8fc600e6cc4f800614e6cc4f804618e6cc4f80861ce6cc4f80c610e6dc4f810614e6dc4f814618e6dc4f81861ce6dc4f81c617ff462afdaf800603040b0f1005f40f0b2803068b84240f0ae8096f8ce00002840f0708196f8dc10002000298df8140000f0e88105a90a5c002a00f0bb810a185378002b00f079819378002b00f07781d378002b00f075811379002b00f073815379002b00f071819379002b00f06f81d379002b00f06d81137a002b00f06b81537a002b00f06981937a002b00f06781d37a002b00f06581137b002b00f06381537b002b00f06181937b002b00f05f81d37b002b00f05d81137c002b00f05b81537c002b00f05981937c002b00f05781d37c002b00f05581137d002b00f05381537d002b00f05181937d002b00f04f81d37d002b00f04d81137e002b00f04b81537e002b00f04981937e002b00f04781d37e002b00f04581137f002b00f04381537f002b00f04181937f002b00f03f81d27f002a00f03d81203060287ff47baf5ce19bf82a0270b1dbf82c0240b146f68051c2f207010968401a002800f3ea8000208bf82a0240f6d100c0f247001db0bde8f04f00474ff41b7004f04dfe002800f0bd804ff69451cff6ff71002200bf43183e3183f86c2283f86d2283f86e2283f86f2283f8702283f8712283f8722283f8732283f8742283f8752283f8762283f8772283f8782283f8792283f87a2283f87b2283f87c2283f87d2283f87e2283f87f2283f8802283f8812283f8822283f8832283f8842283f8852283f8862283f8872283f8882283f8892283f88a2283f88b2283f88c2283f88d2283f88e2283f88f2283f8902283f8912283f8922283f8932283f8942283f8952283f8962283f8972283f8982283f8992283f89a2283f89b2283f89c2283f89d2283f89e2283f89f2283f8a02283f8a12283f8a22283f8a32283f8a42283f8a52283f8a62283f8a72283f8a82283f8a9227ff480af012180f8ce104ff0ff310760a0f8e010a0f8e210a0f8e410a0f8e610a0f8e810a0f8ea10a0f8ec10a0f8ee10a0f8f010a0f8f210a0f8f410a0f8f610a0f8f810a0f8fa10a0f8fc10a0f8fe1010e000208bf82802cbf824028bf82a0201208bf8290240f6d100c0f24700804715e00020caf8000000208bf82802cbf824024ff416304cf60361069005a8c0f24701cdf81480884701208bf82a0204a802f0aafecbf8d4001db0bde8f08f01303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f2821d84ff052020a541dd0014445225e284a7018d04f225d288a7014d052225c28ca7010d044225b280a710cd045225a284a7108d0522259288a7104d020225828ca7142f0168500208df87300012096f8dd10002900f0c280002105aa535c002b00f0a08057187b78002b5ed0bb78002b5dd0fb78002b5cd03b79002b5bd07b79002b5ad0bb79002b59d0fb79002b58d03b7a002b57d07b7a002b56d0bb7a002b55d0fb7a002b54d03b7b002b53d07b7b002b52d0bb7b002b51d0fb7b002b50d03b7c002b4fd07b7c002b4ed0bb7c002b4dd0fb7c002b4cd03b7d002b4bd07b7d002b4ad0bb7d002b49d0fb7d002b48d03b7e002b47d07b7e002b46d0bb7e002b45d0fb7e002b44d03b7f002b43d07b7f002b42d0bb7f002b41d0fb7f002b40d0203160297ff49aaf54e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2915d84ff05303535411d00a444b235e2953700cd049235d29937008d050235c29d37004d020235b29137140f0c28200218df87310013096f8de10002900f0be80002105aa535c002b00f0a08057187b78002b5ed0bb78002b5dd0fb78002b5cd03b79002b5bd07b79002b5ad0bb79002b59d0fb79002b58d03b7a002b57d07b7a002b56d0bb7a002b55d0fb7a002b54d03b7b002b53d07b7b002b52d0bb7b002b51d0fb7b002b50d03b7c002b4fd07b7c002b4ed0bb7c002b4dd0fb7c002b4cd03b7d002b4bd07b7d002b4ad0bb7d002b49d0fb7d002b48d03b7e002b47d07b7e002b46d0bb7e002b45d0fb7e002b44d03b7f002b43d07b7f002b42d0bb7f002b41d0fb7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e004313Line truncated
|
||||
"new": "02fb01f000e000bfb0b54ff2ac44c2f229040146206846f23f52c5f28802b2eb500f40f258304cf2e9124cf67e25c2f20000c0f24802caf2101518bf25609047002804bf691c2160b0bd00bf0846ffe7014640f258304cf20732c2f20000c0f24802104770b500284ed001684ef66962ccf2ff02914218bf70bd90f8081190f8095146f6756c8d42c0f2510c2ad205eb8501014491f80d2191f80e4191f80ae191f80b3191f80c1142ea0424012c4ff0010298bf14466e1c054680f80961b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f80811bde870406047e047d5f8040138b142f64d42c0f244022146bde87040104770bd00bf70b542f2ed23c0f2460314460d4698474ff2a841c2f229010e6831466ff39601b1f1005f0ad131684ef66962ccf2ff02914218bf0026412d03d070bd0026412dfbd1002cf9d04cf6dd71c0f2450105468847002e01462846efd00129edd196f807120029e9d02168002948bf70bd4ff27d42c0f2590208469047284670bd00bf2de9f04f9db04ff2a84ac2f2290adaf800b058466ff39600b0f1005f40f07d81dbf800004ef66967ccf2ff07b84240f074819bf82802002800f05d81dbf82442002c00f0588140f6b400c2f20000d0f8008004a802f0aaffb8f1000f00f0f881032045f24075cff68070a4f1600108f160026ff0bf03c0f2020500bf0e6ed41826664e6ec03366668e6eab42a666ce6ee6660e6f26674e6f66678e6fa667ce6fe667d1f88060c4f88060d1f88460c4f88460d1f88860c4f88860d1f88c60c4f88c60d1f89060c4f89060d1f89460c4f89460d1f89860c4f89860d1f89c60c4f89c60d1f8a060c4f8a060d1f8a460c4f8a460d1f8a860c4f8a860d1f8ac60c4f8ac60d1f8b060c4f8b060d1f8b460c4f8b460d1f8b860c4f8b860d1f8bc60c4f8bc6051f8c06fc4f8c0604e68c4f8c4608e68c4f8c860ce68c4f8cc600e69c4f8d0604e69c4f8d4608e69c4f8d860ce69c4f8dc600e6ac4f8e0604e6ac4f8e4608e6ac4f8e860ce6ac4f8ec600e6bc4f8f0604e6bc4f8f4608e6bc4f8f860ce6bc4f8fc600e6cc4f800614e6cc4f804618e6cc4f80861ce6cc4f80c610e6dc4f810614e6dc4f814618e6dc4f81861ce6dc4f81c617ff462afdaf800603040b0f1005f40f0b2803068b84240f0ae8096f8ce00002840f04f8196f8dc10002000298df8140000f0c78105a90a5c002a00f09a810a185378002b00f058819378002b00f05681d378002b00f054811379002b00f052815379002b00f050819379002b00f04e81d379002b00f04c81137a002b00f04a81537a002b00f04881937a002b00f04681d37a002b00f04481137b002b00f04281537b002b00f04081937b002b00f03e81d37b002b00f03c81137c002b00f03a81537c002b00f03881937c002b00f03681d37c002b00f03481137d002b00f03281537d002b00f03081937d002b00f02e81d37d002b00f02c81137e002b00f02a81537e002b00f02881937e002b00f02681d37e002b00f02481137f002b00f02281537f002b00f02081937f002b00f01e81d27f002a00f01c81203060287ff47baf3be19bf82a0270b1dbf82c0240b146f68051c2f207010968401a002800f3c98000208bf82a0240f6d100c0f247001db0bde8f04f00474ff4217004f071fd002800f09c804ff67c51cff6ff71002200bf43182e3183f8842283f8852283f8862283f8872283f8882283f8892283f88a2283f88b2283f88c2283f88d2283f88e2283f88f2283f8902283f8912283f8922283f8932283f8942283f8952283f8962283f8972283f8982283f8992283f89a2283f89b2283f89c2283f89d2283f89e2283f89f2283f8a02283f8a12283f8a22283f8a32283f8a42283f8a52283f8a62283f8a72283f8a82283f8a92283f8aa2283f8ab2283f8ac2283f8ad2283f8ae2283f8af2283f8b02283f8b122a0d1012180f8ce104ff0ff310760a0f8e010a0f8e210a0f8e410a0f8e610a0f8e810a0f8ea10a0f8ec10a0f8ee10a0f8f010a0f8f210a0f8f410a0f8f610a0f8f810a0f8fa10a0f8fc10a0f8fe1010e000208bf82802cbf824028bf82a0201208bf8290240f6d100c0f24700804715e00020caf8000000208bf82802cbf824024ff416304cf60361069005a8c0f24701cdf81480884701208bf82a0204a802f08bfecbf8d4001db0bde8f08f01303ae0023038e0033036e0043034e0053032e0063030e007302ee008302ce009302ae00a3028e00b3026e00c3024e00d3022e00e3020e00f301ee010301ce011301ae0123018e0133016e0143014e0153012e0163010e017300ee018300ce019300ae01a3008e01b3006e01c3004e01d3002e01e3000e01f305f2821d84ff052020a541dd0014445225e284a7018d04f225d288a7014d052225c28ca7010d044225b280a710cd045225a284a7108d0522259288a7104d020225828ca7142f0178500208df87300012096f8dd10002900f0c280002105aa535c002b00f0a08057187b78002b5ed0bb78002b5dd0fb78002b5cd03b79002b5bd07b79002b5ad0bb79002b59d0fb79002b58d03b7a002b57d07b7a002b56d0bb7a002b55d0fb7a002b54d03b7b002b53d07b7b002b52d0bb7b002b51d0fb7b002b50d03b7c002b4fd07b7c002b4ed0bb7c002b4dd0fb7c002b4cd03b7d002b4bd07b7d002b4ad0bb7d002b49d0fb7d002b48d03b7e002b47d07b7e002b46d0bb7e002b45d0fb7e002b44d03b7f002b43d07b7f002b42d0bb7f002b41d0fb7f002b40d0203160297ff49aaf54e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e0153112e0163110e017310ee018310ce019310ae01a3108e01b3106e01c3104e01d3102e01e3100e01f315f2915d84ff05303535411d00a444b235e2953700cd049235d29937008d050235c29d37004d020235b29137140f0c28200218df87310013096f8de10002900f0be80002105aa535c002b00f0a08057187b78002b5ed0bb78002b5dd0fb78002b5cd03b79002b5bd07b79002b5ad0bb79002b59d0fb79002b58d03b7a002b57d07b7a002b56d0bb7a002b55d0fb7a002b54d03b7b002b53d07b7b002b52d0bb7b002b51d0fb7b002b50d03b7c002b4fd07b7c002b4ed0bb7c002b4dd0fb7c002b4cd03b7d002b4bd07b7d002b4ad0bb7d002b49d0fb7d002b48d03b7e002b47d07b7e002b46d0bb7e002b45d0fb7e002b44d03b7f002b43d07b7f002b42d0bb7f002b41d0fb7f002b40d0203160297ff49aaf50e001313ae0023138e0033136e0043134e0053132e0063130e007312ee008312ce009312ae00a3128e00b3126e00c3124e00d3122e00e3120e00f311ee010311ce011311ae0123118e0133116e0143114e01Line truncated
|
||||
"desc": "append injected blobs to main-app payload"
|
||||
},
|
||||
{
|
||||
"offset": 779114,
|
||||
"old": "846a3800",
|
||||
"new": "84043900",
|
||||
"new": "0e073900",
|
||||
"desc": "main-app subheader payload size (ps)"
|
||||
},
|
||||
{
|
||||
"offset": 152,
|
||||
"old": "046b3800",
|
||||
"new": "04053900",
|
||||
"new": "8e073900",
|
||||
"desc": "main-app TOC entry size (ps + 128)"
|
||||
},
|
||||
{
|
||||
"offset": 779234,
|
||||
"old": "846a3804",
|
||||
"new": "84043904",
|
||||
"new": "0e073904",
|
||||
"desc": "main-app preamble length (low 24 bits)"
|
||||
},
|
||||
{
|
||||
"offset": 779238,
|
||||
"old": "85c355a2",
|
||||
"new": "4f65faaf",
|
||||
"new": "21ab3673",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin preamble crc32"
|
||||
},
|
||||
{
|
||||
"offset": 156,
|
||||
"old": "ed292ee4",
|
||||
"new": "bbf1341a",
|
||||
"new": "9e600c9c",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)"
|
||||
},
|
||||
{
|
||||
"offset": 779118,
|
||||
"old": "ed292ee4",
|
||||
"new": "bbf1341a",
|
||||
"new": "9e600c9c",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* Ambient light sensor access through the custom firmware (CFW image-handler
|
||||
* mode 16, capability token "als16"; see g2flash/patches/als_sensor.c).
|
||||
*
|
||||
* The stock firmware only reads its OPT3001 light sensor while auto-brightness
|
||||
* is on, and then steps the panel brightness itself (visible flicker). The CFW
|
||||
* adds two things:
|
||||
*
|
||||
* - QUERY: one report from the driver's current state.
|
||||
* - PASSIVE polling: the firmware opens and polls the sensor at our interval,
|
||||
* the stock adjuster never touches the panel, and a report arrives when the
|
||||
* reading moved by at least `minDelta` or `heartbeatMs` elapsed. The phone
|
||||
* then applies brightness itself (setBrightness with autoAdjust=false), e.g.
|
||||
* only while the display is blank or during a UI transition.
|
||||
*
|
||||
* Reports are 24-byte ['A','L',version,...] records on settings field 105.
|
||||
*/
|
||||
import { toUint8Array } from "../util/array-util";
|
||||
|
||||
declare const com: any;
|
||||
declare const global: any;
|
||||
|
||||
export const ALS_REPORT_VERSION = 1;
|
||||
|
||||
export type AmbientLightReason = "query" | "started" | "poll" | "stopped";
|
||||
|
||||
export type AmbientLightReport = {
|
||||
reason: AmbientLightReason;
|
||||
/** The sensor driver is open (readings are live). */
|
||||
opened: boolean;
|
||||
/** CFW passive polling is installed (stock auto-brightness is not stepping). */
|
||||
passive: boolean;
|
||||
/** The user's stock auto-brightness setting is on. */
|
||||
autoBrightness: boolean;
|
||||
/** The last passive read succeeded (only meaningful while passive). */
|
||||
readOk: boolean;
|
||||
/** Stock driver status: 1 start-read, 2 adjusting, 3 polling. */
|
||||
status: number;
|
||||
/** Ambient light in the stock driver's units (roughly tenths of a lux). */
|
||||
alsValue: number;
|
||||
/** Max of the last five readings (what the stock curve is applied to). */
|
||||
peak: number;
|
||||
/** Brightness level (0..100) the stock curve would choose for `peak`. */
|
||||
stockTarget: number;
|
||||
/** Current brightness setting (0..100). */
|
||||
brightness: number;
|
||||
/** Row of the stock brightness curve (0..5) for `peak`. */
|
||||
gear: number;
|
||||
/** Stock learned scale factor, Q10 (1024 = 1.0). */
|
||||
scaleQ10: number;
|
||||
/** Firmware millisecond tick when the report was built. */
|
||||
tickMs: number;
|
||||
};
|
||||
|
||||
const REASONS: AmbientLightReason[] = ["query", "started", "poll", "stopped"];
|
||||
|
||||
function rd16(b: Uint8Array, i: number): number {
|
||||
return b[i] | (b[i + 1] << 8);
|
||||
}
|
||||
|
||||
function rd32(b: Uint8Array, i: number): number {
|
||||
return (b[i] | (b[i + 1] << 8) | (b[i + 2] << 16) | (b[i + 3] << 24)) >>> 0;
|
||||
}
|
||||
|
||||
/** Decode a field-105 record body, or null when it isn't one. */
|
||||
export function decodeAmbientLightReport(body: Uint8Array): AmbientLightReport | null {
|
||||
if (body.length < 24 || body[0] !== 0x41 || body[1] !== 0x4c || body[2] !== ALS_REPORT_VERSION) {
|
||||
return null;
|
||||
}
|
||||
const flags = body[4];
|
||||
return {
|
||||
reason: REASONS[body[3]] ?? "poll",
|
||||
opened: (flags & 0x01) !== 0,
|
||||
passive: (flags & 0x02) !== 0,
|
||||
autoBrightness: (flags & 0x04) !== 0,
|
||||
readOk: (flags & 0x08) !== 0,
|
||||
status: body[5],
|
||||
alsValue: rd32(body, 6),
|
||||
peak: rd32(body, 10),
|
||||
stockTarget: rd16(body, 14),
|
||||
brightness: body[16],
|
||||
gear: body[17],
|
||||
scaleQ10: rd16(body, 18),
|
||||
tickMs: rd32(body, 20),
|
||||
};
|
||||
}
|
||||
|
||||
export type AmbientLightPollingOptions = {
|
||||
/** Poll period in ms; the firmware clamps to 100..5000. Default 500. */
|
||||
intervalMs?: number;
|
||||
/** Report when the reading moved by at least this much. Default 1. */
|
||||
minDelta?: number;
|
||||
/** Also report after this many ms without one (0 = never). Default 5000. */
|
||||
heartbeatMs?: number;
|
||||
/**
|
||||
* Stop automatically when the Faceclaw framebuffer lease is released or
|
||||
* lapses (the phone went away). Default true.
|
||||
*/
|
||||
bindToLease?: boolean;
|
||||
};
|
||||
|
||||
function activeCommunicator(): any {
|
||||
if (!global.isAndroid) return null;
|
||||
try {
|
||||
return com.faceclaw.app.FaceclawBleCommunicator.getActive();
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Ask the firmware for one ambient-light report (delivered to listeners). */
|
||||
export function queryAmbientLight(): void {
|
||||
try {
|
||||
activeCommunicator()?.queryAmbientLight();
|
||||
} catch (error) {
|
||||
console.warn(`queryAmbientLight failed: ${error}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start or stop CFW passive light-sensor polling. Starting is idempotent and
|
||||
* re-opens the sensor if the stock firmware closed it, so it is safe to resend
|
||||
* on every session start.
|
||||
*/
|
||||
export function setAmbientLightPolling(enabled: boolean, options: AmbientLightPollingOptions = {}): void {
|
||||
try {
|
||||
activeCommunicator()?.setAmbientLightPolling(
|
||||
enabled,
|
||||
options.intervalMs ?? 500,
|
||||
options.minDelta ?? 1,
|
||||
options.heartbeatMs ?? 5000,
|
||||
options.bindToLease ?? true,
|
||||
);
|
||||
} catch (error) {
|
||||
console.warn(`setAmbientLightPolling failed: ${error}`);
|
||||
}
|
||||
}
|
||||
|
||||
/** Subscribe to decoded ambient-light reports. Delivered on the main thread. */
|
||||
export function addAmbientLightListener(listener: (report: AmbientLightReport) => void): () => void {
|
||||
const active = activeCommunicator();
|
||||
if (!active) return () => {};
|
||||
const proxy = new com.faceclaw.app.FaceclawAmbientLightListener({
|
||||
onAmbientLight: (body: any) => {
|
||||
const report = decodeAmbientLightReport(toUint8Array(body));
|
||||
if (report) listener(report);
|
||||
},
|
||||
});
|
||||
active.addAmbientLightListener(proxy);
|
||||
return () => {
|
||||
try {
|
||||
activeCommunicator()?.removeAmbientLightListener(proxy);
|
||||
} catch {
|
||||
// The communicator may have been replaced during a disconnect.
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user