|
|
@ -53,6 +53,7 @@ import androidx.core.app.NotificationCompat;
|
|
|
|
import androidx.core.content.FileProvider;
|
|
|
|
import androidx.core.content.FileProvider;
|
|
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.telephony.CellSignalStrength;
|
|
|
|
import android.telephony.SignalStrength;
|
|
|
|
import android.telephony.SignalStrength;
|
|
|
|
import android.telephony.SubscriptionManager;
|
|
|
|
import android.telephony.SubscriptionManager;
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
|
import android.telephony.TelephonyManager;
|
|
|
@ -1620,7 +1621,13 @@ public class MicroPhotoService extends Service {
|
|
|
|
SignalStrength ss = telephonyManager.getSignalStrength();
|
|
|
|
SignalStrength ss = telephonyManager.getSignalStrength();
|
|
|
|
|
|
|
|
|
|
|
|
if (ss != null) {
|
|
|
|
if (ss != null) {
|
|
|
|
return (ss.getGsmSignalStrength() << 8) | (ss.getLevel() & 0xFF);
|
|
|
|
int ssVal = -1;
|
|
|
|
|
|
|
|
List<CellSignalStrength> cellSignalStrengths = ss.getCellSignalStrengths();
|
|
|
|
|
|
|
|
for (CellSignalStrength cellSignalStrength : cellSignalStrengths) {
|
|
|
|
|
|
|
|
ssVal = cellSignalStrength.getDbm();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return (ssVal << 8) | (ss.getLevel() & 0xFF);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception ex) {
|
|
|
|
} catch (Exception ex) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|