mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
Merge branch 'main' into ios-port
# Conflicts: # app/app.ts
This commit is contained in:
commit
63b2a7d545
8 files changed
+395
-24
No files matched your search
@@ -10,6 +10,7 @@ project.ext {
|
||||
// androidXTransition = "1.4.1"
|
||||
// androidXViewPager = "1.0.0"
|
||||
|
||||
// useKotlin = true
|
||||
// kotlinVersion = "1.6.0"
|
||||
// NativeScript 9 already applies kotlin-android. Pin its current compiler
|
||||
// for our .kt sources; no separate Kotlin installation is required.
|
||||
kotlinVersion = "2.2.20"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.faceclaw.shared
|
||||
|
||||
/** NativeScript implements this Kotlin-owned contract in TypeScript. */
|
||||
interface KotlinBridgeListener {
|
||||
fun transform(message: String): String
|
||||
}
|
||||
|
||||
/**
|
||||
* First step toward commonMain: only portable Kotlin, with no Android/JVM APIs.
|
||||
* Calls and callbacks are synchronous on the caller's thread. The listener is
|
||||
* used only during roundTrip and is never retained.
|
||||
*/
|
||||
class KotlinBridge {
|
||||
fun greet(name: String): String = "Hello, $name, from Kotlin"
|
||||
|
||||
fun roundTrip(message: String, listener: KotlinBridgeListener): String {
|
||||
val reply = listener.transform("Kotlin received: $message")
|
||||
// Consume the TypeScript return value, then return it across the bridge.
|
||||
return "Kotlin received callback: $reply"
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
* Optimize bluetooth message transport
|
||||
* Short-the-long gesture from screen off activates the glanceboard
|
||||
* Glanceboard has a 2x3 layout option
|
||||
* Compass no longer discards calibration when off
|
||||
|
||||
## 0.7.0 - 2026-09-12
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { BandwidthBenchmarkLayer } from "./bandwidth-benchmark";
|
||||
import { LightSensorDemoLayer } from "./light-sensor-demo";
|
||||
import { ResourceUsageLayer } from "./resource-usage";
|
||||
import { LoadAppFromQrLayer, LoadAppFromUrlLayer } from "./load-app";
|
||||
import { unicodeTestMenu } from "./unicode-test";
|
||||
import { type AppContext } from "../app-definition";
|
||||
import { getDefaultSmallFont } from "../../graphics/ui-fonts";
|
||||
import { appViewportSize } from "../../ui/shell/geometry";
|
||||
@@ -87,6 +88,9 @@ function debugTestsMenu(): MenuLayer {
|
||||
ctx.stack.push(new BandwidthBenchmarkLayer(ctx.actions.requestRender));
|
||||
},
|
||||
},
|
||||
submenuItem("Unicode test", (ctx) => {
|
||||
ctx.stack.push(unicodeTestMenu(MENU_LAYOUT));
|
||||
}),
|
||||
],
|
||||
MENU_LAYOUT,
|
||||
);
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
import { wrapText, truncateText } from "../../graphics/textwrap";
|
||||
import { fontSelectionLabel, getDefaultSmallFont, getUiFontSelection } from "../../graphics/ui-fonts";
|
||||
import { GrayImage, type UiFont } from "../../graphics/image";
|
||||
import { type InputEvent } from "../../ui/gestures";
|
||||
import { Layer, type LayerContext } from "../../ui/layers";
|
||||
import { MenuLayer, type MenuLayout } from "../../ui/menu";
|
||||
|
||||
/**
|
||||
* Unicode test: sample texts chosen to exercise text-rendering features that
|
||||
* need special support beyond one-glyph-per-codepoint left-to-right layout.
|
||||
* Each sample is rendered with the user's configured UI font so gaps (tofu,
|
||||
* unshaped Arabic, misplaced combining marks, reversed RTL runs, missing CJK
|
||||
* coverage) show up the way they would in real app content.
|
||||
*
|
||||
* Every sample lists what it exercises so a tester knows what "correct" looks
|
||||
* like without reading this file.
|
||||
*/
|
||||
export type UnicodeSample = {
|
||||
/** Menu label: the language, with the feature in parentheses. */
|
||||
label: string;
|
||||
/** What a correct rendering has to get right, shown under the title. */
|
||||
exercises: string;
|
||||
/** The text itself; paragraphs separated by "\n". */
|
||||
text: string;
|
||||
};
|
||||
|
||||
// Sentences are mostly Article 1 of the Universal Declaration of Human Rights
|
||||
// (the same passage in every language, so a tester who knows one can compare
|
||||
// line lengths and shapes across scripts), plus a pangram or two.
|
||||
export const UNICODE_SAMPLES: readonly UnicodeSample[] = [
|
||||
{
|
||||
label: "English (ligatures)",
|
||||
exercises: "fi/fl/ff pairs stay separate glyphs; kerning (AV, To, Wa)",
|
||||
text:
|
||||
"All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.\n" +
|
||||
"Ligature pairs: office affluent waffle fjord shuffle difficult\n" +
|
||||
"Kerning pairs: AVATAR Toward Wavy LTA. Yo Te Ty\n" +
|
||||
"The quick brown fox jumps over the lazy dog. 0123456789",
|
||||
},
|
||||
{
|
||||
label: "French (precomposed accents)",
|
||||
exercises: "é è ê ç œ æ ù as single precomposed codepoints",
|
||||
text:
|
||||
"Tous les êtres humains naissent libres et égaux en dignité et en droits. Ils sont doués de raison et de conscience et doivent agir les uns envers les autres dans un esprit de fraternité.\n" +
|
||||
"Portez ce vieux whisky au juge blond qui fume. Œuvre, cœur, æther, à côté, où, naïve, Noël.",
|
||||
},
|
||||
{
|
||||
label: "German / Polish / Turkish",
|
||||
exercises: "ß ä ö ü; ą ę ł ń ś ź ż; dotted İ and dotless ı",
|
||||
text:
|
||||
"Falsches Üben von Xylophonmusik quält jeden größeren Zwerg. Straße, Fußgänger, Ärger, Öl, Übung.\n" +
|
||||
"Pchnąć w tę łódź jeża lub ośm skrzyń fig. Zażółć gęślą jaźń.\n" +
|
||||
"Pijamalı hasta yağız şoföre çabucak güvendi. İstanbul, ılık, Iğdır, iyi.",
|
||||
},
|
||||
{
|
||||
label: "Vietnamese (stacked marks)",
|
||||
exercises: "tone mark above a vowel that already has a diacritic (ấ ệ ở ữ)",
|
||||
text:
|
||||
"Tất cả mọi người sinh ra đều được tự do và bình đẳng về nhân phẩm và quyền lợi. Mọi con người đều được tạo hóa ban cho lý trí và lương tâm và cần phải đối xử với nhau trong tình bằng hữu.\n" +
|
||||
"Tiếng Việt: Hà Nội, Huế, Đà Nẵng, Sài Gòn. ấ ầ ẩ ẫ ậ ế ề ể ễ ệ ố ồ ổ ỗ ộ ớ ờ ở ỡ ợ ứ ừ ử ữ ự",
|
||||
},
|
||||
{
|
||||
label: "Combining marks (decomposed)",
|
||||
exercises: "base letter + separate combining accent must overlay, not advance",
|
||||
text:
|
||||
// Written with explicit combining codepoints (no String.normalize, so
|
||||
// the sample is the same on every JS engine).
|
||||
"Decomposed: café naïve résumé Việt Nam Saõ Paulo\n" +
|
||||
"Precomposed: café naïve résumé Việt Nam São Paulo\n" +
|
||||
"Both lines should look identical.\n" +
|
||||
"Stacked: à́̂ ë̄ ô̧ ñ́ ů̈\n" +
|
||||
"Marks with no base: ́ ̈ ̧ (should attach to nothing, or a dotted circle)",
|
||||
},
|
||||
{
|
||||
label: "Greek",
|
||||
exercises: "Greek alphabet with tonos/dialytika; final sigma ς vs σ",
|
||||
text:
|
||||
"Όλοι οι άνθρωποι γεννιούνται ελεύθεροι και ίσοι στην αξιοπρέπεια και τα δικαιώματα. Είναι προικισμένοι με λογική και συνείδηση, και οφείλουν να συμπεριφέρονται μεταξύ τους με πνεύμα αδελφοσύνης.\n" +
|
||||
"Ξεσκεπάζω την ψυχοφθόρα βδελυγμία. ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ αβγδεζηθικλμνξοπρσςτυφχψω",
|
||||
},
|
||||
{
|
||||
label: "Russian (Cyrillic)",
|
||||
exercises: "Cyrillic coverage incl. й ё ъ ь; italic-free shapes",
|
||||
text:
|
||||
"Все люди рождаются свободными и равными в своем достоинстве и правах. Они наделены разумом и совестью и должны поступать в отношении друг друга в духе братства.\n" +
|
||||
"Съешь же ещё этих мягких французских булок, да выпей чаю. АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ",
|
||||
},
|
||||
{
|
||||
label: "Arabic (RTL, joining)",
|
||||
exercises: "right-to-left; letters take initial/medial/final forms; lam-alef لا ligature",
|
||||
text:
|
||||
"يولد جميع الناس أحرارًا متساوين في الكرامة والحقوق. وقد وهبوا عقلاً وضميرًا وعليهم أن يعامل بعضهم بعضًا بروح الإخاء.\n" +
|
||||
"السلام عليكم. العربية لغة جميلة.\n" +
|
||||
"Arabic-Indic digits: ٠١٢٣٤٥٦٧٨٩ and Persian: پ چ ژ گ",
|
||||
},
|
||||
{
|
||||
label: "Hebrew (RTL, niqqud)",
|
||||
exercises: "right-to-left; vowel points (niqqud) below/inside letters; final forms ך ם ן ף ץ",
|
||||
text:
|
||||
"כל בני אדם נולדו בני חורין ושווים בערכם ובזכויותיהם. כולם חוננו בתבונה ובמצפון, לפיכך חובה עליהם לנהוג איש ברעהו ברוח של אחוה.\n" +
|
||||
"With niqqud: שָׁלוֹם עוֹלָם. בְּרֵאשִׁית בָּרָא אֱלֹהִים\n" +
|
||||
"Final forms: מלך שלום דין סוף ארץ",
|
||||
},
|
||||
{
|
||||
label: "Bidirectional (mixed)",
|
||||
exercises: "RTL runs inside LTR lines and vice versa; numbers and punctuation keep their side",
|
||||
text:
|
||||
"The Hebrew word שלום means peace, and the Arabic word سلام means the same.\n" +
|
||||
"Price: 120 ש\"ח (about $32) — call 555-1234.\n" +
|
||||
"מספר הטלפון שלי הוא 052-1234567, ואני גר ב-Tel Aviv.\n" +
|
||||
"أعيش في London منذ 5 سنوات.\n" +
|
||||
"Nested: he said \"مرحبا (hello) بكم\" and left.",
|
||||
},
|
||||
{
|
||||
label: "Hindi (Devanagari)",
|
||||
exercises: "conjuncts (क्ष त्र ज्ञ), vowel sign ि drawn BEFORE its consonant, headline bar",
|
||||
text:
|
||||
"सभी मनुष्यों को गौरव और अधिकारों के मामले में जन्मजात स्वतन्त्रता और समानता प्राप्त है। उन्हें बुद्धि और अन्तरात्मा की देन प्राप्त है और परस्पर उन्हें भाईचारे के भाव से बर्ताव करना चाहिए।\n" +
|
||||
"Reordering: कि (ka + i) की (ka + ii) दिल्ली हिन्दी\n" +
|
||||
"Conjuncts: क्ष त्र ज्ञ द्ध श्र प्र स्त्री",
|
||||
},
|
||||
{
|
||||
label: "Thai (no spaces, stacked)",
|
||||
exercises: "no inter-word spaces (wrap by syllable); vowels and tone marks stack above/below",
|
||||
text:
|
||||
"มนุษย์ทั้งหลายเกิดมามีอิสระและเสมอภาคกันในเกียรติศักดิ์และสิทธิ ต่างมีเหตุผลและมโนธรรม และควรปฏิบัติต่อกันด้วยเจตนารมณ์แห่งภราดรภาพ\n" +
|
||||
"สวัสดีครับ ภาษาไทย กรุงเทพมหานคร\n" +
|
||||
"Stacked marks: ปั้น ที่ กี้ น้ำ ป์ ฐ์",
|
||||
},
|
||||
{
|
||||
label: "Chinese (Simplified)",
|
||||
exercises: "CJK coverage; full-width punctuation ,。;wrapping between any two characters",
|
||||
text:
|
||||
"人人生而自由,在尊严和权利上一律平等。他们赋有理性和良心,并应以兄弟关系的精神相对待。\n" +
|
||||
"你好,世界!中文测试。繁體:臺灣、香港、澳門。\n" +
|
||||
"Mixed: 我有 3 个 apples 和 2 个 oranges。",
|
||||
},
|
||||
{
|
||||
label: "Japanese (kana + kanji)",
|
||||
exercises: "hiragana, katakana, kanji, half-width katakana カタカナ, long vowel mark ー",
|
||||
text:
|
||||
"すべての人間は、生れながらにして自由であり、かつ、尊厳と権利とについて平等である。人間は、理性と良心とを授けられており、互いに同胞の精神をもって行動しなければならない。\n" +
|
||||
"いろはにほへと ちりぬるを。コンピューター、テレビ、ゲーム。\n" +
|
||||
"半角カナ: コンピューター 全角英数: ABC123",
|
||||
},
|
||||
{
|
||||
label: "Korean (Hangul)",
|
||||
exercises: "precomposed syllables; conjoining jamo (ㅎㅏㄴ) should compose to 한",
|
||||
text:
|
||||
"모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 동등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.\n" +
|
||||
"안녕하세요, 세계! 한국어 테스트.\n" +
|
||||
"Jamo: 한 (= 한) Compatibility jamo: ㅎ ㅏ ㄴ",
|
||||
},
|
||||
{
|
||||
label: "Emoji (ZWJ, modifiers)",
|
||||
exercises: "color emoji as monochrome; skin-tone modifiers, ZWJ families, flag pairs, VS16 render as ONE glyph",
|
||||
text:
|
||||
"Basic: 😀 👍 ❤ ☀ ★\n" +
|
||||
"Variation selector: ❤️ ☀️ ✈️ (same as above but VS16)\n" +
|
||||
"Skin tone: 👍🏻 👍🏽 👍🏿 👋🏾\n" +
|
||||
"ZWJ: 👨👩👧👦 👩💻 🏳️🌈\n" +
|
||||
"Flags: 🇯🇵 🇺🇸 🇩🇪 🇧🇷\n" +
|
||||
"Keycaps: 1️⃣ #️⃣",
|
||||
},
|
||||
{
|
||||
label: "Symbols & misc",
|
||||
exercises: "math, arrows, box drawing, currency, non-BMP (astral) codepoints",
|
||||
text:
|
||||
"Math: ∑ ∫ √ ∞ ≠ ≤ ≥ ± × ÷ π θ λ\n" +
|
||||
"Arrows: ← ↑ → ↓ ↔ ⇒ ⇔\n" +
|
||||
"Box: ┌─┬─┐ │ │ │ ├─┼─┤ └─┴─┘ ▲▼● ░▒▓█\n" +
|
||||
"Currency: $ € £ ¥ ₹ ₩ ₪ ¢\n" +
|
||||
"Astral: 𝔘𝔫𝔦𝔠𝔬𝔡𝔢 𝕳𝖊𝖑𝖑𝖔 𐐀𐐁 🜁🜂\n" +
|
||||
"Zero-width: ab (ZWSP) cd (ZWJ) ef (WJ) should read as ab cd ef",
|
||||
},
|
||||
];
|
||||
|
||||
const MARGIN_X = 18;
|
||||
const TITLE_Y = 8;
|
||||
const FOOTER_MARGIN = 20;
|
||||
const BODY_GAP = 6;
|
||||
|
||||
/**
|
||||
* Shows one Unicode sample wrapped to the page, with the feature under test
|
||||
* under the title and the current font in the footer. Scroll pages through
|
||||
* the text; double-click goes back to the language list.
|
||||
*/
|
||||
export class UnicodeSampleLayer implements Layer {
|
||||
private lines: string[] | null = null;
|
||||
private wrappedForWidth = 0;
|
||||
private wrappedWithFont = 0;
|
||||
private firstLine = 0;
|
||||
private bodyLineCount = 1;
|
||||
|
||||
constructor(private readonly sample: UnicodeSample) {}
|
||||
|
||||
paint(ctx: LayerContext): GrayImage {
|
||||
const font = getDefaultSmallFont();
|
||||
const { width, height } = ctx.stack.getBaseSize();
|
||||
const image = new GrayImage(width, height, 0);
|
||||
const textWidth = width - 2 * MARGIN_X;
|
||||
|
||||
image.drawText(font, MARGIN_X, TITLE_Y, truncateText(font, this.sample.label, textWidth), 220);
|
||||
const noteY = TITLE_Y + font.lineHeight;
|
||||
const noteLines = wrapText(font, this.sample.exercises, textWidth);
|
||||
for (let i = 0; i < noteLines.length; i++) {
|
||||
image.drawText(font, MARGIN_X, noteY + i * font.lineHeight, noteLines[i]!, 120);
|
||||
}
|
||||
|
||||
const bodyY = noteY + noteLines.length * font.lineHeight + BODY_GAP;
|
||||
const footerY = height - FOOTER_MARGIN;
|
||||
this.bodyLineCount = Math.max(1, Math.floor((footerY - bodyY) / font.lineHeight));
|
||||
|
||||
const lines = this.getLines(font, textWidth);
|
||||
this.clampScroll(lines.length);
|
||||
const visible = lines.slice(this.firstLine, this.firstLine + this.bodyLineCount);
|
||||
for (let i = 0; i < visible.length; i++) {
|
||||
image.drawText(font, MARGIN_X, bodyY + i * font.lineHeight, visible[i]!, 235);
|
||||
}
|
||||
|
||||
const page = Math.floor(this.firstLine / this.pageStep()) + 1;
|
||||
image.drawText(font, MARGIN_X, footerY, `Page ${page}/${this.pageCount(lines.length)}`, 110);
|
||||
const fontLabel = fontSelectionLabel(getUiFontSelection());
|
||||
image.drawText(font, width - MARGIN_X - font.measureText(fontLabel), footerY, fontLabel, 110);
|
||||
return image;
|
||||
}
|
||||
|
||||
handleInput(event: InputEvent, ctx: LayerContext): void {
|
||||
switch (event.type) {
|
||||
case "scroll-down":
|
||||
this.firstLine += this.pageStep();
|
||||
return;
|
||||
case "scroll-up":
|
||||
this.firstLine = Math.max(0, this.firstLine - this.pageStep());
|
||||
return;
|
||||
case "double-click":
|
||||
ctx.stack.pop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private pageStep(): number {
|
||||
return Math.max(1, this.bodyLineCount - 1);
|
||||
}
|
||||
|
||||
private clampScroll(lineCount: number): void {
|
||||
if (lineCount <= this.bodyLineCount) {
|
||||
this.firstLine = 0;
|
||||
return;
|
||||
}
|
||||
const lastPageStart = (this.pageCount(lineCount) - 1) * this.pageStep();
|
||||
this.firstLine = Math.max(0, Math.min(lastPageStart, this.firstLine));
|
||||
}
|
||||
|
||||
private pageCount(lineCount: number): number {
|
||||
if (lineCount <= this.bodyLineCount) return 1;
|
||||
return Math.ceil((lineCount - this.bodyLineCount) / this.pageStep()) + 1;
|
||||
}
|
||||
|
||||
private getLines(font: UiFont, width: number): string[] {
|
||||
if (this.lines === null || this.wrappedForWidth !== width || this.wrappedWithFont !== font.fingerprintId) {
|
||||
// breakLongWords: CJK and Thai have no spaces to wrap at.
|
||||
this.lines = wrapText(font, this.sample.text, width, { breakLongWords: true });
|
||||
this.wrappedForWidth = width;
|
||||
this.wrappedWithFont = font.fingerprintId;
|
||||
}
|
||||
return this.lines;
|
||||
}
|
||||
}
|
||||
|
||||
/** The language list; selecting a row opens its sample. */
|
||||
export function unicodeTestMenu(layout: MenuLayout): MenuLayer {
|
||||
return new MenuLayer(
|
||||
"Unicode test",
|
||||
UNICODE_SAMPLES.map((sample) => ({
|
||||
label: sample.label,
|
||||
onSelect: (ctx) => {
|
||||
ctx.stack.push(new UnicodeSampleLayer(sample));
|
||||
},
|
||||
})),
|
||||
layout,
|
||||
);
|
||||
}
|
||||
@@ -3,6 +3,12 @@ import { registerShareIntentHandler } from './native/share-intents'
|
||||
import { installNativeUserAgent } from './util/http'
|
||||
import { registerPhoneRotation } from './native/phone-rotation'
|
||||
|
||||
import { runKotlinBridgeSmokeTest } from './native/kotlin-bridge'
|
||||
|
||||
declare const __DEV__: boolean;
|
||||
|
||||
if (__DEV__) runKotlinBridgeSmokeTest()
|
||||
|
||||
installNativeUserAgent()
|
||||
registerShareIntentHandler()
|
||||
registerPhoneRotation()
|
||||
|
||||
@@ -19,7 +19,7 @@ export type FirmwarePatchSet = {
|
||||
export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
"base": "g2_2.2.9.22.bin",
|
||||
"baseSha256": "a03fbea9f68a9de6bc271daabb9f3a41c59053d1086622c76a4e990f829cc561",
|
||||
"outputSha256": "32cea69474252a2b2f9c0fdc5f89bf0d5d6f745b4eec10aea8e9c34e3f106b3f",
|
||||
"outputSha256": "2d72b37a6e3ac4e3e493bbc12d48566f2bf52eb62d2707c11c8da11aaaf0bb14",
|
||||
"patches": [
|
||||
{
|
||||
"offset": 935280,
|
||||
@@ -72,61 +72,61 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1242342,
|
||||
"old": "d4f790fb",
|
||||
"new": "1af33cfc",
|
||||
"new": "1af362fc",
|
||||
"desc": "bl settings_send_wrapper (append caps field 100)"
|
||||
},
|
||||
{
|
||||
"offset": 1240038,
|
||||
"old": "f5f710f9",
|
||||
"new": "1af3dafd",
|
||||
"new": "1af300fe",
|
||||
"desc": "bl settings_decode_wrapper (Faceclaw lease field 101)"
|
||||
},
|
||||
{
|
||||
"offset": 939336,
|
||||
"old": "0bf02af9",
|
||||
"new": "64f351f8",
|
||||
"new": "64f377f8",
|
||||
"desc": "bl faceclaw_display_start @ 0x45f146 (fail-open wake takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 939528,
|
||||
"old": "0bf0caf8",
|
||||
"new": "64f3bff8",
|
||||
"new": "64f3e5f8",
|
||||
"desc": "bl faceclaw_display_start_headup @ 0x45f206 (fail-open wake takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 939016,
|
||||
"old": "10f096f8",
|
||||
"new": "65f397fd",
|
||||
"new": "65f3bdfd",
|
||||
"desc": "bl headup_gate (head-up sensor event -> EvenHub sys event 12 under lease)"
|
||||
},
|
||||
{
|
||||
"offset": 939036,
|
||||
"old": "fff765fb",
|
||||
"new": "63f3ddff",
|
||||
"new": "64f303f8",
|
||||
"desc": "bl faceclaw_idle_input_gate (idle tap/long/release -> field-102 events 2/3/4)"
|
||||
},
|
||||
{
|
||||
"offset": 831036,
|
||||
"old": "1df057fc",
|
||||
"new": "7ff373ff",
|
||||
"new": "7ff399ff",
|
||||
"desc": "bl gesture_press (Faceclaw lease gates event 9 vs stock UI event 8)"
|
||||
},
|
||||
{
|
||||
"offset": 831042,
|
||||
"old": "24f023f9",
|
||||
"new": "80f314f8",
|
||||
"new": "80f33af8",
|
||||
"desc": "bl gesture_short_long (Faceclaw lease gates event 11 vs stock Menu path)"
|
||||
},
|
||||
{
|
||||
"offset": 831800,
|
||||
"old": "1df0d9fa",
|
||||
"new": "7ff3f9fd",
|
||||
"new": "7ff31ffe",
|
||||
"desc": "bl gesture_release (source-qualified event 10 vs stock UI event 0x4a)"
|
||||
},
|
||||
{
|
||||
"offset": 1553752,
|
||||
"old": "7fb50600",
|
||||
"new": "cef2f1bb",
|
||||
"new": "cef217bc",
|
||||
"desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline"
|
||||
},
|
||||
{
|
||||
@@ -144,67 +144,73 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1255404,
|
||||
"old": "d9f758ff",
|
||||
"new": "16f3f9fd",
|
||||
"new": "16f31ffe",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4ac3ea (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1255504,
|
||||
"old": "d9f726ff",
|
||||
"new": "16f3c7fd",
|
||||
"new": "16f3edfd",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x4ac44e (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1297700,
|
||||
"old": "65f0affd",
|
||||
"new": "0cf351f8",
|
||||
"new": "0cf377f8",
|
||||
"desc": "bl compass_decode_capture (sample-matched GAF diagnostics)"
|
||||
},
|
||||
{
|
||||
"offset": 1296176,
|
||||
"old": "fff759fc",
|
||||
"new": "0cf3c7fb",
|
||||
"new": "0cf3edfb",
|
||||
"desc": "bl compass_report_event (stock UI + heading with diagnostics over BLE)"
|
||||
},
|
||||
{
|
||||
"offset": 1290360,
|
||||
"old": "00210170",
|
||||
"new": "0df3a7fe",
|
||||
"desc": "bl compass_preserve_accuracy (retain magnetic calibration under Faceclaw framebuffer lease)"
|
||||
},
|
||||
{
|
||||
"offset": 4476518,
|
||||
"old": "",
|
||||
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fa5b04ef66c6b4ff2a84416460d46ccf2ff0bc2f229044ff6ff7900274ff00108019006e048f2c731c0f24501bff32f8f8847d4f800a0bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0bb804ff4377005f039f8002800f0a1824ff62451cff6ff7142183d3182f8dc7282f8dd7282f8de7282f8df7282f8e07282f8e17282f8e27282f8e37282f8e47282f8e57282f8e67282f8e77282f8e87282f8e97282f8ea7282f8eb7282f8ec7282f8ed7282f8ee7282f8ef7282f8f07282f8f17282f8f27282f8f37282f8f47282f8f57282f8f67282f8f77282f8f87282f8f97282f8fa7282f8fb7282f8fc7282f8fd7282f8fe7282f8ff7282f8007382f8017382f8027382f8037382f8047382f8057382f8067382f8077382f8087382f8097382f80a7382f80b7382f80c7382f80d7382f80e7382f80f7382f8107382f8117382f8127382f8137382f8147382f8157382f8167382f8177382f8187382d1c0f800b080f80a80a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001f51457ff436afbff35f8f44e8000121b154e8001f5145f8d02be7aa4645ea064100260127c0f8701206e048f2c731c0f24501bff32f8f88472568bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0bc804ff4377004f05eff002800f0c6814ff62451cff6ff7100bf42183d3182f8dc6282f8dd6282f8de6282f8df6282f8e06282f8e16282f8e26282f8e36282f8e46282f8e56282f8e66282f8e76282f8e86282f8e96282f8ea6282f8eb6282f8ec6282f8ed6282f8ee6282f8ef6282f8f06282f8f16282f8f26282f8f36282f8f46282f8f56282f8f66282f8f76282f8f86282f8f96282f8fa6282f8fb6282f8fc6282f8fd6282f8fe6282f8ff6282f8006382f8016382f8026382f8036382f8046382f8056382f8066382f8076382f8086382f8096382f80a6382f80b6382f80c6382f80d6382f80e6382f80f6382f8106382f8116382f8126382f8136382f8146382f8156382f8166382f8176382f8186382d1c0f800b08772a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001fa9427ff437afbff35f8f00bf44e8000121b154e8001fa942f8d02be7d0f8746242f6f767c0f24407002ebff35f8f00f0eb8007f19a0230464ff0ff314ff0ff379047002840f0418143f67750c0f24f00804700274ff001080397adf8107006e048f2c731c0f24501bff32f8f88472568bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0e1804ff4377004f068fe002800f0d9804ff62451cff6ff7100bf42183d3182f8dc7282f8dd7282f8de7282f8df7282f8e07282f8e17282f8e27282f8e37282f8e47282f8e57282f8e67282f8e77282f8e87282f8e97282f8ea7282f8eb7282f8ec7282f8ed7282f8ee7282f8ef7282f8f07282f8f17282f8f27282f8f37282f8f47282f8f57282f8f67282f8f77282f8f87282f8f97282f8fa7282f8fb7282f8fc7282f8fd7282f8fe7282f8ff7282f8007382f8017382f8027382f8037382f8047382f8057382f8067382f8077382f8087382f8097382f80a7382f80b7382f80c7382f80d7382f80e7382f80f7382f8107382f8117382f8127382f8137382f8147382f8157382f8167382f8177382f8187382d1c0f800b080f80a80a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001fa9427ff436afbff35f8f44e8000149b354e8001fa942f8d02be705460020b847b0b105f51d7151e8006f4eb9bff35f8f00bf41e8000292b151e8006f002ef8d00021bff32f8fbff35f8f21b10646f9e64ff0ff3742e007f5a9718847f2e60121f1e70020019d42f6f764002d4ff0010bc0f2440418bfbaf1000f33d10df108098046484602f07df903ab28465146012205f0abfc9df8111007464846002918bf4ff0ff3702f0a3fabbf1000f044608d19df8100028b949f28340c0f247004c308047b8f1000f18bfc8f80c4042f6f764c0f2440404f5807130468847384625b0bde8f08f2a7802f07f01a1f1150313f1030f0bd802f07b030b2b07d002f07e02082a03d0032901d00629b7d140b149f28341c0f247010746884797f8641111b14ff0ff37d6e738464ff0000ba6e770b500284dd001684ef66c62ccf2ff02914218bf70bd90f8441090f8455046f6756c8d42c0f2510c2ad205eb8501014491f8492091f84a4091f846e091f8473091f8481042ea0424012c4ff0010298bf14466e1c054680f84560b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84410bde870406047e047286c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04f9fb04ff2a840c2f229000668bff35f8f30466ff39600b0f1005f42d130684ef66c65ccf2ff05a8423bd196f8640130b3d6f860411cb340f6b400c2f20000076804a802f0a5f8002f00f06a8140f2030a384621464ff416320296cff6807a4ff6ff760397fff752fb4ff6245b48f2c738cff6ff7b00270124c0f245081ce096f8660170b1d6f8680140b146f68051c2f207010968401a002802f37080002086f8660140f6d100c0f247001fb0bde8f04f0047bff32f8fc0474ff2a840c2f22900d0f80090bff35f8f0Line truncated
|
||||
"new": "b0b581ea00039b0701d0034637e0c2b110f0030315d000f1010ca2f1010e0023cc5c9e45c45403f1010404d0634413f003032346f4d121440319121b102a14d302e00346102a10d3d1f800c0d1f804e0cc688d68103adc609d60c3f804e043f810cb0f2a01f11001eed8042a07d300bf51f8045b043a032a43f8045bf8d8002a08bfb0bd0139013b11f8015f013a03f8015ff9d1b0bd00bf884218bf002a00d1704710b50b1a38bf431a934207d288420ad281ea00039b0726d0034669e0fff79fffbde81040704781ea000300eb020c9b0701eb020e42d15fea8c732bd0a0f1010c00bf8b1813f801ec8418531e04f801ec04d0624412f003021a46f2d101eb030e00eb030c17e0830736d0a2f1010c00f1010e002300bfcc5c9c45c45403f1010404d0734413f003032346f4d1121b2144031922e01346042b0ed3aef10402acf1040152f80449043b032b41f80449f8d802f1040e01f1040c1a4653b1aef10101acf1010300bf11f80149013a03f80149f9d1bde8104070470346042a06d351f8044b043a032a43f8044bf8d8002af0d00139013b00bf11f8014f013a03f8014ff9d1e6e700bf2de9f04fa5b04ef66c6b4ff2a84416460d46ccf2ff0bc2f229044ff6ff7900274ff00108019006e048f2c731c0f24501bff32f8f8847d4f800a0bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0bb804ff4377005f05ff8002800f0a1824ff62451cff6ff7142183d3182f8dc7282f8dd7282f8de7282f8df7282f8e07282f8e17282f8e27282f8e37282f8e47282f8e57282f8e67282f8e77282f8e87282f8e97282f8ea7282f8eb7282f8ec7282f8ed7282f8ee7282f8ef7282f8f07282f8f17282f8f27282f8f37282f8f47282f8f57282f8f67282f8f77282f8f87282f8f97282f8fa7282f8fb7282f8fc7282f8fd7282f8fe7282f8ff7282f8007382f8017382f8027382f8037382f8047382f8057382f8067382f8077382f8087382f8097382f80a7382f80b7382f80c7382f80d7382f80e7382f80f7382f8107382f8117382f8127382f8137382f8147382f8157382f8167382f8177382f8187382d1c0f800b080f80a80a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001f51457ff436afbff35f8f44e8000121b154e8001f5145f8d02be7aa4645ea064100260127c0f8701206e048f2c731c0f24501bff32f8f88472568bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0bc804ff4377004f084ff002800f0c6814ff62451cff6ff7100bf42183d3182f8dc6282f8dd6282f8de6282f8df6282f8e06282f8e16282f8e26282f8e36282f8e46282f8e56282f8e66282f8e76282f8e86282f8e96282f8ea6282f8eb6282f8ec6282f8ed6282f8ee6282f8ef6282f8f06282f8f16282f8f26282f8f36282f8f46282f8f56282f8f66282f8f76282f8f86282f8f96282f8fa6282f8fb6282f8fc6282f8fd6282f8fe6282f8ff6282f8006382f8016382f8026382f8036382f8046382f8056382f8066382f8076382f8086382f8096382f80a6382f80b6382f80c6382f80d6382f80e6382f80f6382f8106382f8116382f8126382f8136382f8146382f8156382f8166382f8176382f8186382d1c0f800b08772a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001fa9427ff437afbff35f8f00bf44e8000121b154e8001fa942f8d02be7d0f8746242f6f767c0f24407002ebff35f8f00f0eb8007f19a0230464ff0ff314ff0ff379047002840f0418143f67750c0f24f00804700274ff001080397adf8107006e048f2c731c0f24501bff32f8f88472568bff35f8f20680321cff680710140b1f1005fbff35f8f03d10168594500f0e1804ff4377004f08efe002800f0d9804ff62451cff6ff7100bf42183d3182f8dc7282f8dd7282f8de7282f8df7282f8e07282f8e17282f8e27282f8e37282f8e47282f8e57282f8e67282f8e77282f8e87282f8e97282f8ea7282f8eb7282f8ec7282f8ed7282f8ee7282f8ef7282f8f07282f8f17282f8f27282f8f37282f8f47282f8f57282f8f67282f8f77282f8f87282f8f97282f8fa7282f8fb7282f8fc7282f8fd7282f8fe7282f8ff7282f8007382f8017382f8027382f8037382f8047382f8057382f8067382f8077382f8087382f8097382f80a7382f80b7382f80c7382f80d7382f80e7382f80f7382f8107382f8117382f8127382f8137382f8147382f8157382f8167382f8177382f8187382d1c0f800b080f80a80a0f81c90a0f81e90a0f82090a0f82290a0f82490a0f82690a0f82890a0f82a90a0f82c90a0f82e90a0f83090a0f83290a0f83490a0f83690a0f83890a0f83a9054e8001fa9427ff436afbff35f8f44e8000149b354e8001fa942f8d02be705460020b847b0b105f51d7151e8006f4eb9bff35f8f00bf41e8000292b151e8006f002ef8d00021bff32f8fbff35f8f21b10646f9e64ff0ff3742e007f5a9718847f2e60121f1e70020019d42f6f764002d4ff0010bc0f2440418bfbaf1000f33d10df108098046484602f07df903ab28465146012205f0d1fc9df8111007464846002918bf4ff0ff3702f0a3fabbf1000f044608d19df8100028b949f28340c0f247004c308047b8f1000f18bfc8f80c4042f6f764c0f2440404f5807130468847384625b0bde8f08f2a7802f07f01a1f1150313f1030f0bd802f07b030b2b07d002f07e02082a03d0032901d00629b7d140b149f28341c0f247010746884797f8641111b14ff0ff37d6e738464ff0000ba6e770b500284dd001684ef66c62ccf2ff02914218bf70bd90f8441090f8455046f6756c8d42c0f2510c2ad205eb8501014491f8492091f84a4091f846e091f8473091f8481042ea0424012c4ff0010298bf14466e1c054680f84560b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f84410bde870406047e047286c38b142f64d42c0f244022146bde87040104770bd02464ff64b70cff6ff7042f6653c7844c0f2440c00210023604700bf2de9f04f9fb04ff2a840c2f229000668bff35f8f30466ff39600b0f1005f42d130684ef66c65ccf2ff05a8423bd196f8640130b3d6f860411cb340f6b400c2f20000076804a802f0a5f8002f00f06a8140f2030a384621464ff416320296cff6807a4ff6ff760397fff752fb4ff6245b48f2c738cff6ff7b00270124c0f245081ce096f8660170b1d6f8680140b146f68051c2f207010968401a002802f37080002086f8660140f6d100c0f247001fb0bde8f04f0047bff32f8fc0474ff2a840c2f22900d0f80090bff35f8f0Line truncated
|
||||
"desc": "append injected blobs to main-app payload"
|
||||
},
|
||||
{
|
||||
"offset": 779114,
|
||||
"old": "846a3800",
|
||||
"new": "7c1b3900",
|
||||
"new": "c81b3900",
|
||||
"desc": "main-app subheader payload size (ps)"
|
||||
},
|
||||
{
|
||||
"offset": 152,
|
||||
"old": "046b3800",
|
||||
"new": "fc1b3900",
|
||||
"new": "481c3900",
|
||||
"desc": "main-app TOC entry size (ps + 128)"
|
||||
},
|
||||
{
|
||||
"offset": 779234,
|
||||
"old": "846a3804",
|
||||
"new": "7c1b3904",
|
||||
"new": "c81b3904",
|
||||
"desc": "main-app preamble length (low 24 bits)"
|
||||
},
|
||||
{
|
||||
"offset": 779238,
|
||||
"old": "85c355a2",
|
||||
"new": "a1afb7e4",
|
||||
"new": "5ba18044",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin preamble crc32"
|
||||
},
|
||||
{
|
||||
"offset": 156,
|
||||
"old": "ed292ee4",
|
||||
"new": "b1adc0d0",
|
||||
"new": "c88dcd16",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)"
|
||||
},
|
||||
{
|
||||
"offset": 779118,
|
||||
"old": "ed292ee4",
|
||||
"new": "b1adc0d0",
|
||||
"new": "c88dcd16",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import { isAndroid } from "@nativescript/core";
|
||||
|
||||
// Handwritten declarations for this small native surface. NativeScript builds
|
||||
// the runtime metadata from Kotlin's compiled classes, not these declarations.
|
||||
declare namespace com.faceclaw.shared {
|
||||
class KotlinBridge extends java.lang.Object {
|
||||
constructor();
|
||||
greet(name: string): string;
|
||||
roundTrip(message: string, listener: KotlinBridgeListener): string;
|
||||
}
|
||||
class KotlinBridgeListener extends java.lang.Object {
|
||||
constructor(implementation: { transform(message: string): string });
|
||||
}
|
||||
}
|
||||
|
||||
/** Exercise the real native metadata and both directions of return values. */
|
||||
export function runKotlinBridgeSmokeTest(): void {
|
||||
if (!isAndroid) return;
|
||||
|
||||
try {
|
||||
const bridge = new com.faceclaw.shared.KotlinBridge();
|
||||
const greeting = bridge.greet("Faceclaw");
|
||||
const message = "Faceclaw \u2194 Kotlin \ud83d\udc53";
|
||||
let callbackCount = 0;
|
||||
let callbackMessage = "";
|
||||
// Keep the proxy in scope through the synchronous native call. Do not
|
||||
// throw from the callback; validate after returning across the boundary.
|
||||
const listener = new com.faceclaw.shared.KotlinBridgeListener({
|
||||
transform(value: string): string {
|
||||
callbackCount++;
|
||||
callbackMessage = value;
|
||||
return `TypeScript received: ${value}`;
|
||||
},
|
||||
});
|
||||
const reply = bridge.roundTrip(message, listener);
|
||||
if (greeting !== "Hello, Faceclaw, from Kotlin"
|
||||
|| callbackCount !== 1
|
||||
|| callbackMessage !== `Kotlin received: ${message}`
|
||||
|| reply !== `Kotlin received callback: TypeScript received: Kotlin received: ${message}`) {
|
||||
throw new Error(`Unexpected Kotlin bridge result: ${JSON.stringify({
|
||||
greeting, callbackCount, callbackMessage, reply,
|
||||
})}`);
|
||||
}
|
||||
console.log("FACECLAW_KOTLIN_BRIDGE_PASS " + reply);
|
||||
} catch (error) {
|
||||
// Diagnostics must not prevent the rest of the app from launching.
|
||||
console.error("FACECLAW_KOTLIN_BRIDGE_FAIL " + error);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user