Loading proto/src/persist_atoms.proto +3 −0 Original line number Diff line number Diff line Loading @@ -677,4 +677,7 @@ message SatelliteSosMessageRecommender { optional bool is_ims_registered = 3; optional int32 cellular_service_state = 4; optional int32 count = 5; optional bool is_multi_sim = 6; optional int32 recommending_handover_type = 7; optional bool is_satellite_allowed_in_current_location = 8; } src/java/com/android/internal/telephony/metrics/MetricsCollector.java +4 −1 Original line number Diff line number Diff line Loading @@ -1336,7 +1336,10 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback { stats.countOfTimerStarted, stats.isImsRegistered, stats.cellularServiceState, stats.count); stats.count, stats.isMultiSim, stats.recommendingHandoverType, stats.isSatelliteAllowedInCurrentLocation); } /** Returns all phones in {@link PhoneFactory}, or an empty array if phones not made yet. */ Loading src/java/com/android/internal/telephony/metrics/PersistAtomsStorage.java +3 −1 Original line number Diff line number Diff line Loading @@ -2070,7 +2070,9 @@ public class PersistAtomsStorage { if (stats.isDisplaySosMessageSent == key.isDisplaySosMessageSent && stats.countOfTimerStarted == key.countOfTimerStarted && stats.isImsRegistered == key.isImsRegistered && stats.cellularServiceState == key.cellularServiceState) { && stats.cellularServiceState == key.cellularServiceState && stats.isMultiSim == key.isMultiSim && stats.recommendingHandoverType == key.recommendingHandoverType) { return stats; } } Loading src/java/com/android/internal/telephony/metrics/SatelliteStats.java +59 −1 Original line number Diff line number Diff line Loading @@ -732,12 +732,19 @@ public class SatelliteStats { private final int mCountOfTimerStarted; private final boolean mIsImsRegistered; private final int mCellularServiceState; private final boolean mIsMultiSim; private final int mRecommendingHandoverType; private final boolean mIsSatelliteAllowedInCurrentLocation; private SatelliteSosMessageRecommenderParams(Builder builder) { this.mIsDisplaySosMessageSent = builder.mIsDisplaySosMessageSent; this.mCountOfTimerStarted = builder.mCountOfTimerStarted; this.mIsImsRegistered = builder.mIsImsRegistered; this.mCellularServiceState = builder.mCellularServiceState; this.mIsMultiSim = builder.mIsMultiSim; this.mRecommendingHandoverType = builder.mRecommendingHandoverType; this.mIsSatelliteAllowedInCurrentLocation = builder.mIsSatelliteAllowedInCurrentLocation; } public boolean isDisplaySosMessageSent() { Loading @@ -756,6 +763,18 @@ public class SatelliteStats { return mCellularServiceState; } public boolean isMultiSim() { return mIsMultiSim; } public int getRecommendingHandoverType() { return mRecommendingHandoverType; } public boolean isSatelliteAllowedInCurrentLocation() { return mIsSatelliteAllowedInCurrentLocation; } /** * A builder class to create {@link SatelliteProvisionParams} data structure class */ Loading @@ -764,6 +783,10 @@ public class SatelliteStats { private int mCountOfTimerStarted = -1; private boolean mIsImsRegistered = false; private int mCellularServiceState = -1; private boolean mIsMultiSim = false; private int mRecommendingHandoverType = -1; private boolean mIsSatelliteAllowedInCurrentLocation = false; /** * Sets resultCode value of {@link SatelliteSosMessageRecommender} atom Loading Loading @@ -802,6 +825,34 @@ public class SatelliteStats { return this; } /** * Sets isMultiSim value of {@link SatelliteSosMessageRecommender} atom * then returns Builder class */ public Builder setIsMultiSim(boolean isMultiSim) { this.mIsMultiSim = isMultiSim; return this; } /** * Sets recommendingHandoverType value of {@link SatelliteSosMessageRecommender} atom * then returns Builder class */ public Builder setRecommendingHandoverType(int recommendingHandoverType) { this.mRecommendingHandoverType = recommendingHandoverType; return this; } /** * Sets isSatelliteAllowedInCurrentLocation value of * {@link SatelliteSosMessageRecommender} atom then returns Builder class. */ public Builder setIsSatelliteAllowedInCurrentLocation( boolean satelliteAllowedInCurrentLocation) { mIsSatelliteAllowedInCurrentLocation = satelliteAllowedInCurrentLocation; return this; } /** * Returns SosMessageRecommenderParams, which contains whole component of * {@link SatelliteSosMessageRecommenderParams} atom Loading @@ -818,7 +869,11 @@ public class SatelliteStats { + "isDisplaySosMessageSent=" + mIsDisplaySosMessageSent + ", countOfTimerStarted=" + mCountOfTimerStarted + ", isImsRegistered=" + mIsImsRegistered + ", cellularServiceState=" + mCellularServiceState + ")"; + ", cellularServiceState=" + mCellularServiceState + ", isMultiSim=" + mIsMultiSim + ", recommendingHandoverType=" + mRecommendingHandoverType + ", isSatelliteAllowedInCurrentLocation=" + mIsSatelliteAllowedInCurrentLocation + ")"; } } Loading Loading @@ -899,6 +954,9 @@ public class SatelliteStats { proto.countOfTimerStarted = param.getCountOfTimerStarted(); proto.isImsRegistered = param.isImsRegistered(); proto.cellularServiceState = param.getCellularServiceState(); proto.isMultiSim = param.isMultiSim(); proto.recommendingHandoverType = param.getRecommendingHandoverType(); proto.isSatelliteAllowedInCurrentLocation = param.isSatelliteAllowedInCurrentLocation(); proto.count = 1; mAtomsStorage.addSatelliteSosMessageRecommenderStats(proto); } Loading src/java/com/android/internal/telephony/satellite/DatagramReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -496,7 +496,7 @@ public class DatagramReceiver extends Handler { */ @SatelliteManager.SatelliteResult public int registerForSatelliteDatagram(int subId, @NonNull ISatelliteDatagramCallback callback) { if (!SatelliteController.getInstance().isSatelliteSupported()) { if (!SatelliteController.getInstance().isSatelliteSupportedViaOem()) { return SatelliteManager.SATELLITE_RESULT_NOT_SUPPORTED; } Loading Loading
proto/src/persist_atoms.proto +3 −0 Original line number Diff line number Diff line Loading @@ -677,4 +677,7 @@ message SatelliteSosMessageRecommender { optional bool is_ims_registered = 3; optional int32 cellular_service_state = 4; optional int32 count = 5; optional bool is_multi_sim = 6; optional int32 recommending_handover_type = 7; optional bool is_satellite_allowed_in_current_location = 8; }
src/java/com/android/internal/telephony/metrics/MetricsCollector.java +4 −1 Original line number Diff line number Diff line Loading @@ -1336,7 +1336,10 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback { stats.countOfTimerStarted, stats.isImsRegistered, stats.cellularServiceState, stats.count); stats.count, stats.isMultiSim, stats.recommendingHandoverType, stats.isSatelliteAllowedInCurrentLocation); } /** Returns all phones in {@link PhoneFactory}, or an empty array if phones not made yet. */ Loading
src/java/com/android/internal/telephony/metrics/PersistAtomsStorage.java +3 −1 Original line number Diff line number Diff line Loading @@ -2070,7 +2070,9 @@ public class PersistAtomsStorage { if (stats.isDisplaySosMessageSent == key.isDisplaySosMessageSent && stats.countOfTimerStarted == key.countOfTimerStarted && stats.isImsRegistered == key.isImsRegistered && stats.cellularServiceState == key.cellularServiceState) { && stats.cellularServiceState == key.cellularServiceState && stats.isMultiSim == key.isMultiSim && stats.recommendingHandoverType == key.recommendingHandoverType) { return stats; } } Loading
src/java/com/android/internal/telephony/metrics/SatelliteStats.java +59 −1 Original line number Diff line number Diff line Loading @@ -732,12 +732,19 @@ public class SatelliteStats { private final int mCountOfTimerStarted; private final boolean mIsImsRegistered; private final int mCellularServiceState; private final boolean mIsMultiSim; private final int mRecommendingHandoverType; private final boolean mIsSatelliteAllowedInCurrentLocation; private SatelliteSosMessageRecommenderParams(Builder builder) { this.mIsDisplaySosMessageSent = builder.mIsDisplaySosMessageSent; this.mCountOfTimerStarted = builder.mCountOfTimerStarted; this.mIsImsRegistered = builder.mIsImsRegistered; this.mCellularServiceState = builder.mCellularServiceState; this.mIsMultiSim = builder.mIsMultiSim; this.mRecommendingHandoverType = builder.mRecommendingHandoverType; this.mIsSatelliteAllowedInCurrentLocation = builder.mIsSatelliteAllowedInCurrentLocation; } public boolean isDisplaySosMessageSent() { Loading @@ -756,6 +763,18 @@ public class SatelliteStats { return mCellularServiceState; } public boolean isMultiSim() { return mIsMultiSim; } public int getRecommendingHandoverType() { return mRecommendingHandoverType; } public boolean isSatelliteAllowedInCurrentLocation() { return mIsSatelliteAllowedInCurrentLocation; } /** * A builder class to create {@link SatelliteProvisionParams} data structure class */ Loading @@ -764,6 +783,10 @@ public class SatelliteStats { private int mCountOfTimerStarted = -1; private boolean mIsImsRegistered = false; private int mCellularServiceState = -1; private boolean mIsMultiSim = false; private int mRecommendingHandoverType = -1; private boolean mIsSatelliteAllowedInCurrentLocation = false; /** * Sets resultCode value of {@link SatelliteSosMessageRecommender} atom Loading Loading @@ -802,6 +825,34 @@ public class SatelliteStats { return this; } /** * Sets isMultiSim value of {@link SatelliteSosMessageRecommender} atom * then returns Builder class */ public Builder setIsMultiSim(boolean isMultiSim) { this.mIsMultiSim = isMultiSim; return this; } /** * Sets recommendingHandoverType value of {@link SatelliteSosMessageRecommender} atom * then returns Builder class */ public Builder setRecommendingHandoverType(int recommendingHandoverType) { this.mRecommendingHandoverType = recommendingHandoverType; return this; } /** * Sets isSatelliteAllowedInCurrentLocation value of * {@link SatelliteSosMessageRecommender} atom then returns Builder class. */ public Builder setIsSatelliteAllowedInCurrentLocation( boolean satelliteAllowedInCurrentLocation) { mIsSatelliteAllowedInCurrentLocation = satelliteAllowedInCurrentLocation; return this; } /** * Returns SosMessageRecommenderParams, which contains whole component of * {@link SatelliteSosMessageRecommenderParams} atom Loading @@ -818,7 +869,11 @@ public class SatelliteStats { + "isDisplaySosMessageSent=" + mIsDisplaySosMessageSent + ", countOfTimerStarted=" + mCountOfTimerStarted + ", isImsRegistered=" + mIsImsRegistered + ", cellularServiceState=" + mCellularServiceState + ")"; + ", cellularServiceState=" + mCellularServiceState + ", isMultiSim=" + mIsMultiSim + ", recommendingHandoverType=" + mRecommendingHandoverType + ", isSatelliteAllowedInCurrentLocation=" + mIsSatelliteAllowedInCurrentLocation + ")"; } } Loading Loading @@ -899,6 +954,9 @@ public class SatelliteStats { proto.countOfTimerStarted = param.getCountOfTimerStarted(); proto.isImsRegistered = param.isImsRegistered(); proto.cellularServiceState = param.getCellularServiceState(); proto.isMultiSim = param.isMultiSim(); proto.recommendingHandoverType = param.getRecommendingHandoverType(); proto.isSatelliteAllowedInCurrentLocation = param.isSatelliteAllowedInCurrentLocation(); proto.count = 1; mAtomsStorage.addSatelliteSosMessageRecommenderStats(proto); } Loading
src/java/com/android/internal/telephony/satellite/DatagramReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -496,7 +496,7 @@ public class DatagramReceiver extends Handler { */ @SatelliteManager.SatelliteResult public int registerForSatelliteDatagram(int subId, @NonNull ISatelliteDatagramCallback callback) { if (!SatelliteController.getInstance().isSatelliteSupported()) { if (!SatelliteController.getInstance().isSatelliteSupportedViaOem()) { return SatelliteManager.SATELLITE_RESULT_NOT_SUPPORTED; } Loading