Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msim: network mode changes (2/2) #7

Open
wants to merge 2 commits into
base: lp5.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions media/java/android/media/CamcorderProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ public class CamcorderProfile
*/
public static final int QUALITY_HVGA = 19;

/** @hide
* Quality level corresponding to 1440p resolution
*/
public static final int QUALITY_1440P = 20;

// Start and end of quality list
private static final int QUALITY_LIST_START = QUALITY_LOW;
private static final int QUALITY_LIST_END = QUALITY_HVGA;
private static final int QUALITY_LIST_END = QUALITY_1440P;

/**
* Time lapse quality level corresponding to the lowest available resolution.
Expand Down Expand Up @@ -199,9 +204,14 @@ public class CamcorderProfile
*/
public static final int QUALITY_TIME_LAPSE_4kDCI = 1014;

/** @hide
* Time lapse quality level corresponding to the 1440p resolution.
*/
public static final int QUALITY_TIME_LAPSE_1440P = 1015;

// Start and end of timelapse quality list
private static final int QUALITY_TIME_LAPSE_LIST_START = QUALITY_TIME_LAPSE_LOW;
private static final int QUALITY_TIME_LAPSE_LIST_END = QUALITY_TIME_LAPSE_4kDCI;
private static final int QUALITY_TIME_LAPSE_LIST_END = QUALITY_TIME_LAPSE_1440P;

/**
* High speed ( >= 100fps) quality level corresponding to the lowest available resolution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public void dispatchDemoCommand(String command, Bundle args) {
int start = mSubscriptionManager.getActiveSubscriptionInfoCountMax();
for (int i = start /* get out of normal index range */; i < start + num; i++) {
SubscriptionInfo info = new SubscriptionInfo(i, "", i, "", "", 0, 0, "", 0,
null, 0, 0, "", 0, 0);
null, 0, 0, "", 0, 0, 0);
subs.add(info);
mMobileSignalControllers.put(i, new MobileSignalController(mContext,
mConfig, mHasMobileDataFeature, mPhone, mSignalsChangedCallbacks,
Expand Down
24 changes: 21 additions & 3 deletions telephony/java/android/telephony/SubscriptionInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,17 @@ public class SubscriptionInfo implements Parcelable {
*/
public int mNwMode;

/**
* @hide
*/
public int mUserNwMode;

/**
* @hide
*/
public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName,
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
Bitmap icon, int mcc, int mnc, String countryIso, int status, int nwMode) {
Bitmap icon, int mcc, int mnc, String countryIso, int status, int nwMode, int userNwMode) {
this.mId = id;
this.mIccId = iccId;
this.mSimSlotIndex = simSlotIndex;
Expand All @@ -137,6 +142,7 @@ public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence dis
this.mMnc = mnc;
this.mStatus = status;
this.mNwMode = nwMode;
this.mUserNwMode = userNwMode;
this.mCountryIso = countryIso;
}

Expand Down Expand Up @@ -294,6 +300,7 @@ public int getMnc() {
public int getStatus() {
return this.mStatus;
}

/**
* Returns the Network mode.
* @hide
Expand All @@ -302,6 +309,14 @@ public int getNwMode() {
return this.mNwMode;
}

/**
* Returns the User set Network mode.
* @hide
*/
public int getUserNwMode() {
return this.mUserNwMode;
}

/**
* @return the ISO country code
*/
Expand All @@ -325,12 +340,13 @@ public SubscriptionInfo createFromParcel(Parcel source) {
int mnc = source.readInt();
int status = source.readInt();
int nwMode = source.readInt();
int userNwMode = source.readInt();

String countryIso = source.readString();
Bitmap iconBitmap = Bitmap.CREATOR.createFromParcel(source);

return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso, status, nwMode);
nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso, status, nwMode, userNwMode);
}

@Override
Expand All @@ -354,6 +370,7 @@ public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mMnc);
dest.writeInt(mStatus);
dest.writeInt(mNwMode);
dest.writeInt(mUserNwMode);
dest.writeString(mCountryIso);
mIconBitmap.writeToParcel(dest, flags);
}
Expand All @@ -369,6 +386,7 @@ public String toString() {
+ " displayName=" + mDisplayName + " carrierName=" + mCarrierName
+ " nameSource=" + mNameSource + " iconTint=" + mIconTint
+ " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
+ " mnc " + mMnc + " mSubStatus=" + mStatus + " mNwMode=" + mNwMode + "}";
+ " mnc " + mMnc + " mSubStatus=" + mStatus + " mNwMode=" + mNwMode
+ " mUserNwMode=" + mUserNwMode + "}";
}
}
7 changes: 7 additions & 0 deletions telephony/java/android/telephony/SubscriptionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ public class SubscriptionManager {
*/
public static final String NETWORK_MODE = "network_mode";

/**
* The user configured Network mode of SIM/sub.
* <P>Type: INTEGER (int)</P>
* {@hide}
*/
public static final String USER_NETWORK_MODE = "user_network_mode";

/** {@hide} */
public static final int DEFAULT_NW_MODE = -1;

Expand Down