@ -47,43 +47,47 @@ import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns ;
import net.micode.notes.data.Notes.NoteColumns ;
import net.micode.notes.gtask.remote.GTaskSyncService ;
import net.micode.notes.gtask.remote.GTaskSyncService ;
/ * *
* 笔 记 应 用 的 设 置 Activity , 继 承 自 PreferenceActivity
* 主 要 处 理 与 Google Task 同 步 相 关 的 账 户 设 置 和 同 步 操 作
* /
public class NotesPreferenceActivity extends PreferenceActivity {
public class NotesPreferenceActivity extends PreferenceActivity {
// 偏好设置文件名
public static final String PREFERENCE_NAME = "notes_preferences" ;
public static final String PREFERENCE_NAME = "notes_preferences" ;
// 同步账户名的偏好设置键
public static final String PREFERENCE_SYNC_ACCOUNT_NAME = "pref_key_account_name" ;
public static final String PREFERENCE_SYNC_ACCOUNT_NAME = "pref_key_account_name" ;
// 上次同步时间的偏好设置键
public static final String PREFERENCE_LAST_SYNC_TIME = "pref_last_sync_time" ;
public static final String PREFERENCE_LAST_SYNC_TIME = "pref_last_sync_time" ;
// 背景颜色随机设置的偏好设置键
public static final String PREFERENCE_SET_BG_COLOR_KEY = "pref_key_bg_random_appear" ;
public static final String PREFERENCE_SET_BG_COLOR_KEY = "pref_key_bg_random_appear" ;
// 同步账户分类的键
private static final String PREFERENCE_SYNC_ACCOUNT_KEY = "pref_sync_account_key" ;
private static final String PREFERENCE_SYNC_ACCOUNT_KEY = "pref_sync_account_key" ;
// 账户权限过滤键
private static final String AUTHORITIES_FILTER_KEY = "authorities" ;
private static final String AUTHORITIES_FILTER_KEY = "authorities" ;
private PreferenceCategory mAccountCategory ;
private PreferenceCategory mAccountCategory ; // 账户分类偏好
private GTaskReceiver mReceiver ; // 同步服务广播接收器
private GTaskReceiver mReceiver ;
private Account [ ] mOriAccounts ; // 原始账户列表
private boolean mHasAddedAccount ; // 是否添加了新账户的标志
private Account [ ] mOriAccounts ;
private boolean mHasAddedAccount ;
@Override
@Override
protected void onCreate ( Bundle icicle ) {
protected void onCreate ( Bundle icicle ) {
super . onCreate ( icicle ) ;
super . onCreate ( icicle ) ;
/* using the app icon for navigation */
// 在ActionBar上显示返回按钮
getActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ;
getActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ;
// 从XML资源添加偏好设置
addPreferencesFromResource ( R . xml . preferences ) ;
addPreferencesFromResource ( R . xml . preferences ) ;
mAccountCategory = ( PreferenceCategory ) findPreference ( PREFERENCE_SYNC_ACCOUNT_KEY ) ;
mAccountCategory = ( PreferenceCategory ) findPreference ( PREFERENCE_SYNC_ACCOUNT_KEY ) ;
mReceiver = new GTaskReceiver ( ) ;
mReceiver = new GTaskReceiver ( ) ;
// 注册广播接收器,监听同步服务状态变化
IntentFilter filter = new IntentFilter ( ) ;
IntentFilter filter = new IntentFilter ( ) ;
filter . addAction ( GTaskSyncService . GTASK_SERVICE_BROADCAST_NAME ) ;
filter . addAction ( GTaskSyncService . GTASK_SERVICE_BROADCAST_NAME ) ;
registerReceiver ( mReceiver , filter ) ;
registerReceiver ( mReceiver , filter ) ;
mOriAccounts = null ;
mOriAccounts = null ;
// 添加设置界面的头部视图
View header = LayoutInflater . from ( this ) . inflate ( R . layout . settings_header , null ) ;
View header = LayoutInflater . from ( this ) . inflate ( R . layout . settings_header , null ) ;
getListView ( ) . addHeaderView ( header , null , true ) ;
getListView ( ) . addHeaderView ( header , null , true ) ;
}
}
@ -92,11 +96,11 @@ public class NotesPreferenceActivity extends PreferenceActivity {
protected void onResume ( ) {
protected void onResume ( ) {
super . onResume ( ) ;
super . onResume ( ) ;
// need to set sync account automatically if user has added a new
// 如果用户添加了新账户,需要自动设置同步账户
// account
if ( mHasAddedAccount ) {
if ( mHasAddedAccount ) {
Account [ ] accounts = getGoogleAccounts ( ) ;
Account [ ] accounts = getGoogleAccounts ( ) ;
if ( mOriAccounts ! = null & & accounts . length > mOriAccounts . length ) {
if ( mOriAccounts ! = null & & accounts . length > mOriAccounts . length ) {
// 找出新添加的账户
for ( Account accountNew : accounts ) {
for ( Account accountNew : accounts ) {
boolean found = false ;
boolean found = false ;
for ( Account accountOld : mOriAccounts ) {
for ( Account accountOld : mOriAccounts ) {
@ -113,19 +117,23 @@ public class NotesPreferenceActivity extends PreferenceActivity {
}
}
}
}
refreshUI ( ) ;
refreshUI ( ) ; // 刷新UI
}
}
@Override
@Override
protected void onDestroy ( ) {
protected void onDestroy ( ) {
// 注销广播接收器
if ( mReceiver ! = null ) {
if ( mReceiver ! = null ) {
unregisterReceiver ( mReceiver ) ;
unregisterReceiver ( mReceiver ) ;
}
}
super . onDestroy ( ) ;
super . onDestroy ( ) ;
}
}
/ * *
* 加 载 账 户 偏 好 设 置
* /
private void loadAccountPreference ( ) {
private void loadAccountPreference ( ) {
mAccountCategory . removeAll ( ) ;
mAccountCategory . removeAll ( ) ; // 清除所有现有偏好
Preference accountPref = new Preference ( this ) ;
Preference accountPref = new Preference ( this ) ;
final String defaultAccount = getSyncAccountName ( this ) ;
final String defaultAccount = getSyncAccountName ( this ) ;
@ -135,48 +143,52 @@ public class NotesPreferenceActivity extends PreferenceActivity {
public boolean onPreferenceClick ( Preference preference ) {
public boolean onPreferenceClick ( Preference preference ) {
if ( ! GTaskSyncService . isSyncing ( ) ) {
if ( ! GTaskSyncService . isSyncing ( ) ) {
if ( TextUtils . isEmpty ( defaultAccount ) ) {
if ( TextUtils . isEmpty ( defaultAccount ) ) {
// the first time to set account
// 第一次设置账户,显示选择账户对话框
showSelectAccountAlertDialog ( ) ;
showSelectAccountAlertDialog ( ) ;
} else {
} else {
// if the account has already been set, we need to promp
// 账户已设置,显示更改账户确认对话框
// user about the risk
showChangeAccountConfirmAlertDialog ( ) ;
showChangeAccountConfirmAlertDialog ( ) ;
}
}
} else {
} else {
// 同步进行中,不能更改账户
Toast . makeText ( NotesPreferenceActivity . this ,
Toast . makeText ( NotesPreferenceActivity . this ,
R . string . preferences_toast_cannot_change_account , Toast . LENGTH_SHORT )
R . string . preferences_toast_cannot_change_account , Toast . LENGTH_SHORT )
. show ( ) ;
. show ( ) ;
}
}
return true ;
return true ;
}
}
} ) ;
} ) ;
mAccountCategory . addPreference ( accountPref ) ;
mAccountCategory . addPreference ( accountPref ) ; // 添加账户偏好
}
}
/ * *
* 加 载 同 步 按 钮 状 态
* /
private void loadSyncButton ( ) {
private void loadSyncButton ( ) {
Button syncButton = ( Button ) findViewById ( R . id . preference_sync_button ) ;
Button syncButton = ( Button ) findViewById ( R . id . preference_sync_button ) ;
TextView lastSyncTimeView = ( TextView ) findViewById ( R . id . prefenerece_sync_status_textview ) ;
TextView lastSyncTimeView = ( TextView ) findViewById ( R . id . prefenerece_sync_status_textview ) ;
// set button state
// 设置按钮状态
if ( GTaskSyncService . isSyncing ( ) ) {
if ( GTaskSyncService . isSyncing ( ) ) {
syncButton . setText ( getString ( R . string . preferences_button_sync_cancel ) ) ;
syncButton . setText ( getString ( R . string . preferences_button_sync_cancel ) ) ;
syncButton . setOnClickListener ( new View . OnClickListener ( ) {
syncButton . setOnClickListener ( new View . OnClickListener ( ) {
public void onClick ( View v ) {
public void onClick ( View v ) {
GTaskSyncService . cancelSync ( NotesPreferenceActivity . this ) ;
GTaskSyncService . cancelSync ( NotesPreferenceActivity . this ) ; // 取消同步
}
}
} ) ;
} ) ;
} else {
} else {
syncButton . setText ( getString ( R . string . preferences_button_sync_immediately ) ) ;
syncButton . setText ( getString ( R . string . preferences_button_sync_immediately ) ) ;
syncButton . setOnClickListener ( new View . OnClickListener ( ) {
syncButton . setOnClickListener ( new View . OnClickListener ( ) {
public void onClick ( View v ) {
public void onClick ( View v ) {
GTaskSyncService . startSync ( NotesPreferenceActivity . this ) ;
GTaskSyncService . startSync ( NotesPreferenceActivity . this ) ; // 开始同步
}
}
} ) ;
} ) ;
}
}
// 只有设置了同步账户才能启用同步按钮
syncButton . setEnabled ( ! TextUtils . isEmpty ( getSyncAccountName ( this ) ) ) ;
syncButton . setEnabled ( ! TextUtils . isEmpty ( getSyncAccountName ( this ) ) ) ;
// set last sync time
// 设置上次同步时间显示
if ( GTaskSyncService . isSyncing ( ) ) {
if ( GTaskSyncService . isSyncing ( ) ) {
lastSyncTimeView . setText ( GTaskSyncService . getProgressString ( ) ) ;
lastSyncTimeView . setText ( GTaskSyncService . getProgressString ( ) ) ;
lastSyncTimeView . setVisibility ( View . VISIBLE ) ;
lastSyncTimeView . setVisibility ( View . VISIBLE ) ;
@ -193,14 +205,21 @@ public class NotesPreferenceActivity extends PreferenceActivity {
}
}
}
}
/ * *
* 刷 新 UI
* /
private void refreshUI ( ) {
private void refreshUI ( ) {
loadAccountPreference ( ) ;
loadAccountPreference ( ) ;
loadSyncButton ( ) ;
loadSyncButton ( ) ;
}
}
/ * *
* 显 示 选 择 账 户 对 话 框
* /
private void showSelectAccountAlertDialog ( ) {
private void showSelectAccountAlertDialog ( ) {
AlertDialog . Builder dialogBuilder = new AlertDialog . Builder ( this ) ;
AlertDialog . Builder dialogBuilder = new AlertDialog . Builder ( this ) ;
// 设置自定义标题视图
View titleView = LayoutInflater . from ( this ) . inflate ( R . layout . account_dialog_title , null ) ;
View titleView = LayoutInflater . from ( this ) . inflate ( R . layout . account_dialog_title , null ) ;
TextView titleTextView = ( TextView ) titleView . findViewById ( R . id . account_dialog_title ) ;
TextView titleTextView = ( TextView ) titleView . findViewById ( R . id . account_dialog_title ) ;
titleTextView . setText ( getString ( R . string . preferences_dialog_select_account_title ) ) ;
titleTextView . setText ( getString ( R . string . preferences_dialog_select_account_title ) ) ;
@ -210,13 +229,14 @@ public class NotesPreferenceActivity extends PreferenceActivity {
dialogBuilder . setCustomTitle ( titleView ) ;
dialogBuilder . setCustomTitle ( titleView ) ;
dialogBuilder . setPositiveButton ( null , null ) ;
dialogBuilder . setPositiveButton ( null , null ) ;
Account [ ] accounts = getGoogleAccounts ( ) ;
Account [ ] accounts = getGoogleAccounts ( ) ; // 获取所有Google账户
String defAccount = getSyncAccountName ( this ) ;
String defAccount = getSyncAccountName ( this ) ;
mOriAccounts = accounts ;
mOriAccounts = accounts ; // 保存原始账户列表
mHasAddedAccount = false ;
mHasAddedAccount = false ; // 重置添加账户标志
if ( accounts . length > 0 ) {
if ( accounts . length > 0 ) {
// 创建账户选择列表
CharSequence [ ] items = new CharSequence [ accounts . length ] ;
CharSequence [ ] items = new CharSequence [ accounts . length ] ;
final CharSequence [ ] itemMapping = items ;
final CharSequence [ ] itemMapping = items ;
int checkedItem = - 1 ;
int checkedItem = - 1 ;
@ -230,6 +250,7 @@ public class NotesPreferenceActivity extends PreferenceActivity {
dialogBuilder . setSingleChoiceItems ( items , checkedItem ,
dialogBuilder . setSingleChoiceItems ( items , checkedItem ,
new DialogInterface . OnClickListener ( ) {
new DialogInterface . OnClickListener ( ) {
public void onClick ( DialogInterface dialog , int which ) {
public void onClick ( DialogInterface dialog , int which ) {
// 设置选择的账户
setSyncAccount ( itemMapping [ which ] . toString ( ) ) ;
setSyncAccount ( itemMapping [ which ] . toString ( ) ) ;
dialog . dismiss ( ) ;
dialog . dismiss ( ) ;
refreshUI ( ) ;
refreshUI ( ) ;
@ -237,6 +258,7 @@ public class NotesPreferenceActivity extends PreferenceActivity {
} ) ;
} ) ;
}
}
// 添加"添加账户"视图
View addAccountView = LayoutInflater . from ( this ) . inflate ( R . layout . add_account_text , null ) ;
View addAccountView = LayoutInflater . from ( this ) . inflate ( R . layout . add_account_text , null ) ;
dialogBuilder . setView ( addAccountView ) ;
dialogBuilder . setView ( addAccountView ) ;
@ -244,9 +266,10 @@ public class NotesPreferenceActivity extends PreferenceActivity {
addAccountView . setOnClickListener ( new View . OnClickListener ( ) {
addAccountView . setOnClickListener ( new View . OnClickListener ( ) {
public void onClick ( View v ) {
public void onClick ( View v ) {
mHasAddedAccount = true ;
mHasAddedAccount = true ;
// 启动添加账户设置界面
Intent intent = new Intent ( "android.settings.ADD_ACCOUNT_SETTINGS" ) ;
Intent intent = new Intent ( "android.settings.ADD_ACCOUNT_SETTINGS" ) ;
intent . putExtra ( AUTHORITIES_FILTER_KEY , new String [ ] {
intent . putExtra ( AUTHORITIES_FILTER_KEY , new String [ ] {
"gmail-ls"
"gmail-ls" // 只显示Gmail账户
} ) ;
} ) ;
startActivityForResult ( intent , - 1 ) ;
startActivityForResult ( intent , - 1 ) ;
dialog . dismiss ( ) ;
dialog . dismiss ( ) ;
@ -254,9 +277,13 @@ public class NotesPreferenceActivity extends PreferenceActivity {
} ) ;
} ) ;
}
}
/ * *
* 显 示 更 改 账 户 确 认 对 话 框
* /
private void showChangeAccountConfirmAlertDialog ( ) {
private void showChangeAccountConfirmAlertDialog ( ) {
AlertDialog . Builder dialogBuilder = new AlertDialog . Builder ( this ) ;
AlertDialog . Builder dialogBuilder = new AlertDialog . Builder ( this ) ;
// 设置自定义标题视图
View titleView = LayoutInflater . from ( this ) . inflate ( R . layout . account_dialog_title , null ) ;
View titleView = LayoutInflater . from ( this ) . inflate ( R . layout . account_dialog_title , null ) ;
TextView titleTextView = ( TextView ) titleView . findViewById ( R . id . account_dialog_title ) ;
TextView titleTextView = ( TextView ) titleView . findViewById ( R . id . account_dialog_title ) ;
titleTextView . setText ( getString ( R . string . preferences_dialog_change_account_title ,
titleTextView . setText ( getString ( R . string . preferences_dialog_change_account_title ,
@ -265,6 +292,7 @@ public class NotesPreferenceActivity extends PreferenceActivity {
subtitleTextView . setText ( getString ( R . string . preferences_dialog_change_account_warn_msg ) ) ;
subtitleTextView . setText ( getString ( R . string . preferences_dialog_change_account_warn_msg ) ) ;
dialogBuilder . setCustomTitle ( titleView ) ;
dialogBuilder . setCustomTitle ( titleView ) ;
// 设置菜单项
CharSequence [ ] menuItemArray = new CharSequence [ ] {
CharSequence [ ] menuItemArray = new CharSequence [ ] {
getString ( R . string . preferences_menu_change_account ) ,
getString ( R . string . preferences_menu_change_account ) ,
getString ( R . string . preferences_menu_remove_account ) ,
getString ( R . string . preferences_menu_remove_account ) ,
@ -273,8 +301,10 @@ public class NotesPreferenceActivity extends PreferenceActivity {
dialogBuilder . setItems ( menuItemArray , new DialogInterface . OnClickListener ( ) {
dialogBuilder . setItems ( menuItemArray , new DialogInterface . OnClickListener ( ) {
public void onClick ( DialogInterface dialog , int which ) {
public void onClick ( DialogInterface dialog , int which ) {
if ( which = = 0 ) {
if ( which = = 0 ) {
// 更改账户
showSelectAccountAlertDialog ( ) ;
showSelectAccountAlertDialog ( ) ;
} else if ( which = = 1 ) {
} else if ( which = = 1 ) {
// 移除账户
removeSyncAccount ( ) ;
removeSyncAccount ( ) ;
refreshUI ( ) ;
refreshUI ( ) ;
}
}
@ -283,11 +313,17 @@ public class NotesPreferenceActivity extends PreferenceActivity {
dialogBuilder . show ( ) ;
dialogBuilder . show ( ) ;
}
}
/ * *
* 获 取 所 有 Google 账 户
* /
private Account [ ] getGoogleAccounts ( ) {
private Account [ ] getGoogleAccounts ( ) {
AccountManager accountManager = AccountManager . get ( this ) ;
AccountManager accountManager = AccountManager . get ( this ) ;
return accountManager . getAccountsByType ( "com.google" ) ;
return accountManager . getAccountsByType ( "com.google" ) ; // 只获取Google账户
}
}
/ * *
* 设 置 同 步 账 户
* /
private void setSyncAccount ( String account ) {
private void setSyncAccount ( String account ) {
if ( ! getSyncAccountName ( this ) . equals ( account ) ) {
if ( ! getSyncAccountName ( this ) . equals ( account ) ) {
SharedPreferences settings = getSharedPreferences ( PREFERENCE_NAME , Context . MODE_PRIVATE ) ;
SharedPreferences settings = getSharedPreferences ( PREFERENCE_NAME , Context . MODE_PRIVATE ) ;
@ -299,10 +335,10 @@ public class NotesPreferenceActivity extends PreferenceActivity {
}
}
editor . commit ( ) ;
editor . commit ( ) ;
// clean up last sync time
// 清除上次同步时间
setLastSyncTime ( this , 0 ) ;
setLastSyncTime ( this , 0 ) ;
// clean up local gtask related info
// 清除本地GTask相关信息
new Thread ( new Runnable ( ) {
new Thread ( new Runnable ( ) {
public void run ( ) {
public void run ( ) {
ContentValues values = new ContentValues ( ) ;
ContentValues values = new ContentValues ( ) ;
@ -318,6 +354,9 @@ public class NotesPreferenceActivity extends PreferenceActivity {
}
}
}
}
/ * *
* 移 除 同 步 账 户
* /
private void removeSyncAccount ( ) {
private void removeSyncAccount ( ) {
SharedPreferences settings = getSharedPreferences ( PREFERENCE_NAME , Context . MODE_PRIVATE ) ;
SharedPreferences settings = getSharedPreferences ( PREFERENCE_NAME , Context . MODE_PRIVATE ) ;
SharedPreferences . Editor editor = settings . edit ( ) ;
SharedPreferences . Editor editor = settings . edit ( ) ;
@ -329,7 +368,7 @@ public class NotesPreferenceActivity extends PreferenceActivity {
}
}
editor . commit ( ) ;
editor . commit ( ) ;
// clean up local gtask related info
// 清除本地GTask相关信息
new Thread ( new Runnable ( ) {
new Thread ( new Runnable ( ) {
public void run ( ) {
public void run ( ) {
ContentValues values = new ContentValues ( ) ;
ContentValues values = new ContentValues ( ) ;
@ -340,12 +379,18 @@ public class NotesPreferenceActivity extends PreferenceActivity {
} ) . start ( ) ;
} ) . start ( ) ;
}
}
/ * *
* 获 取 当 前 同 步 账 户 名
* /
public static String getSyncAccountName ( Context context ) {
public static String getSyncAccountName ( Context context ) {
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
Context . MODE_PRIVATE ) ;
Context . MODE_PRIVATE ) ;
return settings . getString ( PREFERENCE_SYNC_ACCOUNT_NAME , "" ) ;
return settings . getString ( PREFERENCE_SYNC_ACCOUNT_NAME , "" ) ;
}
}
/ * *
* 设 置 上 次 同 步 时 间
* /
public static void setLastSyncTime ( Context context , long time ) {
public static void setLastSyncTime ( Context context , long time ) {
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
Context . MODE_PRIVATE ) ;
Context . MODE_PRIVATE ) ;
@ -354,29 +399,36 @@ public class NotesPreferenceActivity extends PreferenceActivity {
editor . commit ( ) ;
editor . commit ( ) ;
}
}
/ * *
* 获 取 上 次 同 步 时 间
* /
public static long getLastSyncTime ( Context context ) {
public static long getLastSyncTime ( Context context ) {
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
SharedPreferences settings = context . getSharedPreferences ( PREFERENCE_NAME ,
Context . MODE_PRIVATE ) ;
Context . MODE_PRIVATE ) ;
return settings . getLong ( PREFERENCE_LAST_SYNC_TIME , 0 ) ;
return settings . getLong ( PREFERENCE_LAST_SYNC_TIME , 0 ) ;
}
}
/ * *
* GTask 同 步 服 务 广 播 接 收 器
* /
private class GTaskReceiver extends BroadcastReceiver {
private class GTaskReceiver extends BroadcastReceiver {
@Override
@Override
public void onReceive ( Context context , Intent intent ) {
public void onReceive ( Context context , Intent intent ) {
refreshUI ( ) ;
refreshUI ( ) ; // 刷新UI
if ( intent . getBooleanExtra ( GTaskSyncService . GTASK_SERVICE_BROADCAST_IS_SYNCING , false ) ) {
if ( intent . getBooleanExtra ( GTaskSyncService . GTASK_SERVICE_BROADCAST_IS_SYNCING , false ) ) {
// 更新同步进度显示
TextView syncStatus = ( TextView ) findViewById ( R . id . prefenerece_sync_status_textview ) ;
TextView syncStatus = ( TextView ) findViewById ( R . id . prefenerece_sync_status_textview ) ;
syncStatus . setText ( intent
syncStatus . setText ( intent
. getStringExtra ( GTaskSyncService . GTASK_SERVICE_BROADCAST_PROGRESS_MSG ) ) ;
. getStringExtra ( GTaskSyncService . GTASK_SERVICE_BROADCAST_PROGRESS_MSG ) ) ;
}
}
}
}
}
}
@Override
public boolean onOptionsItemSelected ( MenuItem item ) {
public boolean onOptionsItemSelected ( MenuItem item ) {
switch ( item . getItemId ( ) ) {
switch ( item . getItemId ( ) ) {
case android . R . id . home :
case android . R . id . home :
// 点击返回按钮, 返回到笔记列表Activity
Intent intent = new Intent ( this , NotesListActivity . class ) ;
Intent intent = new Intent ( this , NotesListActivity . class ) ;
intent . addFlags ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) ;
intent . addFlags ( Intent . FLAG_ACTIVITY_CLEAR_TOP ) ;
startActivity ( intent ) ;
startActivity ( intent ) ;
@ -385,4 +437,4 @@ public class NotesPreferenceActivity extends PreferenceActivity {
return false ;
return false ;
}
}
}
}
}
}