Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca630af1 authored by Andrew Lee's avatar Andrew Lee
Browse files

Disable VT features in Dialer,

+ Should be contingent on a setting in any case. In teh future this
will be derived from capability, but for the moment this feature
just won't be supported.
+ Pointed everything to a false flag in DialerUtils.

Bug: 16211386
Change-Id: I37e027c94e3411d8e73a349b3101fdb6ad598b3b
parent a752bbdb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -85,7 +85,8 @@ public class PhoneCallDetailsHelper {

        // Show the video icon if the call had video enabled.
        views.callTypeIcons.setShowVideo(
                (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO);
                (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
                        && DialerUtils.isVideoEnabled());
        views.callTypeIcons.requestLayout();
        views.callTypeIcons.setVisibility(View.VISIBLE);

+2 −1
Original line number Diff line number Diff line
@@ -122,7 +122,8 @@ public class CallDetailHistoryAdapter extends BaseAdapter {
        TextView durationView = (TextView) result.findViewById(R.id.duration);

        int callType = details.callTypes[0];
        boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO;
        boolean isVideoCall = (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
                && DialerUtils.isVideoEnabled();

        callTypeIconView.clear();
        callTypeIconView.add(callType);
+3 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.text.TextUtils;
import com.android.dialer.PhoneCallDetails;
import com.android.dialer.PhoneCallDetailsHelper;
import com.android.dialer.R;
import com.android.dialer.util.DialerUtils;

/**
 * Helper class to fill in the views of a call log entry.
@@ -153,7 +154,8 @@ import com.android.dialer.R;
        }

        // If call had video capabilities, add the "Video Call" string.
        if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) {
        if ((details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO &&
                DialerUtils.isVideoEnabled()) {
            callDescription.append(mResources.getString(R.string.description_video_call));
        }

+3 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.contacts.common.list.PhoneNumberListAdapter;
import com.android.dialer.calllog.ContactInfo;
import com.android.dialer.service.CachedNumberLookupService;
import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo;
import com.android.dialer.util.DialerUtils;

/**
 * List adapter to display regular search results.
@@ -73,9 +74,8 @@ public class RegularSearchListAdapter extends DialerPhoneNumberListAdapter {
        // a dialable number, then clicking add to contact should add it as a number.
        // Otherwise, it should add it to a new contact as a name.
        setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
        // TODO: Write utility method to check subscriptions and settings, and use it to determine
        // whether to enable or disable video call shortcut.
        setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts);
        setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
                showNumberShortcuts && DialerUtils.isVideoEnabled());
        super.setQueryString(queryString);
    }
}
+3 −3
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import com.android.dialer.dialpad.SmartDialCursorLoader;
import com.android.dialer.dialpad.SmartDialNameMatcher;
import com.android.dialer.dialpad.SmartDialPrefix;
import com.android.dialer.dialpad.SmartDialMatchPosition;
import com.android.dialer.util.DialerUtils;

import java.util.ArrayList;

@@ -118,9 +119,8 @@ public class SmartDialNumberListAdapter extends DialerPhoneNumberListAdapter {
    public void setQueryString(String queryString) {
        final boolean showNumberShortcuts = !TextUtils.isEmpty(getFormattedQueryString());
        setShortcutEnabled(SHORTCUT_ADD_NUMBER_TO_CONTACTS, showNumberShortcuts);
        // TODO: Write utility method to check subscriptions and settings, and use it to determine
        // whether to enable or disable video call shortcut.
        setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL, showNumberShortcuts);
        setShortcutEnabled(SHORTCUT_MAKE_VIDEO_CALL,
                showNumberShortcuts && DialerUtils.isVideoEnabled());
        super.setQueryString(queryString);
    }
}
Loading