Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,26 @@
define(['require','dsds_settings','modules/settings_service'],function(require){'use strict';var DsdsSettings=require('dsds_settings');var SettingsService=require('modules/settings_service');var CallIccHandler=(function(){var CARDSTATE_MAPPING={'pinRequired':'simCardLockedMsg','pukRequired':'simCardLockedMsg','permanentBlocked':'simCardBlockedMsg','networkLocked':'simLockedPhone','serviceProviderLocked':'simLockedPhone','corporateLocked':'simLockedPhone','network1Locked':'simLockedPhone','network2Locked':'simLockedPhone','hrpdNetworkLocked':'simLockedPhone','ruimCorporateLocked':'simLockedPhone','ruimServiceProviderLocked':'simLockedPhone','unknown':'unknownSimCardState','illegal':'simCardIllegal','absent':'noSimCard','null':'simCardNotReady','ready':''};var _settings=window.navigator.mozSettings;var _iccManager=window.navigator.mozIccManager;var _mobileConnections=null;var _telephony=window.navigator.mozTelephony;var _menuItemIds=['menuItem-call-sim1','menuItem-call-sim2'];var _menuItemDescriptions=[];var _iccIdOnCall=null;function ihfcs_init(){_mobileConnections=window.navigator.mozMobileConnections;if(!_settings||!_mobileConnections||!_iccManager||!_telephony){return;}
if(DsdsSettings.getNumberOfIccSlots()===1){return;}
function addListeners(iccId){var eventHandler=ihfcs_showICCCardDetails.bind(null,iccId);var iccCard=_iccManager.getIccById(iccId);if(!iccCard){return;}
iccCard.addEventListener('cardstatechange',eventHandler);var mobileConnection=ihfcs_getMobileConnectionFromIccId(iccId);if(!mobileConnection){return;}
mobileConnection.addEventListener('datachange',eventHandler);mobileConnection.addEventListener('radiostatechange',eventHandler);}
_menuItemIds.forEach(function forEachFunction(id){var selector=document.getElementById(id);_menuItemDescriptions[_menuItemIds.indexOf(id)]=selector.querySelector('small');});_menuItemIds.forEach(function forEachFunction(id){var selector=document.getElementById(id);var element=selector.querySelector('a');element.addEventListener('click',function eventListenerHandler(){var cardIndex=_menuItemIds.indexOf(id);DsdsSettings.setIccCardIndexForCallSettings(cardIndex);SettingsService.navigate('call',{cardIndex:cardIndex});});});var numberOfIccCards=_mobileConnections.length;for(var i=0;i<numberOfIccCards;i++){var mobileConnection=_mobileConnections[i];if(!mobileConnection.iccId){ihfcs_disableItems(_menuItemIds[i],true);continue;}
ihfcs_showICCCardDetails(mobileConnection.iccId);addListeners(mobileConnection.iccId);}
_iccManager.addEventListener('iccdetected',function iccDetectedHandler(evt){var iccId=evt.iccId;ihfcs_showICCCardDetails(iccId);addListeners(iccId);});_iccManager.addEventListener('iccundetected',function iccUndetectedHandler(evt){var iccId=evt.iccId;var eventHandler=ihfcs_showICCCardDetails.bind(null,iccId);var mobileConnection=ihfcs_getMobileConnectionFromIccId(iccId);if(!mobileConnection){return;}
mobileConnection.removeEventListener('datachange',eventHandler);mobileConnection.removeEventListener('radiostatechange',eventHandler);});function callsChangedHandler(){if(!_telephony.active&&!_iccIdOnCall){return;}
if(_telephony.active){_iccIdOnCall=_mobileConnections[_telephony.active.serviceId].iccId;}else{_iccIdOnCall=null;}
var numberOfIccCards=_mobileConnections.length;for(var i=0;i<numberOfIccCards;i++){var mobileConnection=_mobileConnections[i];if(mobileConnection.iccId){ihfcs_showICCCardDetails(mobileConnection.iccId);}}}
callsChangedHandler();_telephony.addEventListener('callschanged',callsChangedHandler);}
function ihfcs_showICCCardDetails(iccId){var iccCardIndex=ihfcs_getIccCardIndex(iccId);var desc=_menuItemDescriptions[iccCardIndex];desc.style.fontStyle='italic';var mobileConnection=ihfcs_getMobileConnectionFromIccId(iccId);if(!mobileConnection){desc.removeAttribute('data-l10n-id');desc.textContent='';ihfcs_disableItems(_menuItemIds[iccCardIndex],true);return;}
if(mobileConnection.radioState!=='enabled'){desc.setAttribute('data-l10n-id',CARDSTATE_MAPPING['null']);ihfcs_disableItems(_menuItemIds[iccCardIndex],true);return;}
if(mobileConnection.radioState==='enabled'){desc.removeAttribute('data-l10n-id');desc.textContent='';ihfcs_disableItems(_menuItemIds[iccCardIndex],false);}
var iccCard=_iccManager.getIccById(iccId);if(!iccCard){desc.removeAttribute('data-l10n-id');desc.textContent='';ihfcs_disableItems(_menuItemIds[iccCardIndex],true);return;}
var cardState=iccCard.cardState;if(cardState!=='ready'){desc.setAttribute('data-l10n-id',CARDSTATE_MAPPING[cardState||'null']);ihfcs_disableItems(_menuItemIds[iccCardIndex],true);return;}
desc.style.fontStyle='normal';var network=mobileConnection.voice.network;var iccInfo=iccCard.iccInfo;var carrier=network?(network.shortName||network.longName):null;if(carrier&&iccInfo&&iccInfo.isDisplaySpnRequired&&iccInfo.spn){if(iccInfo.isDisplayNetworkNameRequired&&carrier!==iccInfo.spn){carrier=carrier+' '+iccInfo.spn;}else{carrier=iccInfo.spn;}}
desc.textContent=carrier;ihfcs_disableItems(_menuItemIds[iccCardIndex],_iccIdOnCall&&(_iccIdOnCall!==iccId)?true:false);}
function ihfcs_disableItems(id,disable){var element=document.getElementById(id);if(disable){element.setAttribute('aria-disabled',true);}else{element.removeAttribute('aria-disabled');}}
function ihfcs_getIccCardIndex(iccId){for(var i=0;i<_mobileConnections.length;i++){if(_mobileConnections[i].iccId===iccId){return i;}}
return-1;}
function ihfcs_getMobileConnectionFromIccId(iccId){for(var i=0;i<_mobileConnections.length;i++){if(_mobileConnections[i].iccId===iccId){return _mobileConnections[i];}}
return null;}
return{init:ihfcs_init};})();return CallIccHandler;});

View file

@ -0,0 +1,2 @@
define(['require','modules/settings_panel','panels/call_iccs/call_icc_handler'],function(require){'use strict';var SettingsPanel=require('modules/settings_panel');var CallIccHandler=require('panels/call_iccs/call_icc_handler');return function ctor_call_iccs(){return SettingsPanel({onInit:function(){CallIccHandler.init();}});};});