dubai: camera: Disable N78 5G NSA band too
Per user report. Change-Id: I8c47711299bae06638ca12adef06ea1ceef9f79e
This commit is contained in:
parent
b9046bddf1
commit
9b139ed94d
2 changed files with 11 additions and 9 deletions
|
@ -32,7 +32,7 @@ public class DubaiCameraService extends Service {
|
||||||
private static final String TAG = "DubaiCameraService";
|
private static final String TAG = "DubaiCameraService";
|
||||||
|
|
||||||
private static final String FRONT_CAMERA_ID = "1";
|
private static final String FRONT_CAMERA_ID = "1";
|
||||||
private static final int OFFENDING_NR_SA_BAND = 78;
|
private static final int OFFENDING_NR_BAND = 78;
|
||||||
|
|
||||||
private CameraManager mCameraManager;
|
private CameraManager mCameraManager;
|
||||||
private SubscriptionManager mSubManager;
|
private SubscriptionManager mSubManager;
|
||||||
|
@ -141,13 +141,13 @@ public class DubaiCameraService extends Service {
|
||||||
dlog("update5gState: Invalid subid or no active subs!");
|
dlog("update5gState: Invalid subid or no active subs!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mQcRilMsgUtils.setNrSaBandEnabled(mSubManager.getPhoneId(mDefaultDataSubId),
|
if (mQcRilMsgUtils.setNrBandEnabled(mSubManager.getPhoneId(mDefaultDataSubId),
|
||||||
OFFENDING_NR_SA_BAND, !mIsFrontCamInUse)) {
|
OFFENDING_NR_BAND, !mIsFrontCamInUse)) {
|
||||||
Log.i(TAG, (mIsFrontCamInUse ? "Disabled" : "Enabled") + " NR SA band "
|
Log.i(TAG, (mIsFrontCamInUse ? "Disabled" : "Enabled") + " NR band "
|
||||||
+ OFFENDING_NR_SA_BAND + " for subId " + mDefaultDataSubId);
|
+ OFFENDING_NR_BAND + " for subId " + mDefaultDataSubId);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "Failed to " + (mIsFrontCamInUse ? "disable" : "enable") + " NR SA band "
|
Log.e(TAG, "Failed to " + (mIsFrontCamInUse ? "disable" : "enable") + " NR band "
|
||||||
+ OFFENDING_NR_SA_BAND + " for subId " + mDefaultDataSubId);
|
+ OFFENDING_NR_BAND + " for subId " + mDefaultDataSubId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class QcRilMsgUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: split this function */
|
/* TODO: split this function */
|
||||||
protected boolean setNrSaBandEnabled(int phoneId, int band, boolean enabled) {
|
protected boolean setNrBandEnabled(int phoneId, int band, boolean enabled) {
|
||||||
if (mService == null) {
|
if (mService == null) {
|
||||||
Log.e(TAG, "setNrSaBandEnabled: mService is null!");
|
Log.e(TAG, "setNrSaBandEnabled: mService is null!");
|
||||||
return false;
|
return false;
|
||||||
|
@ -91,7 +91,7 @@ public class QcRilMsgUtils {
|
||||||
}
|
}
|
||||||
long[] nrNsaConfigs = new long[NR_CONFIG_LENGTH];
|
long[] nrNsaConfigs = new long[NR_CONFIG_LENGTH];
|
||||||
for (int i = 0; i < NR_CONFIG_LENGTH; i++) {
|
for (int i = 0; i < NR_CONFIG_LENGTH; i++) {
|
||||||
nrSaConfigs[i] = buf.getLong();
|
nrNsaConfigs[i] = buf.getLong();
|
||||||
}
|
}
|
||||||
|
|
||||||
// modify band config
|
// modify band config
|
||||||
|
@ -99,8 +99,10 @@ public class QcRilMsgUtils {
|
||||||
int col = (band - 1) % 64;
|
int col = (band - 1) % 64;
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
nrSaConfigs[row] |= (1 << col);
|
nrSaConfigs[row] |= (1 << col);
|
||||||
|
nrNsaConfigs[row] |= (1 << col);
|
||||||
} else {
|
} else {
|
||||||
nrSaConfigs[row] &= ~(1 << col);
|
nrSaConfigs[row] &= ~(1 << col);
|
||||||
|
nrNsaConfigs[row] &= ~(1 << col);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set band config
|
// set band config
|
||||||
|
|
Loading…
Reference in a new issue