blob: e9008f8ceb0651a216628882452b4ba7b4765ba2 [file] [log] [blame]
Sailesh Nepal810735e2014-03-18 18:15:46 -07001/*
2 * Copyright (C) 2014 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.telecomm;
18
19import android.content.Context;
20import android.media.AudioManager;
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070021import android.telecomm.CallAudioState;
Sailesh Nepal810735e2014-03-18 18:15:46 -070022import android.telecomm.CallState;
23
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070024import com.google.common.base.Preconditions;
Santos Cordon1ae2b852014-03-19 03:03:10 -070025
Sailesh Nepal810735e2014-03-18 18:15:46 -070026/**
27 * This class manages audio modes, streams and other properties.
28 */
Sailesh Nepalb88795a2014-07-15 14:53:27 -070029final class CallAudioManager extends CallsManagerListenerBase
30 implements WiredHeadsetManager.Listener {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070031 private static final int STREAM_NONE = -1;
Santos Cordon1ae2b852014-03-19 03:03:10 -070032
Santos Cordondeb8c892014-05-30 01:38:03 -070033 private final StatusBarNotifier mStatusBarNotifier;
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070034 private final AudioManager mAudioManager;
Santos Cordonc7e85d42014-05-22 02:51:48 -070035 private final BluetoothManager mBluetoothManager;
Sailesh Nepalb88795a2014-07-15 14:53:27 -070036 private final WiredHeadsetManager mWiredHeadsetManager;
Santos Cordondeb8c892014-05-30 01:38:03 -070037
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070038 private CallAudioState mAudioState;
39 private int mAudioFocusStreamType;
40 private boolean mIsRinging;
Santos Cordona56f2762014-03-24 15:55:53 -070041 private boolean mIsTonePlaying;
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070042 private boolean mWasSpeakerOn;
Santos Cordon1ae2b852014-03-19 03:03:10 -070043
Sailesh Nepalb88795a2014-07-15 14:53:27 -070044 CallAudioManager(Context context, StatusBarNotifier statusBarNotifier,
45 WiredHeadsetManager wiredHeadsetManager) {
Santos Cordondeb8c892014-05-30 01:38:03 -070046 mStatusBarNotifier = statusBarNotifier;
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070047 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
Santos Cordonc7e85d42014-05-22 02:51:48 -070048 mBluetoothManager = new BluetoothManager(context, this);
Sailesh Nepalb88795a2014-07-15 14:53:27 -070049 mWiredHeadsetManager = wiredHeadsetManager;
50
Santos Cordondeb8c892014-05-30 01:38:03 -070051 saveAudioState(getInitialAudioState(null));
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070052 mAudioFocusStreamType = STREAM_NONE;
53 }
Santos Cordon1ae2b852014-03-19 03:03:10 -070054
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070055 CallAudioState getAudioState() {
56 return mAudioState;
57 }
Santos Cordon1ae2b852014-03-19 03:03:10 -070058
59 @Override
60 public void onCallAdded(Call call) {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070061 updateAudioStreamAndMode();
62 if (CallsManager.getInstance().getCalls().size() == 1) {
63 Log.v(this, "first call added, reseting system audio to default state");
Santos Cordonc7e85d42014-05-22 02:51:48 -070064 setInitialAudioState(call);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070065 } else if (!call.isIncoming()) {
66 // Unmute new outgoing call.
67 setSystemAudioState(false, mAudioState.route, mAudioState.supportedRouteMask);
Santos Cordon1ae2b852014-03-19 03:03:10 -070068 }
Santos Cordon1ae2b852014-03-19 03:03:10 -070069 }
70
71 @Override
72 public void onCallRemoved(Call call) {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070073 if (CallsManager.getInstance().getCalls().isEmpty()) {
74 Log.v(this, "all calls removed, reseting system audio to default state");
Santos Cordonc7e85d42014-05-22 02:51:48 -070075 setInitialAudioState(null);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070076 }
77 updateAudioStreamAndMode();
Santos Cordon1ae2b852014-03-19 03:03:10 -070078 }
79
Sailesh Nepal810735e2014-03-18 18:15:46 -070080 @Override
81 public void onCallStateChanged(Call call, CallState oldState, CallState newState) {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -070082 updateAudioStreamAndMode();
Santos Cordon1ae2b852014-03-19 03:03:10 -070083 }
84
85 @Override
86 public void onIncomingCallAnswered(Call call) {
Santos Cordonc7e85d42014-05-22 02:51:48 -070087 int route = mAudioState.route;
88
89 // We do two things:
90 // (1) If this is the first call, then we can to turn on bluetooth if available.
91 // (2) Unmute the audio for the new incoming call.
92 boolean isOnlyCall = CallsManager.getInstance().getCalls().size() == 1;
93 if (isOnlyCall && mBluetoothManager.isBluetoothAvailable()) {
94 mBluetoothManager.connectBluetoothAudio();
95 route = CallAudioState.ROUTE_BLUETOOTH;
96 }
97
98 setSystemAudioState(false /* isMute */, route, mAudioState.supportedRouteMask);
Santos Cordon1ae2b852014-03-19 03:03:10 -070099 }
100
101 @Override
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700102 public void onForegroundCallChanged(Call oldForegroundCall, Call newForegroundCall) {
103 updateAudioStreamAndMode();
104 // Ensure that the foreground call knows about the latest audio state.
105 updateAudioForForegroundCall();
Santos Cordon1ae2b852014-03-19 03:03:10 -0700106 }
107
Sailesh Nepal7e669572014-07-08 21:29:12 -0700108 @Override
109 public void onAudioModeIsVoipChanged(Call call) {
110 updateAudioStreamAndMode();
111 }
112
Sailesh Nepalb88795a2014-07-15 14:53:27 -0700113 /**
114 * Updates the audio route when the headset plugged in state changes. For example, if audio is
115 * being routed over speakerphone and a headset is plugged in then switch to wired headset.
116 */
117 @Override
118 public void onWiredHeadsetPluggedInChanged(boolean oldIsPluggedIn, boolean newIsPluggedIn) {
119 int newRoute = CallAudioState.ROUTE_EARPIECE;
120 if (newIsPluggedIn) {
121 newRoute = CallAudioState.ROUTE_WIRED_HEADSET;
122 } else if (mWasSpeakerOn) {
123 Call call = getForegroundCall();
124 if (call != null && call.isAlive()) {
125 // Restore the speaker state.
126 newRoute = CallAudioState.ROUTE_SPEAKER;
127 }
128 }
129 setSystemAudioState(mAudioState.isMuted, newRoute, calculateSupportedRoutes());
130 }
131
Santos Cordondeb8c892014-05-30 01:38:03 -0700132 void toggleMute() {
133 mute(!mAudioState.isMuted);
134 }
135
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700136 void mute(boolean shouldMute) {
137 Log.v(this, "mute, shouldMute: %b", shouldMute);
Santos Cordon1ae2b852014-03-19 03:03:10 -0700138
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700139 // Don't mute if there are any emergency calls.
140 if (CallsManager.getInstance().hasEmergencyCall()) {
141 shouldMute = false;
142 Log.v(this, "ignoring mute for emergency call");
Santos Cordon1ae2b852014-03-19 03:03:10 -0700143 }
144
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700145 if (mAudioState.isMuted != shouldMute) {
146 setSystemAudioState(shouldMute, mAudioState.route, mAudioState.supportedRouteMask);
Sailesh Nepal810735e2014-03-18 18:15:46 -0700147 }
148 }
149
Santos Cordon1ae2b852014-03-19 03:03:10 -0700150 /**
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700151 * Changed the audio route, for example from earpiece to speaker phone.
Santos Cordon1ae2b852014-03-19 03:03:10 -0700152 *
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700153 * @param route The new audio route to use. See {@link CallAudioState}.
Santos Cordon1ae2b852014-03-19 03:03:10 -0700154 */
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700155 void setAudioRoute(int route) {
156 Log.v(this, "setAudioRoute, route: %s", CallAudioState.audioRouteToString(route));
Santos Cordon1ae2b852014-03-19 03:03:10 -0700157
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700158 // Change ROUTE_WIRED_OR_EARPIECE to a single entry.
159 int newRoute = selectWiredOrEarpiece(route, mAudioState.supportedRouteMask);
160
161 // If route is unsupported, do nothing.
162 if ((mAudioState.supportedRouteMask | newRoute) == 0) {
163 Log.wtf(this, "Asking to set to a route that is unsupported: %d", newRoute);
164 return;
165 }
166
167 if (mAudioState.route != newRoute) {
168 // Remember the new speaker state so it can be restored when the user plugs and unplugs
169 // a headset.
170 mWasSpeakerOn = newRoute == CallAudioState.ROUTE_SPEAKER;
171 setSystemAudioState(mAudioState.isMuted, newRoute, mAudioState.supportedRouteMask);
172 }
173 }
174
175 void setIsRinging(boolean isRinging) {
176 if (mIsRinging != isRinging) {
177 Log.v(this, "setIsRinging %b -> %b", mIsRinging, isRinging);
178 mIsRinging = isRinging;
179 updateAudioStreamAndMode();
Santos Cordon1ae2b852014-03-19 03:03:10 -0700180 }
Sailesh Nepal810735e2014-03-18 18:15:46 -0700181 }
182
Santos Cordon1ae2b852014-03-19 03:03:10 -0700183 /**
Santos Cordona56f2762014-03-24 15:55:53 -0700184 * Sets the tone playing status. Some tones can play even when there are no live calls and this
185 * status indicates that we should keep audio focus even for tones that play beyond the life of
186 * calls.
187 *
188 * @param isPlayingNew The status to set.
189 */
190 void setIsTonePlaying(boolean isPlayingNew) {
191 ThreadUtil.checkOnMainThread();
192
193 if (mIsTonePlaying != isPlayingNew) {
194 Log.v(this, "mIsTonePlaying %b -> %b.", mIsTonePlaying, isPlayingNew);
195 mIsTonePlaying = isPlayingNew;
196 updateAudioStreamAndMode();
197 }
198 }
199
200 /**
Santos Cordonc7e85d42014-05-22 02:51:48 -0700201 * Updates the audio routing according to the bluetooth state.
202 */
203 void onBluetoothStateChange(BluetoothManager bluetoothManager) {
204 int newRoute = mAudioState.route;
205 if (bluetoothManager.isBluetoothAudioConnectedOrPending()) {
206 newRoute = CallAudioState.ROUTE_BLUETOOTH;
207 } else if (mAudioState.route == CallAudioState.ROUTE_BLUETOOTH) {
208 newRoute = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
209 // Do not switch to speaker when bluetooth disconnects.
210 mWasSpeakerOn = false;
211 }
212
213 setSystemAudioState(mAudioState.isMuted, newRoute, calculateSupportedRoutes());
214 }
215
216 boolean isBluetoothAudioOn() {
217 return mBluetoothManager.isBluetoothAudioConnected();
218 }
219
220 boolean isBluetoothDeviceAvailable() {
221 return mBluetoothManager.isBluetoothAvailable();
222 }
223
Santos Cordondeb8c892014-05-30 01:38:03 -0700224 private void saveAudioState(CallAudioState audioState) {
225 mAudioState = audioState;
226 mStatusBarNotifier.notifyMute(mAudioState.isMuted);
227 mStatusBarNotifier.notifySpeakerphone(mAudioState.route == CallAudioState.ROUTE_SPEAKER);
228 }
229
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700230 private void setSystemAudioState(boolean isMuted, int route, int supportedRouteMask) {
231 CallAudioState oldAudioState = mAudioState;
Santos Cordondeb8c892014-05-30 01:38:03 -0700232 saveAudioState(new CallAudioState(isMuted, route, supportedRouteMask));
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700233 Log.i(this, "changing audio state from %s to %s", oldAudioState, mAudioState);
Santos Cordon1ae2b852014-03-19 03:03:10 -0700234
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700235 // Mute.
236 if (mAudioState.isMuted != mAudioManager.isMicrophoneMute()) {
237 Log.i(this, "changing microphone mute state to: %b", mAudioState.isMuted);
238 mAudioManager.setMicrophoneMute(mAudioState.isMuted);
Santos Cordon1ae2b852014-03-19 03:03:10 -0700239 }
240
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700241 // Audio route.
Santos Cordonc7e85d42014-05-22 02:51:48 -0700242 if (mAudioState.route == CallAudioState.ROUTE_BLUETOOTH) {
243 turnOnSpeaker(false);
244 turnOnBluetooth(true);
245 } else if (mAudioState.route == CallAudioState.ROUTE_SPEAKER) {
246 turnOnBluetooth(false);
247 turnOnSpeaker(true);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700248 } else if (mAudioState.route == CallAudioState.ROUTE_EARPIECE ||
249 mAudioState.route == CallAudioState.ROUTE_WIRED_HEADSET) {
Santos Cordonc7e85d42014-05-22 02:51:48 -0700250 turnOnBluetooth(false);
251 turnOnSpeaker(false);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700252 }
253
254 if (!oldAudioState.equals(mAudioState)) {
255 CallsManager.getInstance().onAudioStateChanged(oldAudioState, mAudioState);
256 updateAudioForForegroundCall();
257 }
258 }
259
Santos Cordonc7e85d42014-05-22 02:51:48 -0700260 private void turnOnSpeaker(boolean on) {
261 // Wired headset and earpiece work the same way
262 if (mAudioManager.isSpeakerphoneOn() != on) {
263 Log.i(this, "turning speaker phone off");
264 mAudioManager.setSpeakerphoneOn(on);
265 }
266 }
267
268 private void turnOnBluetooth(boolean on) {
269 if (mBluetoothManager.isBluetoothAvailable()) {
270 boolean isAlreadyOn = mBluetoothManager.isBluetoothAudioConnected();
271 if (on != isAlreadyOn) {
272 if (on) {
273 mBluetoothManager.connectBluetoothAudio();
274 } else {
275 mBluetoothManager.disconnectBluetoothAudio();
276 }
277 }
278 }
279 }
280
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700281 private void updateAudioStreamAndMode() {
Santos Cordona56f2762014-03-24 15:55:53 -0700282 Log.v(this, "updateAudioStreamAndMode, mIsRinging: %b, mIsTonePlaying: %b", mIsRinging,
283 mIsTonePlaying);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700284 if (mIsRinging) {
285 requestAudioFocusAndSetMode(AudioManager.STREAM_RING, AudioManager.MODE_RINGTONE);
286 } else {
Santos Cordon5ba7f272014-05-28 13:59:49 -0700287 Call call = getForegroundCall();
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700288 if (call != null) {
Sailesh Nepal7e669572014-07-08 21:29:12 -0700289 int mode = call.getAudioModeIsVoip() ?
290 AudioManager.MODE_IN_COMMUNICATION : AudioManager.MODE_IN_CALL;
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700291 requestAudioFocusAndSetMode(AudioManager.STREAM_VOICE_CALL, mode);
Santos Cordona56f2762014-03-24 15:55:53 -0700292 } else if (mIsTonePlaying) {
293 // There is no call, however, we are still playing a tone, so keep focus.
294 requestAudioFocusAndSetMode(
295 AudioManager.STREAM_VOICE_CALL, AudioManager.MODE_IN_COMMUNICATION);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700296 } else {
297 abandonAudioFocus();
298 }
299 }
300 }
301
302 private void requestAudioFocusAndSetMode(int stream, int mode) {
303 Log.v(this, "setSystemAudioStreamAndMode, stream: %d -> %d", mAudioFocusStreamType, stream);
304 Preconditions.checkState(stream != STREAM_NONE);
305
Santos Cordon5ba7f272014-05-28 13:59:49 -0700306 // Even if we already have focus, if the stream is different we update audio manager to give
307 // it a hint about the purpose of our focus.
308 if (mAudioFocusStreamType != stream) {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700309 Log.v(this, "requesting audio focus for stream: %d", stream);
310 mAudioManager.requestAudioFocusForCall(stream,
311 AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
312 }
313 mAudioFocusStreamType = stream;
314 setMode(mode);
315 }
316
317 private void abandonAudioFocus() {
318 if (mAudioFocusStreamType != STREAM_NONE) {
319 setMode(AudioManager.MODE_NORMAL);
320 Log.v(this, "abandoning audio focus");
321 mAudioManager.abandonAudioFocusForCall();
322 mAudioFocusStreamType = STREAM_NONE;
323 }
Santos Cordon1ae2b852014-03-19 03:03:10 -0700324 }
325
326 /**
327 * Sets the audio mode.
328 *
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700329 * @param newMode Mode constant from AudioManager.MODE_*.
Santos Cordon1ae2b852014-03-19 03:03:10 -0700330 */
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700331 private void setMode(int newMode) {
332 Preconditions.checkState(mAudioFocusStreamType != STREAM_NONE);
333 int oldMode = mAudioManager.getMode();
334 Log.v(this, "Request to change audio mode from %d to %d", oldMode, newMode);
335 if (oldMode != newMode) {
336 mAudioManager.setMode(newMode);
337 }
338 }
339
340 private int selectWiredOrEarpiece(int route, int supportedRouteMask) {
341 // Since they are mutually exclusive and one is ALWAYS valid, we allow a special input of
342 // ROUTE_WIRED_OR_EARPIECE so that callers dont have to make a call to check which is
343 // supported before calling setAudioRoute.
344 if (route == CallAudioState.ROUTE_WIRED_OR_EARPIECE) {
345 route = CallAudioState.ROUTE_WIRED_OR_EARPIECE & supportedRouteMask;
346 if (route == 0) {
347 Log.wtf(this, "One of wired headset or earpiece should always be valid.");
348 // assume earpiece in this case.
349 route = CallAudioState.ROUTE_EARPIECE;
Santos Cordon1ae2b852014-03-19 03:03:10 -0700350 }
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700351 }
352 return route;
353 }
354
355 private int calculateSupportedRoutes() {
356 int routeMask = CallAudioState.ROUTE_SPEAKER;
357
358 if (mWiredHeadsetManager.isPluggedIn()) {
359 routeMask |= CallAudioState.ROUTE_WIRED_HEADSET;
Santos Cordon1ae2b852014-03-19 03:03:10 -0700360 } else {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700361 routeMask |= CallAudioState.ROUTE_EARPIECE;
Santos Cordon1ae2b852014-03-19 03:03:10 -0700362 }
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700363
Santos Cordonc7e85d42014-05-22 02:51:48 -0700364 if (mBluetoothManager.isBluetoothAvailable()) {
365 routeMask |= CallAudioState.ROUTE_BLUETOOTH;
366 }
367
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700368 return routeMask;
Santos Cordon1ae2b852014-03-19 03:03:10 -0700369 }
370
Santos Cordonc7e85d42014-05-22 02:51:48 -0700371 private CallAudioState getInitialAudioState(Call call) {
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700372 int supportedRouteMask = calculateSupportedRoutes();
Santos Cordonc7e85d42014-05-22 02:51:48 -0700373 int route = selectWiredOrEarpiece(
374 CallAudioState.ROUTE_WIRED_OR_EARPIECE, supportedRouteMask);
375
376 // We want the UI to indicate that "bluetooth is in use" in two slightly different cases:
377 // (a) The obvious case: if a bluetooth headset is currently in use for an ongoing call.
378 // (b) The not-so-obvious case: if an incoming call is ringing, and we expect that audio
379 // *will* be routed to a bluetooth headset once the call is answered. In this case, just
380 // check if the headset is available. Note this only applies when we are dealing with
381 // the first call.
382 if (call != null && mBluetoothManager.isBluetoothAvailable()) {
383 switch(call.getState()) {
384 case ACTIVE:
385 case ON_HOLD:
386 if (mBluetoothManager.isBluetoothAudioConnectedOrPending()) {
387 route = CallAudioState.ROUTE_BLUETOOTH;
388 }
389 break;
390 case RINGING:
391 route = CallAudioState.ROUTE_BLUETOOTH;
392 break;
393 default:
394 break;
395 }
396 }
397
398 return new CallAudioState(false, route, supportedRouteMask);
Santos Cordon1ae2b852014-03-19 03:03:10 -0700399 }
400
Santos Cordonc7e85d42014-05-22 02:51:48 -0700401 private void setInitialAudioState(Call call) {
402 CallAudioState audioState = getInitialAudioState(call);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700403 setSystemAudioState(audioState.isMuted, audioState.route, audioState.supportedRouteMask);
404 }
405
406 private void updateAudioForForegroundCall() {
407 Call call = CallsManager.getInstance().getForegroundCall();
Sailesh Nepalc92c4362014-07-04 18:33:21 -0700408 if (call != null && call.getConnectionService() != null) {
409 call.getConnectionService().onAudioStateChanged(call, mAudioState);
Sailesh Nepal6aca10a2014-03-24 16:11:02 -0700410 }
Sailesh Nepal810735e2014-03-18 18:15:46 -0700411 }
Santos Cordon5ba7f272014-05-28 13:59:49 -0700412
413 /**
414 * Returns the current foreground call in order to properly set the audio mode.
415 */
416 private Call getForegroundCall() {
417 Call call = CallsManager.getInstance().getForegroundCall();
418
419 // We ignore any foreground call that is in the ringing state because we deal with ringing
420 // calls exclusively through the mIsRinging variable set by {@link Ringer}.
421 if (call != null && call.getState() == CallState.RINGING) {
422 call = null;
423 }
424 return call;
425 }
Sailesh Nepal810735e2014-03-18 18:15:46 -0700426}