Merge "Dialer: add video call capability check based on PresenceService" into atel.lnx.2.0-dev
diff --git a/Android.mk b/Android.mk
index 16c4adc..c8e950d 100755
--- a/Android.mk
+++ b/Android.mk
@@ -30,6 +30,8 @@
     $(phone_common_dir)/src-N
 
 LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
+LOCAL_SRC_FILES += src/org/codeaurora/presenceserv/IPresenceService.aidl \
+                   src/org/codeaurora/presenceserv/IPresenceServiceCB.aidl
 LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
     $(support_library_root_dir)/v7/cardview/res \
     $(support_library_root_dir)/v7/recyclerview/res \
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 10b689e..8b1fa55 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -142,4 +142,5 @@
     <color name="searchview_edittext">#59ffffff</color>
     <color name="no_call_log">#42000000</color>
     <color name="list_all_call">#d3000000</color>
+    <bool name="config_regional_presence_enable">false</bool>
 </resources>
diff --git a/res/xml/video_calling_settings.xml b/res/xml/video_calling_settings.xml
new file mode 100644
index 0000000..65e1da6
--- /dev/null
+++ b/res/xml/video_calling_settings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <SwitchPreference
+        android:key="video_calling_preference"
+        android:persistent="false"
+        android:title="@string/video_call" />
+
+</PreferenceScreen>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
old mode 100755
new mode 100644
index 8c4c4b4..5627b99
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -87,6 +87,7 @@
 import com.android.dialer.util.DialerUtils;
 import com.android.dialer.util.IntentUtil;
 import com.android.dialer.util.IntentUtil.CallIntentBuilder;
+import com.android.dialer.util.PresenceHelper;
 import com.android.dialer.util.TelecomUtil;
 import com.android.dialer.util.WifiCallUtils;
 import com.android.dialer.voicemail.VoicemailArchiveActivity;
@@ -516,6 +517,12 @@
         mDialerDatabaseHelper = DatabaseHelperManager.getDatabaseHelper(this);
         SmartDialPrefix.initializeNanpSettings(this);
 
+        boolean isPresenceEnabled = this.getResources().getBoolean(
+                R.bool.config_regional_presence_enable);
+        if (isPresenceEnabled && !PresenceHelper.isBound()) {
+            PresenceHelper.bindService((Context) DialtactsActivity.this);
+        }
+
         mWifiCallUtils = new WifiCallUtils();
         if (resources.getBoolean(R.bool.config_regional_pup_no_available_network)
                 && mFirstLaunch) {
@@ -629,6 +636,14 @@
     }
 
     @Override
+    protected void onStop() {
+        if (PresenceHelper.isBound()) {
+            PresenceHelper.unbindService((Context) DialtactsActivity.this);
+        }
+        super.onStop();
+    }
+
+    @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         outState.putString(KEY_SEARCH_QUERY, mSearchQuery);
diff --git a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
index 85039f7..8b9b8fc 100644
--- a/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
+++ b/src/com/android/dialer/calllog/CallDetailHistoryAdapter.java
@@ -32,10 +32,10 @@
 import com.android.dialer.R;
 import com.android.dialer.util.DialerUtils;
 import com.android.dialer.util.AppCompatConstants;
+import com.android.dialer.util.PresenceHelper;
 import com.google.common.collect.Lists;
 
 import java.util.ArrayList;
-
 /**
  * Adapter for a ListView containing history items from the details of a call.
  */
@@ -107,8 +107,13 @@
         TextView durationView = (TextView) result.findViewById(R.id.duration);
 
         int callType = details.callTypes[0];
-        boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
-                && CallUtil.isVideoEnabled(mContext);
+        boolean isPresenceEnabled = mContext.getResources().getBoolean(
+                R.bool.config_regional_presence_enable);
+        boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO)
+                == Calls.FEATURES_VIDEO && CallUtil.isVideoEnabled(mContext);
+        if (isPresenceEnabled) {
+            isVideoCall &= PresenceHelper.startAvailabilityFetch(details.number.toString());
+        }
         boolean isVoLTE = (callType == AppCompatConstants.INCOMING_IMS_TYPE) ||
                           (callType == AppCompatConstants.OUTGOING_IMS_TYPE) ||
                           (callType == AppCompatConstants.MISSED_IMS_TYPE);
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index baf2e1a..e27ea78 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -60,6 +60,7 @@
 import com.android.dialer.service.ExtendedBlockingButtonRenderer;
 import com.android.dialer.util.DialerUtils;
 import com.android.dialer.util.PhoneNumberUtil;
+import com.android.dialer.util.PresenceHelper;
 import com.android.dialer.voicemail.VoicemailPlaybackLayout;
 import com.android.dialer.voicemail.VoicemailPlaybackPresenter;
 import com.android.dialerbind.ObjectFactory;
@@ -67,6 +68,8 @@
 
 import java.util.List;
 
