Compare commits

...

10 commits

Author SHA1 Message Date
Android Build Coastguard Worker
fd916079a2 Merge cherrypicks of ['googleplex-android-review.googlesource.com/28536282'] into 24Q3-release.
Change-Id: I7feb713e45419ed22251c7841156dcb597ab93ea
2024-08-06 09:33:09 +00:00
Hakjun Choi
80fd1d030a update pending intent start mode
Currently it is set as setPendingIntentBackgroundActivityStartMode for launch Satellite ESOS questionnaire but it is not working form AP3A
application team requested update it to setPendingIntentCreatorBackgroundActivityStartMode

Bug: 355303309
Flag: EXEMPT bugfix
Test: manually lunch ESOS questionnaire using emergency call in OOS state
      https://b.corp.google.com/issues/355303309#comment17
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:18ea76ce5ce2e28b7cdb0a7eaa08db35719298ca)
Merged-In: I552ee1778fe7b324118e61ea465a9c46f4528468
Change-Id: I552ee1778fe7b324118e61ea465a9c46f4528468
2024-08-06 09:19:42 +00:00
Android Build Coastguard Worker
727ee7f903 Merge cherrypicks of ['googleplex-android-review.googlesource.com/28578523'] into 24Q3-release.
Change-Id: Ib9d3799f97c8c845f79bbd72186263f1414102ea
2024-07-31 17:33:24 +00:00
Neha Jain
385088d479 Revert "Add public method to retrun whether the satellite request is for an emergency or not"
This reverts commit 517ad76ed9.

Reason for revert: build break
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:734c1dbda69606d7cfa0225ec5b78ea25f1e529f)
Merged-In: I1dd9e1db80809fb5d83544b4175da42022c621a6
Change-Id: I1dd9e1db80809fb5d83544b4175da42022c621a6
2024-07-31 17:33:08 +00:00
Android Build Coastguard Worker
7b3ce8801e Merge cherrypicks of ['googleplex-android-review.googlesource.com/28209936'] into 24Q3-release.
Change-Id: I6a9ddcdb5fa585ff88dce9b2408d87c0d3a199bf
2024-07-31 15:40:47 +00:00
joonhunshin
517ad76ed9 Add public method to retrun whether the satellite request is for an emergency or not
Bug: 350516702
Test: atest TelephonyConnectionServiceTest
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2b315c1881b3b2cdd20295df933c771d0c5672be)
Merged-In: I59f58e141e81de1969163b44e554c2d568f6176d
Change-Id: I59f58e141e81de1969163b44e554c2d568f6176d
2024-07-31 15:40:31 +00:00
Android Build Coastguard Worker
28f4876c95 Merge cherrypicks of ['googleplex-android-review.googlesource.com/28479567'] into 24Q3-release.
Change-Id: I62efee08c522e6ddabff47e075f7b249926a654f
2024-07-31 08:34:38 +00:00
Hakjun Choi
6f099e9493 Add direct report back when registerForNtnSignalStrength is invoked
There is a case that caller has requested to report ntn signal strength, but no report for a whille as there is not signal strength happens.
Therefore added a immediate report back when registerForNtnSignalStrength is invoked

Bug: 353593633
Flag: EXEMPT bugfix
Test: atest SatelliteControllerTest
    manually e2e test and check whether direct reports triggered by log checking
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:74abda9fa04488044d7897ee062822656b3c09f6)
Merged-In: I17bd7f7989171ec64a6b38a73665552a2619080a
Change-Id: I17bd7f7989171ec64a6b38a73665552a2619080a
2024-07-31 08:32:39 +00:00
Android Build Coastguard Worker
585f1a8141 Merge cherrypicks of ['googleplex-android-review.googlesource.com/28292405'] into 24Q3-release.
Change-Id: Id86f68fcff54c280fe29a2a19c8573fa049f9c21
2024-07-20 07:19:31 +00:00
Hakjun Choi
39594ae1f9 Add flag FLAG_ACTIVITY_CLEAR_TOP to reopen existing Activity
In case ESOS questionnaire is invoked several times without exit, only a single instance of questionnaire is shown at one time.

Bug: 349145955
Flag: EXEMPT bugfix
Test: manual e2e test using shieldbox for both T911 and ESOS
Test: 352761121
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:87ca3eb44c85dd371398feb9bdc0790729ab3f91)
Merged-In: I4662939fa98b66fec77ff257ff33128580e1959e
Change-Id: I4662939fa98b66fec77ff257ff33128580e1959e
2024-07-20 07:05:12 +00:00
3 changed files with 21 additions and 1 deletions

View file

@ -2269,6 +2269,15 @@ public class SatelliteController extends Handler {
int error = evaluateOemSatelliteRequestAllowed(true);
if (error == SATELLITE_RESULT_SUCCESS) {
mNtnSignalStrengthChangedListeners.put(callback.asBinder(), callback);
synchronized (mNtnSignalsStrengthLock) {
try {
callback.onNtnSignalStrengthChanged(mNtnSignalStrength);
plogd("registerForNtnSignalStrengthChanged: " + mNtnSignalStrength);
} catch (RemoteException ex) {
ploge("registerForNtnSignalStrengthChanged: RemoteException ex="
+ ex);
}
}
} else {
throw new RemoteException(new IllegalStateException("registration fails: " + error));
}

View file

@ -16,6 +16,7 @@
package com.android.internal.telephony.satellite;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.telephony.ServiceState.STATE_EMERGENCY_ONLY;
import static android.telephony.ServiceState.STATE_IN_SERVICE;
import static android.telephony.ServiceState.STATE_OUT_OF_SERVICE;
@ -29,6 +30,7 @@ import static com.android.internal.telephony.satellite.SatelliteController.INVAL
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@ -700,10 +702,15 @@ public class SatelliteSOSMessageRecommender extends Handler {
intent = new Intent(Intent.ACTION_SENDTO, uri);
} else {
intent = new Intent(action);
intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP);
}
Bundle activityOptions = ActivityOptions.makeBasic()
.setPendingIntentCreatorBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
.toBundle();
intent.setComponent(new ComponentName(packageName, className));
return PendingIntent.getActivity(mContext, 0, intent,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE, activityOptions);
}
private boolean isEmergencyCallToSatelliteHandoverTypeT911Enforced() {

View file

@ -2389,6 +2389,10 @@ public class SatelliteControllerTest extends TelephonyTest {
verifyRegisterForNtnSignalStrengthChanged(SUB_ID, callback,
SATELLITE_RESULT_SUCCESS);
verifyRequestNtnSignalStrength(expectedLevel, SATELLITE_RESULT_SUCCESS);
processAllMessages();
assertTrue(waitForForEvents(
semaphore, 1, "testRegisterForNtnSignalStrengthChanged"));
assertEquals(expectedLevel, signalStrength[0].getLevel());
expectedLevel = NTN_SIGNAL_STRENGTH_GOOD;
sendNtnSignalStrengthChangedEvent(expectedLevel, null);