blob: f48d74bbf4d770399dc0ee3a0308d8e410392b24 [file] [log] [blame]
The Android Open Source Project9d9730a2009-03-03 19:32:37 -08001/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.stk;
18
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080019import android.app.Activity;
w302348bf95af2015-01-09 10:54:41 -080020import android.app.AlarmManager;
Sanket Padawe7b70fb42017-04-05 15:35:34 -070021import android.app.AlertDialog;
w302348bf95af2015-01-09 10:54:41 -080022import android.content.Context;
Sanket Padawe7b70fb42017-04-05 15:35:34 -070023import android.content.DialogInterface;
Yoshiaki Naka711656a2018-05-30 17:48:31 +090024import android.content.Intent;
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080025import android.os.Bundle;
w302348bf95af2015-01-09 10:54:41 -080026import android.os.SystemClock;
Sandeep Guttad28fced2018-04-17 19:09:11 +053027import android.os.SystemProperties;
Yoshiaki Naka90183132017-08-31 19:25:33 +090028import android.telephony.SubscriptionManager;
Takanori Nakano9ecdba72017-07-21 15:27:49 +090029import android.text.TextUtils;
30import android.view.LayoutInflater;
31import android.view.View;
32import android.widget.ImageView;
33import android.widget.TextView;
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080034
Yoshiaki Naka711656a2018-05-30 17:48:31 +090035import com.android.internal.telephony.cat.CatLog;
36import com.android.internal.telephony.cat.TextMessage;
Jayachandran C1379e792019-10-23 18:12:48 -070037import com.android.internal.telephony.util.TelephonyUtils;
Yoshiaki Naka711656a2018-05-30 17:48:31 +090038
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080039/**
w302348bf95af2015-01-09 10:54:41 -080040 * AlertDialog used for DISPLAY TEXT commands.
Wink Saville79085fc2009-06-09 10:27:23 -070041 *
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080042 */
Sanket Padawe7b70fb42017-04-05 15:35:34 -070043public class StkDialogActivity extends Activity {
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080044 // members
Yoshiaki Naka3a980db2019-10-30 17:11:33 +090045 private static final String LOG_TAG =
46 new Object(){}.getClass().getEnclosingClass().getSimpleName();
Wink Savillee68857d2014-10-17 15:23:05 -070047 TextMessage mTextMsg = null;
48 private int mSlotId = -1;
49 private StkAppService appService = StkAppService.getInstance();
w302348bf95af2015-01-09 10:54:41 -080050 // Determines whether Terminal Response (TR) has been sent
Johannes Carlssonef243a22011-10-25 10:37:24 +020051 private boolean mIsResponseSent = false;
w302348bf95af2015-01-09 10:54:41 -080052 // Utilize AlarmManager for real-time countdown
Yoshiaki Naka711656a2018-05-30 17:48:31 +090053 private static final String DIALOG_ALARM_TAG = LOG_TAG;
54 private static final long NO_DIALOG_ALARM = -1;
55 private long mAlarmTime = NO_DIALOG_ALARM;
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080056
Takanori Nakano1d3f3c12016-08-30 10:34:24 +090057 // Keys for saving the state of the dialog in the bundle
58 private static final String TEXT_KEY = "text";
Yoshiaki Naka711656a2018-05-30 17:48:31 +090059 private static final String ALARM_TIME_KEY = "alarm_time";
60 private static final String RESPONSE_SENT_KEY = "response_sent";
Takanori Nakano1d3f3c12016-08-30 10:34:24 +090061 private static final String SLOT_ID_KEY = "slotid";
Yoshiaki Nakaa1cea462018-08-09 20:33:36 +090062
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080063
Takanori Nakanocbe32d32017-07-20 17:10:46 +090064 private AlertDialog mAlertDialog;
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080065
Sandeep Guttad28fced2018-04-17 19:09:11 +053066 // system property to enable/disable adding content description
67 private static String ENABLE_CONTENT_DESCRIPTION = "persist.vendor.stk.enable_content";
68 private boolean mEnableContent = SystemProperties.getBoolean(ENABLE_CONTENT_DESCRIPTION, false);
69
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080070 @Override
Takanori Nakano1d3f3c12016-08-30 10:34:24 +090071 protected void onCreate(Bundle savedInstanceState) {
72 super.onCreate(savedInstanceState);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080073
w302348bf95af2015-01-09 10:54:41 -080074 CatLog.d(LOG_TAG, "onCreate, sim id: " + mSlotId);
Ryuto Sawadaba9b86b2016-10-03 14:03:16 +090075
76 // appService can be null if this activity is automatically recreated by the system
77 // with the saved instance state right after the phone process is killed.
78 if (appService == null) {
79 CatLog.d(LOG_TAG, "onCreate - appService is null");
80 finish();
81 return;
82 }
83
w302348bf95af2015-01-09 10:54:41 -080084 // New Dialog is created - set to no response sent
85 mIsResponseSent = false;
86
Takanori Nakanocbe32d32017-07-20 17:10:46 +090087 AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080088
Sanket Padawe7b70fb42017-04-05 15:35:34 -070089 alertDialogBuilder.setPositiveButton(R.string.button_ok, new
90 DialogInterface.OnClickListener() {
91 @Override
92 public void onClick(DialogInterface dialog, int id) {
93 CatLog.d(LOG_TAG, "OK Clicked!, mSlotId: " + mSlotId);
Sanket Padawe7b70fb42017-04-05 15:35:34 -070094 sendResponse(StkAppService.RES_ID_CONFIRM, true);
Sanket Padawe7b70fb42017-04-05 15:35:34 -070095 }
96 });
The Android Open Source Project9d9730a2009-03-03 19:32:37 -080097
Sanket Padawe7b70fb42017-04-05 15:35:34 -070098 alertDialogBuilder.setNegativeButton(R.string.button_cancel, new
99 DialogInterface.OnClickListener() {
100 @Override
101 public void onClick(DialogInterface dialog,int id) {
102 CatLog.d(LOG_TAG, "Cancel Clicked!, mSlotId: " + mSlotId);
Sanket Padawe7b70fb42017-04-05 15:35:34 -0700103 sendResponse(StkAppService.RES_ID_CONFIRM, false);
Sanket Padawe7b70fb42017-04-05 15:35:34 -0700104 }
105 });
Takuro Nishief00cb12017-07-04 11:46:28 +0900106
107 alertDialogBuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {
108 @Override
109 public void onCancel(DialogInterface dialog) {
110 CatLog.d(LOG_TAG, "Moving backward!, mSlotId: " + mSlotId);
Takuro Nishief00cb12017-07-04 11:46:28 +0900111 sendResponse(StkAppService.RES_ID_BACKWARD);
Takuro Nishief00cb12017-07-04 11:46:28 +0900112 }
113 });
114
Sanket Padawe7b70fb42017-04-05 15:35:34 -0700115 alertDialogBuilder.create();
w302348bf95af2015-01-09 10:54:41 -0800116
Takanori Nakanocbe32d32017-07-20 17:10:46 +0900117 initFromIntent(getIntent());
118 if (mTextMsg == null) {
119 finish();
120 return;
121 }
122
123 if (!mTextMsg.responseNeeded) {
124 alertDialogBuilder.setNegativeButton(null, null);
Yoshiaki Naka90183132017-08-31 19:25:33 +0900125 // Register the instance of this activity because the dialog displayed for DISPLAY TEXT
126 // command with an immediate response object should disappear when the terminal receives
127 // a subsequent proactive command containing display data.
128 appService.getStkContext(mSlotId).setImmediateDialogInstance(this);
Anna Suzuki35309b02019-02-15 16:24:59 +0900129 } else {
130 appService.getStkContext(mSlotId).setPendingDialogInstance(this);
Takanori Nakanocbe32d32017-07-20 17:10:46 +0900131 }
132
133 alertDialogBuilder.setTitle(mTextMsg.title);
134
Takanori Nakano9ecdba72017-07-21 15:27:49 +0900135 LayoutInflater inflater = this.getLayoutInflater();
136 View dialogView = inflater.inflate(R.layout.stk_msg_dialog, null);
137 alertDialogBuilder.setView(dialogView);
138 TextView tv = (TextView) dialogView.findViewById(R.id.message);
139 ImageView iv = (ImageView) dialogView.findViewById(R.id.icon);
140
141 if (mTextMsg.icon != null) {
142 iv.setImageBitmap(mTextMsg.icon);
Sandeep Guttad28fced2018-04-17 19:09:11 +0530143 if (mEnableContent) {
144 iv.setContentDescription(StkAppService.TEXT_ICON_FROM_COMMAND + ": "
145 + mTextMsg.text);
146 }
Takanori Nakano9ecdba72017-07-21 15:27:49 +0900147 } else {
Sandeep Guttad28fced2018-04-17 19:09:11 +0530148 if (mEnableContent) {
149 iv.setContentDescription(StkAppService.TEXT_DEFAULT_ICON);
150 } else {
151 iv.setVisibility(View.GONE);
152 }
Takanori Nakano9ecdba72017-07-21 15:27:49 +0900153 }
154
155 // Per spec, only set text if the icon is not provided or not self-explanatory
156 if ((mTextMsg.icon == null || !mTextMsg.iconSelfExplanatory)
157 && !TextUtils.isEmpty(mTextMsg.text)) {
158 tv.setText(mTextMsg.text);
159 } else {
160 tv.setVisibility(View.GONE);
Takanori Nakanocbe32d32017-07-20 17:10:46 +0900161 }
162
163 mAlertDialog = alertDialogBuilder.create();
164 mAlertDialog.setCanceledOnTouchOutside(false);
165 mAlertDialog.show();
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800166 }
167
168 @Override
169 public void onResume() {
170 super.onResume();
Wink Savillee68857d2014-10-17 15:23:05 -0700171 CatLog.d(LOG_TAG, "onResume - mIsResponseSent[" + mIsResponseSent +
172 "], sim id: " + mSlotId);
Christopher Posselwhitecfe4d7f2013-09-04 09:01:50 +0200173 /*
Preeti Ahuja414bc412013-06-25 19:31:49 -0700174 * If the userClear flag is set and dialogduration is set to 0, the display Text
175 * should be displayed to user forever until some high priority event occurs
176 * (incoming call, MMI code execution etc as mentioned under section
177 * ETSI 102.223, 6.4.1)
Christopher Posselwhitecfe4d7f2013-09-04 09:01:50 +0200178 */
Preeti Ahuja414bc412013-06-25 19:31:49 -0700179 if (StkApp.calculateDurationInMilis(mTextMsg.duration) == 0 &&
Sanket Padawe7b70fb42017-04-05 15:35:34 -0700180 !mTextMsg.responseNeeded && mTextMsg.userClear) {
w302348bf95af2015-01-09 10:54:41 -0800181 CatLog.d(LOG_TAG, "User should clear text..showing message forever");
Christopher Posselwhitecfe4d7f2013-09-04 09:01:50 +0200182 return;
183 }
184
Preeti Ahuja95919342013-10-01 18:18:55 -0700185 appService.setDisplayTextDlgVisibility(true, mSlotId);
w302348bf95af2015-01-09 10:54:41 -0800186
187 /*
188 * When another activity takes the foreground, we do not want the Terminal
189 * Response timer to be restarted when our activity resumes. Hence we will
190 * check if there is an existing timer, and resume it. In this way we will
Sanket Padawe7b70fb42017-04-05 15:35:34 -0700191 * inform the SIM in correct time when there is no response from the User
w302348bf95af2015-01-09 10:54:41 -0800192 * to a dialog.
193 */
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900194 if (mAlarmTime == NO_DIALOG_ALARM) {
195 startTimeOut();
w302348bf95af2015-01-09 10:54:41 -0800196 }
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800197 }
198
199 @Override
200 public void onPause() {
201 super.onPause();
Wink Savillee68857d2014-10-17 15:23:05 -0700202 CatLog.d(LOG_TAG, "onPause, sim id: " + mSlotId);
Preeti Ahuja95919342013-10-01 18:18:55 -0700203 appService.setDisplayTextDlgVisibility(false, mSlotId);
Preeti Ahuja03be6672012-08-30 19:21:25 +0530204
205 /*
206 * do not cancel the timer here cancelTimeOut(). If any higher/lower
207 * priority events such as incoming call, new sms, screen off intent,
208 * notification alerts, user actions such as 'User moving to another activtiy'
209 * etc.. occur during Display Text ongoing session,
210 * this activity would receive 'onPause()' event resulting in
211 * cancellation of the timer. As a result no terminal response is
212 * sent to the card.
213 */
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800214 }
215
216 @Override
Johannes Carlssonef243a22011-10-25 10:37:24 +0200217 protected void onStart() {
w302348bf95af2015-01-09 10:54:41 -0800218 CatLog.d(LOG_TAG, "onStart, sim id: " + mSlotId);
Johannes Carlssonef243a22011-10-25 10:37:24 +0200219 super.onStart();
Johannes Carlssonef243a22011-10-25 10:37:24 +0200220 }
221
222 @Override
223 public void onStop() {
224 super.onStop();
Wink Savillee68857d2014-10-17 15:23:05 -0700225 CatLog.d(LOG_TAG, "onStop - before Send CONFIRM false mIsResponseSent[" +
226 mIsResponseSent + "], sim id: " + mSlotId);
Johannes Carlssonef243a22011-10-25 10:37:24 +0200227 }
228
229 @Override
Wink Savillee68857d2014-10-17 15:23:05 -0700230 public void onDestroy() {
231 super.onDestroy();
232 CatLog.d(LOG_TAG, "onDestroy - mIsResponseSent[" + mIsResponseSent +
233 "], sim id: " + mSlotId);
Takanori Nakanocbe32d32017-07-20 17:10:46 +0900234
235 if (mAlertDialog != null && mAlertDialog.isShowing()) {
236 mAlertDialog.dismiss();
237 mAlertDialog = null;
238 }
239
Ryuto Sawadaba9b86b2016-10-03 14:03:16 +0900240 if (appService == null) {
241 return;
242 }
Wink Savillee68857d2014-10-17 15:23:05 -0700243 // if dialog activity is finished by stkappservice
244 // when receiving OP_LAUNCH_APP from the other SIM, we can not send TR here
245 // , since the dialog cmd is waiting user to process.
Takanori Nakano1d3f3c12016-08-30 10:34:24 +0900246 if (!isChangingConfigurations()) {
247 if (!mIsResponseSent && appService != null && !appService.isDialogPending(mSlotId)) {
248 sendResponse(StkAppService.RES_ID_CONFIRM, false);
249 }
Wink Savillee68857d2014-10-17 15:23:05 -0700250 }
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900251 cancelTimeOut();
Wink Savillee68857d2014-10-17 15:23:05 -0700252 }
253
254 @Override
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800255 public void onSaveInstanceState(Bundle outState) {
256 super.onSaveInstanceState(outState);
257
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900258 CatLog.d(LOG_TAG, "onSaveInstanceState");
259
Takanori Nakano1d3f3c12016-08-30 10:34:24 +0900260 outState.putParcelable(TEXT_KEY, mTextMsg);
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900261 outState.putBoolean(RESPONSE_SENT_KEY, mIsResponseSent);
262 outState.putLong(ALARM_TIME_KEY, mAlarmTime);
Takanori Nakano1d3f3c12016-08-30 10:34:24 +0900263 outState.putInt(SLOT_ID_KEY, mSlotId);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800264 }
265
266 @Override
267 public void onRestoreInstanceState(Bundle savedInstanceState) {
268 super.onRestoreInstanceState(savedInstanceState);
Wink Saville79085fc2009-06-09 10:27:23 -0700269
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900270 CatLog.d(LOG_TAG, "onRestoreInstanceState");
271
Takanori Nakano1d3f3c12016-08-30 10:34:24 +0900272 mTextMsg = savedInstanceState.getParcelable(TEXT_KEY);
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900273 mIsResponseSent = savedInstanceState.getBoolean(RESPONSE_SENT_KEY);
274 mAlarmTime = savedInstanceState.getLong(ALARM_TIME_KEY, NO_DIALOG_ALARM);
Takanori Nakano1d3f3c12016-08-30 10:34:24 +0900275 mSlotId = savedInstanceState.getInt(SLOT_ID_KEY);
Yoshiaki Nakaa1cea462018-08-09 20:33:36 +0900276
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900277 if (mAlarmTime != NO_DIALOG_ALARM) {
278 startTimeOut();
279 }
280
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800281 }
282
Preeti Ahuja414bc412013-06-25 19:31:49 -0700283 @Override
284 protected void onNewIntent(Intent intent) {
w302348bf95af2015-01-09 10:54:41 -0800285 CatLog.d(LOG_TAG, "onNewIntent - updating the same Dialog box");
Preeti Ahuja414bc412013-06-25 19:31:49 -0700286 setIntent(intent);
287 }
288
Yoshiaki Naka90183132017-08-31 19:25:33 +0900289 @Override
290 public void finish() {
291 super.finish();
292 // Unregister the instance for DISPLAY TEXT command with an immediate response object
293 // as it is unnecessary to ask the service to finish this anymore.
294 if ((appService != null) && (mTextMsg != null) && !mTextMsg.responseNeeded) {
295 if (SubscriptionManager.isValidSlotIndex(mSlotId)) {
296 appService.getStkContext(mSlotId).setImmediateDialogInstance(null);
297 }
298 }
299 }
300
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800301 private void sendResponse(int resId, boolean confirmed) {
Yoshiaki Nakaa1cea462018-08-09 20:33:36 +0900302 cancelTimeOut();
303
Wink Savillee68857d2014-10-17 15:23:05 -0700304 if (mSlotId == -1) {
305 CatLog.d(LOG_TAG, "sim id is invalid");
306 return;
307 }
308
309 if (StkAppService.getInstance() == null) {
310 CatLog.d(LOG_TAG, "Ignore response: id is " + resId);
311 return;
312 }
313
314 CatLog.d(LOG_TAG, "sendResponse resID[" + resId + "] confirmed[" + confirmed + "]");
315
Preeti Ahuja414bc412013-06-25 19:31:49 -0700316 if (mTextMsg.responseNeeded) {
317 Bundle args = new Bundle();
318 args.putInt(StkAppService.OPCODE, StkAppService.OP_RESPONSE);
319 args.putInt(StkAppService.SLOT_ID, mSlotId);
320 args.putInt(StkAppService.RES_ID, resId);
321 args.putBoolean(StkAppService.CONFIRMATION, confirmed);
322 startService(new Intent(this, StkAppService.class).putExtras(args));
323 mIsResponseSent = true;
324 }
Yoshiaki Nakaa1cea462018-08-09 20:33:36 +0900325 if (!isFinishing()) {
326 finish();
327 }
328
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800329 }
330
331 private void sendResponse(int resId) {
332 sendResponse(resId, true);
333 }
334
335 private void initFromIntent(Intent intent) {
336
337 if (intent != null) {
338 mTextMsg = intent.getParcelableExtra("TEXT");
Wink Savillee68857d2014-10-17 15:23:05 -0700339 mSlotId = intent.getIntExtra(StkAppService.SLOT_ID, -1);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800340 } else {
341 finish();
342 }
Wink Savillee68857d2014-10-17 15:23:05 -0700343
Jayachandran C1379e792019-10-23 18:12:48 -0700344 CatLog.d(LOG_TAG, "initFromIntent - [" + (TelephonyUtils.IS_DEBUGGABLE ? mTextMsg : "********")
Yoshiaki Naka25273c92017-10-31 20:00:33 +0900345 + "], slot id: " + mSlotId);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800346 }
347
348 private void cancelTimeOut() {
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900349 if (mAlarmTime != NO_DIALOG_ALARM) {
350 CatLog.d(LOG_TAG, "cancelTimeOut - slot id: " + mSlotId);
351 AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
352 am.cancel(mAlarmListener);
353 mAlarmTime = NO_DIALOG_ALARM;
w302348bf95af2015-01-09 10:54:41 -0800354 }
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800355 }
356
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900357 private void startTimeOut() {
358 // No need to set alarm if device sent TERMINAL RESPONSE already
359 // and it is required to wait for user to clear the message.
360 if (mIsResponseSent || (mTextMsg.userClear && !mTextMsg.responseNeeded)) {
Wink Savillee68857d2014-10-17 15:23:05 -0700361 return;
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900362 }
363
364 if (mAlarmTime == NO_DIALOG_ALARM) {
365 int duration = StkApp.calculateDurationInMilis(mTextMsg.duration);
366 // If no duration is specified, the timeout set by the terminal manufacturer is applied.
367 if (duration == 0) {
368 if (mTextMsg.userClear) {
369 duration = StkApp.DISP_TEXT_WAIT_FOR_USER_TIMEOUT;
Wink Savillee68857d2014-10-17 15:23:05 -0700370 } else {
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900371 duration = StkApp.DISP_TEXT_CLEAR_AFTER_DELAY_TIMEOUT;
Wink Savillee68857d2014-10-17 15:23:05 -0700372 }
Christopher.Posselwhite1772c042012-11-22 12:15:54 +0100373 }
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900374 mAlarmTime = SystemClock.elapsedRealtime() + duration;
Wink Savillee68857d2014-10-17 15:23:05 -0700375 }
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900376
377 CatLog.d(LOG_TAG, "startTimeOut: " + mAlarmTime + "ms, slot id: " + mSlotId);
378 AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
379 am.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, mAlarmTime, DIALOG_ALARM_TAG,
380 mAlarmListener, null);
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800381 }
w302348bf95af2015-01-09 10:54:41 -0800382
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900383 private final AlarmManager.OnAlarmListener mAlarmListener =
384 new AlarmManager.OnAlarmListener() {
385 @Override
386 public void onAlarm() {
387 CatLog.d(LOG_TAG, "The alarm time is reached");
388 mAlarmTime = NO_DIALOG_ALARM;
389 sendResponse(StkAppService.RES_ID_TIMEOUT);
Yoshiaki Naka711656a2018-05-30 17:48:31 +0900390 }
391 };
The Android Open Source Project9d9730a2009-03-03 19:32:37 -0800392}