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

Commit 77949bf4 authored by Wysie's avatar Wysie
Browse files

1.71. Minor update to allow users to choose if they want to be prompted before...

1.71. Minor update to allow users to choose if they want to be prompted before clearing frequently called.
parent c2ffa237
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -781,6 +781,9 @@
    <string name="title_favourites_category">Favourites</string>
    <string name="title_favourites_hide_freq_call">Hide frequently called</string>
    <string name="summary_favourites_hide_freq_call">The actual data is not cleared, but hidden.</string>
    <string name="title_favs_ask_before_clear">Ask before clearing</string>
    <string name="summaryon_favs_ask_before_clear">Ask before clearing frequently called</string>
    <string name="summaryoff_favs_ask_before_clear">Frequently called entries will be cleared without asking</string>    
    
    <string name="title_misc_category">Miscellaneous</string>
    <string name="title_sensor_rotation">Enable sensor rotation</string>    
@@ -789,4 +792,8 @@
    <string name="alert_clear_call_log_title">Clear call log</string>
    <string name="alert_clear_call_log_message">Are you sure you want to clear all call records?</string>
    
    <!-- Wysie_Soh: Frequently called strings -->
    <string name="alert_clear_freq_called">Clear frequently called</string>
    <string name="alert_clear_freq_called_msg">Are you sure you want to clear all frequently called entries?</string>
    
</resources>
+10 −1
Original line number Diff line number Diff line
@@ -70,6 +70,14 @@
            android:key="favourites_hide_freq_called"
            android:title="@string/title_favourites_hide_freq_call"
            android:summary="@string/summary_favourites_hide_freq_call"
            android:disableDependentsState="true"
            android:defaultValue="false" />
        <CheckBoxPreference
            android:key="favourites_ask_before_clear"
            android:title="@string/title_favs_ask_before_clear"
            android:summaryOn="@string/summaryon_favs_ask_before_clear"
            android:summaryOff="@string/summaryoff_favs_ask_before_clear"
	    android:dependency="favourites_hide_freq_called"
            android:defaultValue="false" />            
    </PreferenceCategory>    
    <PreferenceCategory android:title="@string/title_misc_category">
@@ -78,4 +86,5 @@
            android:title="@string/title_sensor_rotation"
            android:defaultValue="false" />
    </PreferenceCategory>
    
</PreferenceScreen>
+18 −1
Original line number Diff line number Diff line
@@ -969,7 +969,24 @@ public final class ContactsListActivity extends ListActivity
                handleExportContacts();
                
            case MENU_CLEAR_FREQ_CONTACTS:
            	if (ePrefs.getBoolean("favourites_ask_before_clear", false)) {
            		AlertDialog.Builder alert = new AlertDialog.Builder(this);
            		alert.setTitle(R.string.alert_clear_freq_called);
            		alert.setMessage(R.string.alert_clear_freq_called_msg);
            		alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
    				public void onClick(DialogInterface dialog, int whichButton) {
    					clearFrequentlyCalled();
    				}
    			});
	    		alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
		    		public void onClick(DialogInterface dialog, int whichButton) {
    				// Canceled.
    			}});
	    		alert.show();
            	}
            	else {
            		clearFrequentlyCalled();
            	}            	
            	return true;
            	
        }
+1 −1
Original line number Diff line number Diff line
@@ -1041,7 +1041,7 @@ public class RecentCallsListActivity extends ListActivity
    	
    	if (prefs.getBoolean("cl_ask_before_clear", false)) {
    		AlertDialog.Builder alert = new AlertDialog.Builder(this);
    		alert.setTitle("Clear call log");
    		alert.setTitle(R.string.alert_clear_call_log_title);
    		alert.setMessage("Are you sure you want to clear all call records of " + label + "?"); //Text, eg. show "Private" instead of -1 :P
    		alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
    			public void onClick(DialogInterface dialog, int whichButton) {