Merge "Overload setTelephonyProperty without phone ID"
This commit is contained in:
@@ -4627,7 +4627,7 @@ public class TelephonyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the telephony property with the value specified.
|
* Sets a per-phone telephony property with the value specified.
|
||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@@ -4676,6 +4676,20 @@ public class TelephonyManager {
|
|||||||
SystemProperties.set(property, propVal);
|
SystemProperties.set(property, propVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a global telephony property with the value specified.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static void setTelephonyProperty(String property, String value) {
|
||||||
|
if (value == null) {
|
||||||
|
value = "";
|
||||||
|
}
|
||||||
|
Rlog.d(TAG, "setTelephonyProperty: success" + " property=" +
|
||||||
|
property + " value: " + value);
|
||||||
|
SystemProperties.set(property, value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience function for retrieving a value from the secure settings
|
* Convenience function for retrieving a value from the secure settings
|
||||||
* value list as an integer. Note that internally setting values are
|
* value list as an integer. Note that internally setting values are
|
||||||
@@ -4765,7 +4779,7 @@ public class TelephonyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the telephony property.
|
* Gets a per-phone telephony property.
|
||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@@ -4781,6 +4795,19 @@ public class TelephonyManager {
|
|||||||
return propVal == null ? defaultVal : propVal;
|
return propVal == null ? defaultVal : propVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a global telephony property.
|
||||||
|
*
|
||||||
|
* See also getTelephonyProperty(phoneId, property, defaultVal). Most telephony properties are
|
||||||
|
* per-phone.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static String getTelephonyProperty(String property, String defaultVal) {
|
||||||
|
String propVal = SystemProperties.get(property);
|
||||||
|
return propVal == null ? defaultVal : propVal;
|
||||||
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public int getSimCount() {
|
public int getSimCount() {
|
||||||
// FIXME Need to get it from Telephony Dev Controller when that gets implemented!
|
// FIXME Need to get it from Telephony Dev Controller when that gets implemented!
|
||||||
|
|||||||
Reference in New Issue
Block a user