File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
src/main/java/com/afwsamples/testdpc/policy Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -91,18 +91,36 @@ public void onReceive(Context context, Intent intent) {
91
91
intent .getIntExtra (EuiccManager .EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE , -1 );
92
92
int errorCode =
93
93
intent .getIntExtra (EuiccManager .EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE , -1 );
94
+ int resultCode = getResultCode ();
94
95
95
96
Log .v (
96
97
TAG ,
97
98
"Download result: resultCode: "
98
- + getResultText (getResultCode () )
99
+ + getResultText (resultCode )
99
100
+ " detailedCode: "
100
- + getResultCode ()
101
+ + resultCode
101
102
+ " detailedCode: "
102
103
+ detailedCode
103
104
+ " errorCode: "
104
105
+ errorCode );
105
- showToast ("Download result: " + getResultText (getResultCode ()), Toast .LENGTH_LONG );
106
+ showToast ("Download result: " + getResultText (resultCode ), Toast .LENGTH_LONG );
107
+ if (resultCode == EuiccManager .EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR ) {
108
+ try {
109
+ mEuiccManager .startResolutionActivity (
110
+ getActivity (),
111
+ resultCode ,
112
+ intent ,
113
+ PendingIntent .getBroadcast (
114
+ getActivity (),
115
+ 0 ,
116
+ new Intent (ACTION_DOWNLOAD_ESIM ),
117
+ PendingIntent .FLAG_MUTABLE
118
+ | PendingIntent .FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT ));
119
+ } catch (Exception e ) {
120
+ Log .e (TAG , "Failed to start resolution activity" , e );
121
+ }
122
+ return ;
123
+ }
106
124
getActivity ().unregisterReceiver (mDownloadESIMReceiver );
107
125
}
108
126
};
You can’t perform that action at this time.
0 commit comments