| | |
| | | import androidx.annotation.Nullable; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.ArrayList; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | |
| | | |
| | | ringUri = GetRingIndex(this, "Mira"); |
| | | PlayRing(this, ringUri); |
| | | |
| | | Log.d(TAG, "基带版本 " + getBaseband_Ver()); |
| | | |
| | | String ver = getBaseband_Ver(); |
| | | } |
| | | |
| | | public String getBaseband_Ver(){ |
| | | String Version = ""; |
| | | try { |
| | | Class cl = Class.forName("android.os.SystemProperties"); |
| | | Object invoker = cl.newInstance(); |
| | | Method m = cl.getMethod("get", new Class[] { String.class,String.class }); |
| | | Object result = m.invoke(invoker, new Object[]{"gsm.version.baseband", "no message"}); |
| | | Version = (String)result; |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | return Version; |
| | | } |
| | | |
| | | private Uri GetRingIndex(Context context, String ring) { |