@@ -595,7 +595,10 @@ private void setupVRSubMenu(PopupMenu popup) {
595595 private void setupChannelSubMenu (PopupMenu popup ) {
596596 SubMenu chnMenu = popup .getMenu ().addSubMenu ("Channel" );
597597 int channelPref = getChannel (this );
598- chnMenu .setHeaderTitle ("Current: " + channelPref );
598+
599+ // Create a disabled item to act as the header
600+ MenuItem headerItem = chnMenu .add ("Current: " + channelPref );
601+ headerItem .setEnabled (false ); // Makes it unclickable and grayed out like a label
599602
600603 String [] channels = getResources ().getStringArray (R .array .channels );
601604 for (String chnStr : channels ) {
@@ -612,7 +615,10 @@ private void setupChannelSubMenu(PopupMenu popup) {
612615 private void setupBandwidthSubMenu (PopupMenu popup ) {
613616 SubMenu bwMenu = popup .getMenu ().addSubMenu ("Bandwidth" );
614617 int bandwidthPref = getBandwidth (this );
615- bwMenu .setHeaderTitle ("Current: " + bandwidthPref );
618+
619+ // Add a disabled item to act as the header
620+ MenuItem headerItem = bwMenu .add ("Current: " + bandwidthPref );
621+ headerItem .setEnabled (false ); // Visually looks like a header, but unclickable
616622
617623 String [] bws = getResources ().getStringArray (R .array .bandwidths );
618624 for (String bwStr : bws ) {
@@ -815,7 +821,7 @@ private void showFecThresholdsDialog() {
815821 .show ();
816822 }
817823
818- void initDefaultOptions (){
824+ void initDefaultOptions () {
819825 SharedPreferences prefs = getSharedPreferences ("general" , MODE_PRIVATE );
820826 boolean adaptiveEnabled = prefs .getBoolean ("adaptive_link_enabled" , true );
821827 int adaptiveTxPower = prefs .getInt ("adaptive_tx_power" , 20 );
@@ -1211,8 +1217,7 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
12111217 // VPN permission not granted
12121218 Log .e (TAG , "VPN permission was not granted by the user." );
12131219 }
1214- }
1215- else {
1220+ } else {
12161221 Log .w (TAG , "onActivityResult: unknown request code " + requestCode );
12171222 }
12181223 }
0 commit comments