Skip to content

Commit 8189a63

Browse files
RohitKushvaha01greptile-apps[bot]Ajit Kumardeadlyjackulite-Amr
authored
feat: added icons and api (Acode-Foundation#2732)
* feat: added icons and api * Update src/plugins/system/android/com/foxdebug/system/System.java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat: added frontend * feat: added frontend * fix: add missing entries * fix: icons, new pro icon, icons for free version * Merge upstream main and resolve app icon conflicts (#2) * fix: fall back to internal storage when external storage is unavailable (Acode-Foundation#2781) * fix: fall back to internal storage when external storage is unavailable The app used to pick the external data directory unconditionally and then create the plugins directory without guarding against failures. On devices where the external filesystem cannot be created (e.g. Android/data dir is not creatable), the unhandled rejection aborted startup, leaving users stuck on the splash screen with a misleading "Update Android System WebView or Chrome" message. - Probe external storage with fs.stat() and fall back to internal storage - Wrap plugins directory creation in try/catch and fall back to internal - Request storage permissions only on SDK < 33, guarded by hasPermission - Guard editorManager.hasUnsavedFiles() access in exitAppMessage - Show an honest "storage is unavailable" startup message for storage errors * fix: detect storage errors via FileError instanceof instead of numeric code range * fix(theme): prevent freeze when switching to system theme (Acode-Foundation#2790) * fix(sftp): cancel stalled connections and prevent delayed errors (Acode-Foundation#2791) * fix(sftp): cancel stalled connections and prevent delayed errors * fix race cases * fix: admob issues (Acode-Foundation#2800) * fix: admob issues * fix: restore Android build commands --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * fix(android): avoid splash surface crash on realme Android 13 (Acode-Foundation#2805) * fix(session): restore picker documents and skip intent files tab (Acode-Foundation#2809) * fix(session): restore picker documents and skip intent files tab * feat(file-browser): expose document picker(icon) from nested folders * fix * feat(console): isolate execution and improve mobile REPL UX (Acode-Foundation#2808) * feat(console): isolate execution and improve mobile REPL UX - run console JavaScript in a cancellable Web Worker - protect the app from infinite loops and recursion - preserve history with variable-height virtualization - restore the inline REPL layout - fix mobile keyboard resizing and viewport gaps - add clear and stop controls * fix(console): address execution context and bottom pinning * address the pinning regression * remove stop, run btn * feat(console): follow active Acode theme (Acode-Foundation#2814) * feat(console): follow active Acode theme * fix * fix * chore: update deps * Enhanced: Indonesian (id) language translations (Acode-Foundation#2798) * update deps * fix: preserve MIME type for plugin icons on plugin details page (Acode-Foundation#2818) * fix: preserve MIME type for plugin icons on plugin details page * fix * fix(console): run JavaScript files in isolated worker (Acode-Foundation#2819) * fix(console): run JavaScript files in isolated worker * fix * feat: plugin review (Acode-Foundation#2826) * feat: plugin commit Allow logged in user to review plugins from the app. * fix: api url --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * Improve selection menu UX and plugin action overflow (Acode-Foundation#2813) * feat(editor): improve mobile selection menu overflow UX * fix(editor): prevent selection actions during overflow scrolling * fix(editor): validate pointer displacement on release * fix(search): include restored files in global search (Acode-Foundation#2830) * fix(search): include restored files in global search * fix * chore: v1.13.2 * refactor(file-browser): Convert directory cache to `Map` instance (Acode-Foundation#2831) Replace the plain object container used for cached directories with an ES6 `Map` to improve key management semantics. Update cached directory data structure (`src/pages/fileBrowser/fileBrowser.js`): - Re-initialize `cachedDir` variable as a `Map` - Replace object property lookups with `Map.prototype.has()` and `Map.prototype.get()` - Update cache writes to use `Map.prototype.set()` - Update directory deletion calls to use `Map.prototype.delete()` (AI generated commit message) * fix(editor): stabilize selection menu sizing and transitions (Acode-Foundation#2833) * fix(editor): keep fullscreen controls above bottom pane tabs (Acode-Foundation#2834) * chore(community-release-notifier): Change sed parsing - TG release notes (Acode-Foundation#2832) * chore(community-release-notifier): Change sed parsing - TG release notes This commit fixes Release notes not being sed escaped properly leading towards Telegram notifier failing for Stable Releases as they were auto-generated by git. * Disable markdown format in community release notifier Commented out the markdown format option in the Telegram notifier. * fix(editor): restore cursor state and prevent tab-switch flash (Acode-Foundation#2835) * fix(editor): restore cursor state and prevent tab-switch flash * fix * feat(lsp): improve actions, navigation, and position handling (Acode-Foundation#2837) - advertise code action resolve support - clamp LSP positions beyond document bounds - support LocationLink and multiple navigation results - add LSP operations to the selection menu - fix navigation scrolling after switching files - use shared position and location normalization helpers * fix(editor): highlight all visible search matches (Acode-Foundation#2838) * Translation: Update hu-hu.json (Acode-Foundation#2828) * Translation: Update hu-hu.json Fixing AI-translated strings * Translation: Update hu-hu.json Fix typos * chore(deps): bump actions/setup-java from 5 to 6 (Acode-Foundation#2821) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5 to 6. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: improved pluginContext (Acode-Foundation#2806) * feat: improved pluginContext * Update src/lib/pluginContext.js Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * format * fix: holes * format * . --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix(webview): retain instance when destroy fails (Acode-Foundation#2836) * fix(webview): retain instance when destroy fails * test(webview): cover destroy failure lifecycle * fix(webview): serialize concurrent destruction * test(webview): cover concurrent destruction * fix(sftp): recover from failed profile migration (Acode-Foundation#2840) * fix(sftp): recover from failed profile migration * fix(sftp): migrate folder-state URL keys * fix * fix * chore: v1.13.3 * fix: typo * fix: prevent Cordova exec startup race (Acode-Foundation#2851) * fix(editor): improve selection contrast on active lines (Acode-Foundation#2852) * fix(editor): treat missing write capability as editable (Acode-Foundation#2853) * fix(editor): treat missing write capability as editable * fix * fix: race condition when moving to exact line/col (Acode-Foundation#2856) * fix: race condition when moving to exact line/col * fix(search): cancel obsolete result navigation * fix(search): preserve loader during concurrent file opens * Add GitHub Actions workflow for congratulating Community PRs (Acode-Foundation#2855) * Shortcut For Opening Welcome Tab (Acode-Foundation#2773) * Update keyBindings.js * Fix formatting of welcomeTab key binding * Added new shortcut to open welcome window * Shortcut For Opening Welcome Tab * Update keyBindings.js * Modify welcomeTab key binding description Updated the description for the welcomeTab key binding. * Fix changes * Rename welcomeTab to acode:showWelcome fix cmd description and rename the command name to "acode:showWelcome" so that it matches the existing command and adds the keybind to it instead of a possibly new command. --------- Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> * chore: Add Lingala (ln) translation (Acode-Foundation#2775) * Update Lingala translation * Add Lingala translation * Complete Lingala translation strings * chore: update Lingala translations * chore: update more Lingala translations * Complete Lingala translations * Update Lingala translation * Translate remaining strings to Lingala * Fix French strings in Lingala translation * Fix French strings in Lingala translation * Improve Lingala translation --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Amr Ayman <48989143+ulite-Amr@users.noreply.github.com> Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Co-authored-by: Ajit Kumar <dellevenjack@gmail> Co-authored-by: TM <anonymous.matrixtm26.dev@gmail.com> Co-authored-by: AuDevTist1C <114492072+AuDevTist1C@users.noreply.github.com> Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Co-authored-by: summoner <summoner001@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rohit Kushvaha <oldisg131@gmail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: azamkassim <azam.kassim.work@gmail.com> Co-authored-by: Game-Dev-Shubham <shubhamyadav1247878@gmail.com> Co-authored-by: Degrace <kiminoudegrace64@gmail.com> * fix: lang * format --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Ajit Kumar <dellevenjack@gmail> Co-authored-by: Ajit Kumar <dellevenjack@gmail.com> Co-authored-by: Amr Ayman <48989143+ulite-Amr@users.noreply.github.com> Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Co-authored-by: TM <anonymous.matrixtm26.dev@gmail.com> Co-authored-by: AuDevTist1C <114492072+AuDevTist1C@users.noreply.github.com> Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Co-authored-by: summoner <summoner001@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: azamkassim <azam.kassim.work@gmail.com> Co-authored-by: Game-Dev-Shubham <shubhamyadav1247878@gmail.com> Co-authored-by: Degrace <kiminoudegrace64@gmail.com>
1 parent ddbc0c6 commit 8189a63

164 files changed

Lines changed: 3216 additions & 337 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config.xml‎

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,120 @@
7878
</intent-filter>
7979
</config-file>
8080

81+
<config-file target="AndroidManifest.xml" parent="./application">
82+
<activity-alias
83+
android:name=".MainActivityIconDefault"
84+
android:enabled="true"
85+
android:exported="true"
86+
android:icon="@mipmap/ic_launcher"
87+
android:roundIcon="@mipmap/ic_launcher_round"
88+
android:label="@string/app_name"
89+
android:targetActivity=".MainActivity">
90+
<intent-filter>
91+
<action android:name="android.intent.action.MAIN" />
92+
<category android:name="android.intent.category.LAUNCHER" />
93+
</intent-filter>
94+
</activity-alias>
95+
96+
<activity-alias
97+
android:name=".MainActivityIconPro"
98+
android:enabled="false"
99+
android:exported="true"
100+
android:icon="@mipmap/ic_acode_pro"
101+
android:roundIcon="@mipmap/ic_acode_pro_round"
102+
android:label="@string/app_name"
103+
android:targetActivity=".MainActivity">
104+
<intent-filter>
105+
<action android:name="android.intent.action.MAIN" />
106+
<category android:name="android.intent.category.LAUNCHER" />
107+
</intent-filter>
108+
</activity-alias>
109+
110+
<activity-alias
111+
android:name=".MainActivityIconMidnightCircuit"
112+
android:enabled="false"
113+
android:exported="true"
114+
android:icon="@mipmap/ic_acode_midnight_circuit"
115+
android:roundIcon="@mipmap/ic_acode_midnight_circuit_round"
116+
android:label="@string/app_name"
117+
android:targetActivity=".MainActivity">
118+
<intent-filter>
119+
<action android:name="android.intent.action.MAIN" />
120+
<category android:name="android.intent.category.LAUNCHER" />
121+
</intent-filter>
122+
</activity-alias>
123+
124+
<activity-alias
125+
android:name=".MainActivityIconAuroraPulse"
126+
android:enabled="false"
127+
android:exported="true"
128+
android:icon="@mipmap/ic_acode_aurora_pulse"
129+
android:roundIcon="@mipmap/ic_acode_aurora_pulse_round"
130+
android:label="@string/app_name"
131+
android:targetActivity=".MainActivity">
132+
<intent-filter>
133+
<action android:name="android.intent.action.MAIN" />
134+
<category android:name="android.intent.category.LAUNCHER" />
135+
</intent-filter>
136+
</activity-alias>
137+
138+
<activity-alias
139+
android:name=".MainActivityIconTerminalGlow"
140+
android:enabled="false"
141+
android:exported="true"
142+
android:icon="@mipmap/ic_acode_terminal_glow"
143+
android:roundIcon="@mipmap/ic_acode_terminal_glow_round"
144+
android:label="@string/app_name"
145+
android:targetActivity=".MainActivity">
146+
<intent-filter>
147+
<action android:name="android.intent.action.MAIN" />
148+
<category android:name="android.intent.category.LAUNCHER" />
149+
</intent-filter>
150+
</activity-alias>
151+
152+
<activity-alias
153+
android:name=".MainActivityIconSolarFlare"
154+
android:enabled="false"
155+
android:exported="true"
156+
android:icon="@mipmap/ic_acode_solar_flare"
157+
android:roundIcon="@mipmap/ic_acode_solar_flare_round"
158+
android:label="@string/app_name"
159+
android:targetActivity=".MainActivity">
160+
<intent-filter>
161+
<action android:name="android.intent.action.MAIN" />
162+
<category android:name="android.intent.category.LAUNCHER" />
163+
</intent-filter>
164+
</activity-alias>
165+
166+
<activity-alias
167+
android:name=".MainActivityIconBlueprint"
168+
android:enabled="false"
169+
android:exported="true"
170+
android:icon="@mipmap/ic_acode_blueprint"
171+
android:roundIcon="@mipmap/ic_acode_blueprint_round"
172+
android:label="@string/app_name"
173+
android:targetActivity=".MainActivity">
174+
<intent-filter>
175+
<action android:name="android.intent.action.MAIN" />
176+
<category android:name="android.intent.category.LAUNCHER" />
177+
</intent-filter>
178+
</activity-alias>
179+
180+
<activity-alias
181+
android:name=".MainActivityIconPixelParty"
182+
android:enabled="false"
183+
android:exported="true"
184+
android:icon="@mipmap/ic_acode_pixel_party"
185+
android:roundIcon="@mipmap/ic_acode_pixel_party_round"
186+
android:label="@string/app_name"
187+
android:targetActivity=".MainActivity">
188+
<intent-filter>
189+
<action android:name="android.intent.action.MAIN" />
190+
<category android:name="android.intent.category.LAUNCHER" />
191+
</intent-filter>
192+
</activity-alias>
193+
</config-file>
194+
81195
<config-file target="AndroidManifest.xml" parent="/manifest">
82196
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
83197
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

‎hooks/post-process.js‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ fs.copyFileSync(gradleFilePath, androidGradleFilePath);
2525
// directories that are required later in the build. Keep the generated tree and
2626
// only overlay this project's custom resources on top of it.
2727
copyDirRecursively(localResPath, resPath);
28+
// Cordova can retain plugin Java from an earlier install during prepare.
29+
// Keep the System plugin's icon map in sync with the launcher resources.
30+
copyDirRecursively(
31+
path.resolve(__dirname, '../src/plugins/system/android'),
32+
path.resolve(__dirname, '../platforms/android/app/src/main/java')
33+
);
2834
enableLegacyJni();
2935
enableStaticContext();
3036
disableSplashFadeOnRealmeAndroid13();
3137
removeLegacyKeyboardWorkaround();
3238
patchTargetSdkVersion();
39+
stripLauncherFilterFromMainActivity();
3340

3441
function getPackageName() {
3542
const configPath = path.resolve(__dirname, '../config.xml');
@@ -66,6 +73,43 @@ function getTmpDir() {
6673
}
6774
}
6875

76+
/**
77+
* Removes the MAIN/LAUNCHER intent-filter from MainActivity in the generated
78+
* AndroidManifest. The launcher role is handled by activity-aliases instead
79+
* (see config.xml), so that switching app icons at runtime only toggles aliases
80+
* and never disables the running MainActivity component (which would otherwise
81+
* force-stop/restart the app).
82+
*/
83+
function stripLauncherFilterFromMainActivity() {
84+
const prefix = execSync('npm prefix').toString().trim();
85+
const manifestPath = path.join(
86+
prefix,
87+
'platforms/android/app/src/main/AndroidManifest.xml'
88+
);
89+
90+
if (!fs.existsSync(manifestPath)) {
91+
console.warn('[Cordova Hook] ⚠️ AndroidManifest.xml not found');
92+
return;
93+
}
94+
95+
let content = fs.readFileSync(manifestPath, 'utf-8');
96+
const updated = content.replace(
97+
/(<activity[^>]*\bname="MainActivity"[^>]*>)\s*<intent-filter[^>]*>\s*<action android:name="android\.intent\.action\.MAIN"[^>]*\/>\s*<category android:name="android\.intent\.category\.LAUNCHER"[^>]*\/>\s*<\/intent-filter>/,
98+
'$1'
99+
);
100+
101+
if (updated !== content) {
102+
fs.writeFileSync(manifestPath, updated, 'utf-8');
103+
console.log(
104+
'[Cordova Hook] ✅ Removed launcher intent-filter from MainActivity'
105+
);
106+
} else {
107+
console.log(
108+
'[Cordova Hook] ✅ Launcher intent-filter already removed, skipping'
109+
);
110+
}
111+
}
112+
69113
function patchTargetSdkVersion() {
70114
const prefix = execSync('npm prefix').toString().trim();
71115
const gradleFile = path.join(prefix, 'platforms/android/app/build.gradle');

‎package-lock.json‎

Lines changed: 28 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"com.foxdebug.acode.rk.exec.proot": {},
4646
"cordova-plugin-iap": {},
4747
"com.foxdebug.acode.rk.customtabs": {},
48-
"cordova-plugin-system": {},
4948
"cordova-plugin-crashhandler": {},
5049
"cordova-plugin-advanced-http": {},
51-
"cordova-plugin-acode-webview": {}
50+
"cordova-plugin-acode-webview": {},
51+
"cordova-plugin-system": {}
5252
},
5353
"platforms": [
5454
"android"

0 commit comments

Comments
 (0)