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

Commit 6fd3d1a8 authored by Wysie's avatar Wysie
Browse files

1.63. Added prefs to allow disabling of contact pictures. Requires a restart...

1.63. Added prefs to allow disabling of contact pictures. Requires a restart of app for now. Will fix it in future (low-priority).
parent 2c318be3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -768,6 +768,8 @@
    <string name="summaryoff_cl_ask_before_clear">Call logs will be cleared without asking</string>
    
    <string name="title_contacts_category">Contacts</string>
    <string name="title_contacts_show_pic">Show contact pictures</string>
    <string name="summary_contacts_show_pic">Please restart Contacts/Dialer to see the changes</string>
    <string name="title_contacts_show_dial_button">Show dial button</string>
    <string name="summary_contacts_show_dial_button">Show a dial button for contacts with numbers</string>
    
+5 −0
Original line number Diff line number Diff line
@@ -52,6 +52,11 @@
            android:title="@string/title_contacts_show_dial_button"
            android:summary="@string/summary_contacts_show_dial_button"
            android:defaultValue="true" />
        <CheckBoxPreference
            android:key="contacts_show_pic"
            android:title="@string/title_contacts_show_pic"
            android:summary="@string/summary_contacts_show_pic"
            android:defaultValue="true" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/title_misc_category">
        <CheckBoxPreference
+12 −8
Original line number Diff line number Diff line
@@ -181,6 +181,8 @@ public final class ContactsListActivity extends ListActivity
    static final int MODE_QUERY_PICK_TO_VIEW = 65 | MODE_MASK_NO_FILTER | MODE_MASK_PICKER;
    //Geesun
    static final int DEFAULT_MODE = MODE_ALL_CONTACTS|MODE_MASK_SHOW_PHOTOS;    
    //Wysie_Soh
    static final int DEFAULT_NO_PICTURES_MODE = MODE_ALL_CONTACTS;

    /**
     * The type of data to display in the main contacts list.
@@ -206,7 +208,6 @@ public final class ContactsListActivity extends ListActivity
     */
    static final String PREF_DISPLAY_INFO = "display_group";


    static final String NAME_COLUMN = People.DISPLAY_NAME;
    static final String SORT_STRING = People.SORT_STRING;

@@ -346,7 +347,7 @@ public final class ContactsListActivity extends ListActivity
    private String mQueryData;    

    private Handler mHandler = new Handler();
    private SharedPreferences prefs;
    private SharedPreferences ePrefs;

    private class ImportTypeSelectedListener implements DialogInterface.OnClickListener {
        public static final int IMPORT_FROM_SIM = 0;
@@ -389,7 +390,7 @@ public final class ContactsListActivity extends ListActivity
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        
        prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
        ePrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());   

        // Resolve the intent
        final Intent intent = getIntent();
@@ -519,7 +520,10 @@ public final class ContactsListActivity extends ListActivity
        }

        if (mMode == MODE_UNKNOWN) {
            if (ePrefs.getBoolean("contacts_show_pic", true))
            	mMode = DEFAULT_MODE;
            else
                mMode = DEFAULT_NO_PICTURES_MODE;
        }

        // Setup the UI
@@ -1955,7 +1959,7 @@ public final class ContactsListActivity extends ListActivity
                numberView.setText(cache.numberBuffer.data, 0, size);                              
                numberView.setVisibility(View.VISIBLE);
                labelView.setVisibility(View.VISIBLE);                
                if (prefs.getBoolean("contacts_show_dial_button", true)) {
                if (ePrefs.getBoolean("contacts_show_dial_button", true)) {
                	callView.setTag(new String(cache.numberBuffer.data, 0, size)); //Wysie_Soh: Set tag to green dial button
                	callView.setVisibility(View.VISIBLE);
                	divView.setVisibility(View.VISIBLE);