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

Commit d8771887 authored by Zhu Youhua's avatar Zhu Youhua
Browse files

Contacts: fix the config mechanism for presence

Use the frameowrk config to control the presence.

Change-Id: I6b835857a8ffda754c99579aabdca82b17673dd1
CRs-Fixed: 1039337
parent 41155c12
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -462,8 +462,6 @@ public class ContactDisplayUtils {
                return vt;
            } catch (Exception e) {
                Log.d(TAG, "getVTCapOfContact ERROR " + e);
            } finally {
                return false;
            }
        }
        return false;
@@ -480,8 +478,6 @@ public class ContactDisplayUtils {
                return vt;
            } catch (Exception e) {
                Log.d(TAG, "getVTCapability ERROR " + e);
            } finally {
                return false;
            }
        }
        return false;
+3 −2
Original line number Diff line number Diff line
@@ -357,8 +357,9 @@ public class ExpandingEntryCardView extends CardView {
        mTitleTextView = (TextView) expandingEntryCardView.findViewById(R.id.title);
        mContainer = (LinearLayout) expandingEntryCardView.findViewById(R.id.container);

        mEnablePresence = System.getProperty("persist.presence.enable", "false").equals("true");

        mEnablePresence = mContext.getResources().getBoolean(Resources.getSystem().
            getIdentifier("config_presence_enabled", "bool", "android"));
        Log.d(TAG, "ExpandingEntryCardView mEnablePresence = " + mEnablePresence);
        if (mEnablePresence) {
            mVideoCalling = (Switch) expandingEntryCardView
                    .findViewById(R.id.switch_video_call);
+3 −1
Original line number Diff line number Diff line
@@ -1026,7 +1026,9 @@ public class QuickContactActivity extends ContactsActivity
        mContactCard.setExpandButtonText(
        getResources().getString(R.string.expanding_entry_card_view_see_all));
        mContactCard.setOnCreateContextMenuListener(mEntryContextMenuListener);
        mEnablePresence = System.getProperty("persist.presence.enable", "false").equals("true");
        mEnablePresence = mContext.getResources().getBoolean(Resources.getSystem().
                getIdentifier("config_presence_enabled", "bool", "android"));
        Log.e(TAG, "onCreate mEnablePresence = " + mEnablePresence);
        if (mEnablePresence) {
            mContactCard.disPlayVideoCallSwitch(mEnablePresence);
            if (!ContactDisplayUtils.mIsBound) {