am 426fc66a
: Add persist.radio.ramdump.
* commit '426fc66a8a9371e34d936d18d5b254fd002b4c11': Add persist.radio.ramdump.
This commit is contained in:
@@ -212,6 +212,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<!-- LTE ram dump -->
|
||||
<Button android:id="@+id/lte_ram_dump"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginTop="8dip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<!-- SMSC -->
|
||||
<RelativeLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
@@ -50,6 +50,11 @@
|
||||
<!-- Phone IMS registration required off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||
<string name="ims_reg_required_off">Turn off IMS registration required</string>
|
||||
|
||||
<!-- Phone ram dump on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||
<string name="lte_ram_dump_on">Turn on lte ram dump</string>
|
||||
<!-- Phone ram dump off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||
<string name="lte_ram_dump_off">Turn off lte ram dump</string>
|
||||
|
||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||
<string name="radioInfo_menu_viewADN">View SIM address book</string>
|
||||
<!-- Phone Info screen. Menu item label. Used for diagnostic info screens, precise translation isn't needed -->
|
||||
|
@@ -123,8 +123,6 @@ public class RadioInfo extends Activity {
|
||||
private TextView dnsCheckState;
|
||||
private EditText smsc;
|
||||
private Button radioPowerButton;
|
||||
private Button imsRegRequiredButton;
|
||||
private Button smsOverImsButton;
|
||||
private Button dnsCheckToggleButton;
|
||||
private Button pingTestButton;
|
||||
private Button updateSmscButton;
|
||||
@@ -290,6 +288,9 @@ public class RadioInfo extends Activity {
|
||||
smsOverImsButton = (Button) findViewById(R.id.sms_over_ims);
|
||||
smsOverImsButton.setOnClickListener(mSmsOverImsHandler);
|
||||
|
||||
lteRamDumpButton = (Button) findViewById(R.id.lte_ram_dump);
|
||||
lteRamDumpButton.setOnClickListener(mLteRamDumpHandler);
|
||||
|
||||
pingTestButton = (Button) findViewById(R.id.ping_test);
|
||||
pingTestButton.setOnClickListener(mPingButtonHandler);
|
||||
updateSmscButton = (Button) findViewById(R.id.update_smsc);
|
||||
@@ -337,6 +338,7 @@ public class RadioInfo extends Activity {
|
||||
updatePowerState();
|
||||
updateImsRegRequiredState();
|
||||
updateSmsOverImsState();
|
||||
updateLteRamDumpState();
|
||||
updateProperties();
|
||||
updateDnsCheckState();
|
||||
|
||||
@@ -413,31 +415,6 @@ public class RadioInfo extends Activity {
|
||||
radioPowerButton.setText(buttonText);
|
||||
}
|
||||
|
||||
private boolean isImsRegRequired() {
|
||||
return SystemProperties.getBoolean(TelephonyProperties.PROPERTY_IMS_REG_REQUIRED, false);
|
||||
}
|
||||
|
||||
private void updateImsRegRequiredState() {
|
||||
Log.d(TAG, "updateImsRegRequiredState isImsRegRequired()=" + isImsRegRequired());
|
||||
String buttonText = isImsRegRequired() ?
|
||||
getString(R.string.ims_reg_required_off) :
|
||||
getString(R.string.ims_reg_required_on);
|
||||
imsRegRequiredButton.setText(buttonText);
|
||||
}
|
||||
|
||||
private boolean isSmsOverImsEnabled() {
|
||||
return SystemProperties.getBoolean(PROPERTY_SMS_OVER_IMS, false);
|
||||
}
|
||||
|
||||
private void updateSmsOverImsState() {
|
||||
Log.d(TAG, "updateSmsOverImsState isSmsOverImsEnabled()=" + isSmsOverImsEnabled());
|
||||
String buttonText = isSmsOverImsEnabled() ?
|
||||
getString(R.string.sms_over_ims_off) :
|
||||
getString(R.string.sms_over_ims_on);
|
||||
smsOverImsButton.setText(buttonText);
|
||||
}
|
||||
|
||||
|
||||
private void updateDnsCheckState() {
|
||||
dnsCheckState.setText(phone.isDnsCheckDisabled() ?
|
||||
"0.0.0.0 allowed" :"0.0.0.0 not allowed");
|
||||
@@ -912,18 +889,33 @@ public class RadioInfo extends Activity {
|
||||
}
|
||||
};
|
||||
|
||||
private Button imsRegRequiredButton;
|
||||
static final String PROPERTY_IMS_REG_REQUIRED = "persist.radio.imsregrequired";
|
||||
OnClickListener mImsRegRequiredHandler = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d(TAG, String.format("toggle %s: currently %s",
|
||||
TelephonyProperties.PROPERTY_IMS_REG_REQUIRED, (isImsRegRequired() ? "on":"off")));
|
||||
PROPERTY_IMS_REG_REQUIRED, (isImsRegRequired() ? "on":"off")));
|
||||
boolean newValue = !isImsRegRequired();
|
||||
SystemProperties.set(TelephonyProperties.PROPERTY_IMS_REG_REQUIRED,
|
||||
SystemProperties.set(PROPERTY_IMS_REG_REQUIRED,
|
||||
newValue ? "1":"0");
|
||||
updateImsRegRequiredState();
|
||||
}
|
||||
};
|
||||
|
||||
private boolean isImsRegRequired() {
|
||||
return SystemProperties.getBoolean(PROPERTY_IMS_REG_REQUIRED, false);
|
||||
}
|
||||
|
||||
private void updateImsRegRequiredState() {
|
||||
Log.d(TAG, "updateImsRegRequiredState isImsRegRequired()=" + isImsRegRequired());
|
||||
String buttonText = isImsRegRequired() ?
|
||||
getString(R.string.ims_reg_required_off) :
|
||||
getString(R.string.ims_reg_required_on);
|
||||
imsRegRequiredButton.setText(buttonText);
|
||||
}
|
||||
|
||||
private Button smsOverImsButton;
|
||||
static final String PROPERTY_SMS_OVER_IMS = "persist.radio.imsallowmtsms";
|
||||
OnClickListener mSmsOverImsHandler = new OnClickListener() {
|
||||
@Override
|
||||
@@ -936,6 +928,43 @@ public class RadioInfo extends Activity {
|
||||
}
|
||||
};
|
||||
|
||||
private boolean isSmsOverImsEnabled() {
|
||||
return SystemProperties.getBoolean(PROPERTY_SMS_OVER_IMS, false);
|
||||
}
|
||||
|
||||
private void updateSmsOverImsState() {
|
||||
Log.d(TAG, "updateSmsOverImsState isSmsOverImsEnabled()=" + isSmsOverImsEnabled());
|
||||
String buttonText = isSmsOverImsEnabled() ?
|
||||
getString(R.string.sms_over_ims_off) :
|
||||
getString(R.string.sms_over_ims_on);
|
||||
smsOverImsButton.setText(buttonText);
|
||||
}
|
||||
|
||||
private Button lteRamDumpButton;
|
||||
static final String PROPERTY_LTE_RAM_DUMP = "persist.radio.ramdump";
|
||||
OnClickListener mLteRamDumpHandler = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.d(TAG, String.format("toggle %s: currently %s",
|
||||
PROPERTY_LTE_RAM_DUMP, (isSmsOverImsEnabled() ? "on":"off")));
|
||||
boolean newValue = !isLteRamDumpEnabled();
|
||||
SystemProperties.set(PROPERTY_LTE_RAM_DUMP, newValue ? "1":"0");
|
||||
updateLteRamDumpState();
|
||||
}
|
||||
};
|
||||
|
||||
private boolean isLteRamDumpEnabled() {
|
||||
return SystemProperties.getBoolean(PROPERTY_LTE_RAM_DUMP, false);
|
||||
}
|
||||
|
||||
private void updateLteRamDumpState() {
|
||||
Log.d(TAG, "updateLteRamDumpState isLteRamDumpEnabled()=" + isLteRamDumpEnabled());
|
||||
String buttonText = isLteRamDumpEnabled() ?
|
||||
getString(R.string.lte_ram_dump_off) :
|
||||
getString(R.string.lte_ram_dump_on);
|
||||
lteRamDumpButton.setText(buttonText);
|
||||
}
|
||||
|
||||
OnClickListener mDnsCheckButtonHandler = new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
phone.disableDnsCheck(!phone.isDnsCheckDisabled());
|
||||
|
Reference in New Issue
Block a user