+import org.codeaurora.presenceserv.IPresenceService;
+
 /**
  * This is an object containing references to views contained by the call log list item. This
  * improves performance by reducing the frequency with which we need to find views by IDs.
@@ -504,10 +507,14 @@
         } else {
             callButtonView.setVisibility(View.GONE);
         }
-
-        // If one of the calls had video capabilities, show the video call button.
-        if (mCallLogCache.isVideoEnabled() && canPlaceCallToNumber &&
-                phoneCallDetailsViews.callTypeIcons.isVideoShown()) {
+        boolean isPresenceEnabled = mContext.getResources().getBoolean(
+                R.bool.config_regional_presence_enable);
+        boolean showVideoCallBtn = isPresenceEnabled ? PresenceHelper.startAvailabilityFetch(number)
+                : phoneCallDetailsViews.callTypeIcons.isVideoShown();
+        //If presence is enabled,only both of sides had video capabilities,
+        //show the video call button,If not, one of the calls had video capabilities,
+        //the video call button will be shown.
+        if (mCallLogCache.isVideoEnabled() && canPlaceCallToNumber && showVideoCallBtn) {
             videoCallButtonView.setTag(IntentProvider.getReturnVideoCallIntentProvider(number));
             videoCallButtonView.setVisibility(View.VISIBLE);
         } else {
@@ -729,4 +736,4 @@
         viewHolder.workIconView = new ImageButton(context);
         return viewHolder;
     }
-}
\ No newline at end of file
+}
diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java
index 322ecd4..03a8fbf 100644
--- a/src/com/android/dialer/settings/DialerSettingsActivity.java
+++ b/src/com/android/dialer/settings/DialerSettingsActivity.java
@@ -31,6 +31,7 @@
 import com.android.contacts.common.compat.CompatUtils;
 import com.android.contacts.common.compat.TelephonyManagerCompat;
 import com.android.dialer.SpeedDialListActivity;
+import com.android.contacts.common.CallUtil;
 import com.android.dialer.R;
 import com.android.dialer.compat.FilteredNumberCompat;
 import com.android.dialer.compat.SettingsCompat;
@@ -134,6 +135,16 @@
             accessibilitySettingsHeader.intent = accessibilitySettingsIntent;
             target.add(accessibilitySettingsHeader);
         }
+        //video calling
+        boolean enablePresence = this.getResources().getBoolean(
+                R.bool.config_regional_presence_enable);
+        if(enablePresence){
+            Header videocallingHeader = new Header();
+            videocallingHeader.titleRes = R.string.video_call;
+            videocallingHeader.fragment = VideoCallingSettingsFragment.class.getName();
+            target.add(videocallingHeader);
+        }
+
     }
 
     @Override
diff --git a/src/com/android/dialer/settings/VideoCallingSettingsFragment.java b/src/com/android/dialer/settings/VideoCallingSettingsFragment.java
new file mode 100644
index 0000000..fa73ab7
--- /dev/null
+++ b/src/com/android/dialer/settings/VideoCallingSettingsFragment.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **/
+
+package com.android.dialer.settings;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
+import android.preference.SwitchPreference;
+
+import java.lang.Object;
+import java.lang.Override;
+import java.lang.String;
+
+import com.android.contacts.common.CallUtil;
+import com.android.dialer.R;
+
+public class VideoCallingSettingsFragment extends PreferenceFragment implements
+        Preference.OnPreferenceChangeListener {
+
+    private final static String KEY_VIDEO_CALL = "video_calling_preference";
+    private SwitchPreference mVideoCallingPreference;
+    private Context mContext;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        addPreferencesFromResource(R.xml.video_calling_settings);
+
+        mContext = getActivity();
+        mVideoCallingPreference = (SwitchPreference)findPreference(KEY_VIDEO_CALL);
+        mVideoCallingPreference.setOnPreferenceChangeListener(this);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        int enable = Settings.System.getInt(mContext.getContentResolver(),
+                CallUtil.DIALOG_VIDEO_CALLING,CallUtil.DISABLE_VIDEO_CALLING);
+        if(mVideoCallingPreference != null)
+            mVideoCallingPreference.setChecked(enable == CallUtil.ENABLE_VIDEO_CALLING);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object objValue) {
+        if (preference == mVideoCallingPreference) {
+            boolean isCheck = mVideoCallingPreference.isChecked();
+            CallUtil.createVideoCallingDialog(isCheck , mContext);
+            Settings.System.putInt(mContext.getContentResolver(), CallUtil.CONFIG_VIDEO_CALLING,
+                    isCheck ? CallUtil.ENABLE_VIDEO_CALLING : CallUtil.DISABLE_VIDEO_CALLING);
+        }
+        return true;
+    }
+
+}
diff --git a/src/com/android/dialer/util/PresenceHelper.java b/src/com/android/dialer/util/PresenceHelper.java
new file mode 100644
index 0000000..cf94df0
--- /dev/null
+++ b/src/com/android/dialer/util/PresenceHelper.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **/
+package com.android.dialer.util;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.ServiceConnection;
+import android.content.Intent;
+import android.os.IBinder;
+import android.os.RemoteException;
+
+import com.android.incallui.Log;
+
+import org.codeaurora.presenceserv.IPresenceService;
+import org.codeaurora.presenceserv.IPresenceServiceCB;
+
+/**
+ * General presnece service utility methods for the Dialer.
+ */
+public class PresenceHelper {
+
+    private static final String TAG = "PresenceHelper";
+    private static volatile IPresenceService mService;
+    private static boolean mIsBound;
+
+    private static ServiceConnection mConnection = new ServiceConnection() {
+
+        public void onServiceConnected(ComponentName className, IBinder service) {
+            Log.d(TAG, "PresenceService connected");
+            mService = IPresenceService.Stub.asInterface(service);
+            try {
+                mService.registerCallback(mCallback);
+            } catch (RemoteException e) {
+                Log.e(TAG, "PresenceService registerCallback error " + e);
+            }
+        }
+        public void onServiceDisconnected(ComponentName className) {
+            Log.d(TAG, "PresenceService disconnected");
+            mService = null;
+        }
+    };
+
+    private static IPresenceServiceCB mCallback = new IPresenceServiceCB.Stub() {
+
+        public void setIMSEnabledCB() {
+            Log.d(TAG, "PresenceService setIMSEnabled callback");
+        }
+
+    };
+
+    public static void bindService(Context context) {
+        Log.d(TAG, "PresenceService BindService ");
+        Intent intent = new Intent(IPresenceService.class.getName());
+        intent.setClassName("com.qualcomm.qti.presenceserv",
+                "com.qualcomm.qti.presenceserv.PresenceService");
+        mIsBound = context.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+    }
+
+    public static void unbindService(Context context) {
+        Log.d(TAG, "PresenceService unbindService");
+        if (mService == null) {
+            Log.d(TAG, "PresenceService unbindService: mService is null");
+            return;
+        }
+        try {
+            mService.unregisterCallback(mCallback);
+        } catch (RemoteException e) {
+            Log.e(TAG, "PresenceService unregister error " + e);
+        }
+        if (mIsBound) {
+            Log.d(TAG, "PresenceService unbind");
+            context.unbindService(mConnection);
+            mIsBound = false;
+        }
+    }
+
+    public static boolean isBound() {
+        return mIsBound;
+    }
+
+    public static boolean startAvailabilityFetch(String number){
+        Log.d(TAG, "startAvailabilityFetch   number " + number);
+        if (mService == null) {
+             Log.d(TAG, "startAvailabilityFetch mService is null");
+             return false;
+        }
+        try {
+            return mService.invokeAvailabilityFetch(number);
+        } catch (Exception e) {
+            Log.d(TAG, "getVTCapOfContact ERROR " + e);
+        }
+        return false;
+    }
+
+    public static boolean getVTCapability(String number) {
+        Log.d(TAG, "getVTCapability   number " + number);
+        if (null == mService) {
+            Log.d(TAG, "getVTCapability mService is null");
+            return false;
+        }
+        try {
+            return mService.hasVTCapability(number);
+        } catch (Exception e) {
+            Log.d(TAG, "getVTCapability ERROR " + e);
+        }
+        return false;
+    }
+}
diff --git a/src/org/codeaurora/presenceserv/IPresenceService.aidl b/src/org/codeaurora/presenceserv/IPresenceService.aidl
new file mode 100644
index 0000000..edd0ac1
--- /dev/null
+++ b/src/org/codeaurora/presenceserv/IPresenceService.aidl
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **/
+
+package org.codeaurora.presenceserv;
+
+import org.codeaurora.presenceserv.IPresenceServiceCB;
+
+/**
+ * Presence service interface.
+ */
+interface IPresenceService {
+
+    String getImsEnablerState();
+    boolean hasVTCapability(String number);
+    void invokPublish();
+    boolean invokeAvailabilityFetch(String number);
+    void invokeCapabilityPolling(String number);
+    void invokeListAvailabilityFetch();
+    void invokeListCapabilityPolling();
+    void registerCallback(IPresenceServiceCB cb);
+    void unregisterCallback(IPresenceServiceCB cb);
+
+}
+
diff --git a/src/org/codeaurora/presenceserv/IPresenceServiceCB.aidl b/src/org/codeaurora/presenceserv/IPresenceServiceCB.aidl
new file mode 100644
index 0000000..05ad7d7
--- /dev/null
+++ b/src/org/codeaurora/presenceserv/IPresenceServiceCB.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ **/
+package org.codeaurora.presenceserv;
+
+/**
+ * Presence service callback interface.
+ */
+interface IPresenceServiceCB {
+
+    void setIMSEnabledCB();
+}
+