API support for reporting of changes to call features.
(eg VoLTE, VoWIFI, etc)

Bug: 15987281
Change-Id: I5a18046ca0e2ff78ee96af610b5a3b88d93a52ad
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 4265c65..ddd4b1d 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -74,6 +74,7 @@
         void onChildrenChanged(Call call);
         void onCannedSmsResponsesLoaded(Call call);
         void onCallVideoProviderChanged(Call call);
+        void onFeaturesChanged(Call call);
     }
 
     private static final OnQueryCompleteListener sCallerInfoQueryListener =
@@ -208,6 +209,9 @@
 
     private ICallVideoProvider mCallVideoProvider;
 
+    /** Features associated with the call which the InCall UI may wish to show icons for. */
+    private int mFeatures;
+
     /**
      * Creates an empty call object.
      *
@@ -1068,4 +1072,26 @@
     public ICallVideoProvider getCallVideoProvider() {
         return mCallVideoProvider;
     }
+
+    /**
+     * Returns the features of this call.
+     *
+     * @return The features of this call.
+     */
+    public int getFeatures() {
+        return mFeatures;
+    }
+
+    /**
+     * Set the features associated with the call and notify any listeners of the change.
+     *
+     * @param features The features.
+     */
+    public void setFeatures(int features) {
+        Log.d(this, "setFeatures: %d", features);
+        mFeatures = features;
+        for (Listener l : mListeners) {
+            l.onFeaturesChanged(Call.this);
+        }
+    }
 }