Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
- Added setting for 'always back to all-threads'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Doan committed Aug 14, 2009
1 parent f6f0a5b commit 8bf617e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions res/values/strings.xml
Expand Up @@ -666,5 +666,8 @@
<string name="pref_title_custom_screen_timeout_dim">Auto dim screen</string>
<string name="pref_summaryon_custom_screen_timeout_dim">Screen stays awake but may be dimmed to save battery power</string>
<string name="pref_summaryoff_custom_screen_timeout_dim">Screen is on at full brightness</string>

<string name="pref_title_back_to_all_threads">Back to all threads</string>
<string name="pref_summary_back_to_all_threads">Always go to all-threads when Back button pressed</string>
</resources>

4 changes: 4 additions & 0 deletions res/xml/preferences.xml
Expand Up @@ -158,5 +158,9 @@
android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>
<CheckBoxPreference android:key="pref_key_mms_back_to_all_threads"
android:title="@string/pref_title_back_to_all_threads"
android:summary="@string/pref_summary_back_to_all_threads"
android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>
11 changes: 9 additions & 2 deletions src/com/android/mms/ui/ComposeMessageActivity.java
Expand Up @@ -168,8 +168,8 @@ public class ComposeMessageActivity extends Activity
public static final int REQUEST_CODE_CREATE_SLIDESHOW = 16;

private static final String TAG = "ComposeMessageActivity";
private static final boolean DEBUG = false;
private static final boolean TRACE = false;
private static final boolean DEBUG = true;
private static final boolean TRACE = true;
private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;

// Menu ID
Expand Down Expand Up @@ -256,6 +256,7 @@ public class ComposeMessageActivity extends Activity
private int mSignatureAutoAppend; // Setting for Signature auto-append
private int mScreenTimeout; // Number of seconds that screen stays awake for
private WakeLock mScreenTimeoutWakeLock;// Custom screen timeout
private boolean mBackToAllThreads; // Always ack to all-threads


private View mTopPanel; // View containing the recipient and subject editors
Expand Down Expand Up @@ -1609,6 +1610,7 @@ protected void onCreate(Bundle savedInstanceState) {
mScreenTimeoutWakeLock = pm.newWakeLock(dimscreen ? PowerManager.SCREEN_DIM_WAKE_LOCK : PowerManager.SCREEN_BRIGHT_WAKE_LOCK, TAG);
mScreenTimeoutWakeLock.setReferenceCounted(false);
}
mBackToAllThreads = prefs.getBoolean(MessagingPreferenceActivity.BACK_TO_ALL_THREADS, false);

setProgressBarVisibility(false);

Expand Down Expand Up @@ -1925,6 +1927,11 @@ public void run() {
finish();
}
});
// always return all threads
if(mBackToAllThreads) {
goToConversationList();
}

return true;
}

Expand Down
1 change: 1 addition & 0 deletions src/com/android/mms/ui/MessagingPreferenceActivity.java
Expand Up @@ -74,6 +74,7 @@ public class MessagingPreferenceActivity extends PreferenceActivity {
public static final String USER_AGENT_CUSTOM = "pref_key_mms_user_agent_custom";
public static final String CUSTOM_SCREEN_TIMEOUT = "pref_key_mms_custom_screen_timeout";
public static final String CUSTOM_SCREEN_TIMEOUT_DIM = "pref_key_mms_custom_screen_timeout_dim";
public static final String BACK_TO_ALL_THREADS = "pref_key_mms_back_to_all_threads";

// Menu entries
private static final int MENU_RESTORE_DEFAULTS = 1;
Expand Down

0 comments on commit 8bf617e

Please sign in to comment.