Skip to content

Commit

Permalink
disable Radio Settings if tm has no CP
Browse files Browse the repository at this point in the history
  • Loading branch information
hajoha committed Jul 4, 2024
1 parent 0d4cc64 commit 9c0f65d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,19 @@ private void handleSetNetwork(){
Toast.makeText(ct, "App doesn't have Carrier Permissions", Toast.LENGTH_SHORT).show();
}


@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DropDownPreference selectNetworkType = findPreference(SELECTNETWORKTYPE);
EditTextPreference inputPLMN = findPreference(ADDPLMN);
SwitchPreference reboot = findPreference(PERSISTREBOOT);

if(!gv.isCarrier_permissions()){
selectNetworkType.setEnabled(false);
inputPLMN.setEnabled(false);
reboot.setEnabled(false);
}
ct = requireContext();
plmnId = ct.getString(R.string.select_plmn);
accessNetworkType = ct.getString(R.string.access_networktype);
Expand Down

0 comments on commit 9c0f65d

Please sign in to comment.