@@ -187,6 +187,10 @@ private void populateCards() {
187187 cards .add (new Card ("maps" , getString (R .string .k2go_card_maps ), false , R .drawable .ic_card_maps ));
188188 for (java .util .Iterator <Card > it = cards .iterator (); it .hasNext (); ) {
189189 Card card = it .next ();
190+ // K2GO-415/416: hide a module the app runtime cannot run (a 64-bit-only module like Kiwix
191+ // on a 32-bit app), like Module management and Get more do, instead of showing a permanent
192+ // "Not supported" card on Home.
193+ if (unsupported (card )) { it .remove (); continue ; }
190194 ModuleCards .Card m = ModuleCards .byEndpoint (card .endpoint );
191195 if (m != null && HiddenModules .contains (requireContext (), m .key ())) it .remove ();
192196 }
@@ -414,8 +418,12 @@ private boolean isScheduled(Card c) {
414418 @ Override public void onResume () { super .onResume (); main .post (poll ); }
415419 @ Override public void onPause () { super .onPause (); main .removeCallbacks (poll ); }
416420
421+ // K2GO-416: gate on the APP process bitness (Process.is64Bit()), not the device ABI list, so a
422+ // 64-bit-only module is unsupported whenever the app runtime is 32-bit (its proot cannot run it).
423+ // Home uses its own Card type (field requires64), so it reads the platform API directly rather than
424+ // ModuleCards.Card.runsOnThisRuntime() (which needs a ModuleCards.Card): same single runtime signal.
417425 private boolean unsupported (Card c ) {
418- return c .requires64 && android .os .Build . SUPPORTED_64_BIT_ABIS . length == 0 ;
426+ return c .requires64 && ! android .os .Process . is64Bit () ;
419427 }
420428
421429 // ADFA-4853: guards a single in-flight readiness probe before the post-install drain.
@@ -488,7 +496,6 @@ private void refreshStatuses() {
488496 // answers — and every sheet offered to install a platform that was there. The
489497 // fact is asked for where it is needed (applyState, openSheet) instead.
490498 applyState (c , GRAY );
491- if (unsupported (c ) && c .status != null ) c .status .setText (getString (R .string .k2go_not_supported ));
492499 }
493500 updateHeaderFromCards ();
494501 return ;
@@ -540,15 +547,6 @@ private void refreshStatuses() {
540547 }
541548
542549 for (final Card c : cards ) {
543- if (unsupported (c )) {
544- // ADFA-5061: grey, but not "absent". A 64-bit module on a 32-bit device is not
545- // missing — it is never going to be there, which is why the sheet must not offer
546- // to install it. Nothing is recorded, so "nothing established" withholds the
547- // offer where ABSENT would have made it.
548- applyState (c , GRAY );
549- if (c .status != null ) c .status .setText (getString (R .string .k2go_not_supported ));
550- continue ;
551- }
552550 // ADFA-4828: system is installed. Before the first probe resolves (or while the server
553551 // is still coming up) show "Connecting", never "Not installed" — the latter only appears
554552 // once a probe actually reports the content is absent (404 -> GRAY).
@@ -638,7 +636,7 @@ private void updateHeaderFromCards() {
638636 }
639637 boolean anyChecking = false , anyReady = false ;
640638 for (Card c : cards ) {
641- if (unsupported ( c ) || c .state == GRAY ) continue ; // GRAY = content absent → doesn't gate
639+ if (c .state == GRAY ) continue ; // GRAY = content absent, does not gate
642640 if (c .state == AMBER ) anyChecking = true ;
643641 else if (c .state == GREEN ) anyReady = true ;
644642 }
0 commit comments