1 /* 2 * Copyright (C) 2013 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 package com.android.email; 17 18 import android.content.Intent; 19 20 import com.android.mail.MailIntentService; 21 import com.android.mail.providers.UIProvider; 22 import com.android.mail.utils.LogTag; 23 import com.android.mail.utils.LogUtils; 24 25 /** 26 * A service to handle various intents asynchronously. 27 */ 28 public class EmailIntentService extends MailIntentService { 29 private static final String LOG_TAG = LogTag.getLogTag(); 30 31 public EmailIntentService() { 32 super("EmailIntentService"); 33 } 34 35 @Override 36 protected void onHandleIntent(final Intent intent) { 37 super.onHandleIntent(intent); 38 39 if (UIProvider.ACTION_UPDATE_NOTIFICATION.equals(intent.getAction())) { 40 final NotificationController nc = 41 NotificationControllerCreatorHolder.getInstance(this); 42 if (nc != null) { 43 nc.handleUpdateNotificationIntent(this, intent); 44 } 45 } 46 47 LogUtils.v(LOG_TAG, "Handling intent %s", intent); 48 } 49 } 50