|
@ -403,7 +403,6 @@ public class HomeActivityV2 extends BaseActivity implements HomeParentViewContra |
|
|
@Override |
|
|
@Override |
|
|
public void performLogout() { |
|
|
public void performLogout() { |
|
|
presenter.clearAllData(); |
|
|
presenter.clearAllData(); |
|
|
|
|
|
|
|
|
logout(); |
|
|
logout(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
@ -446,54 +445,6 @@ public class HomeActivityV2 extends BaseActivity implements HomeParentViewContra |
|
|
controlNo.setText(Html.fromHtml(gmeWalletNo+" <b><font color='#ed1c24'> " + walletNumber + "</font></b>" +bankName)); |
|
|
controlNo.setText(Html.fromHtml(gmeWalletNo+" <b><font color='#ed1c24'> " + walletNumber + "</font></b>" +bankName)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void changeLocaleTest() |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Locale locale = new Locale("th"); |
|
|
|
|
|
Locale.setDefault(locale); |
|
|
|
|
|
// Create a new configuration object |
|
|
|
|
|
Configuration config = new Configuration(); |
|
|
|
|
|
// Set the locale of the new configuration |
|
|
|
|
|
config.locale = locale; |
|
|
|
|
|
// Update the configuration of the Accplication context |
|
|
|
|
|
Resources res= getResources(); |
|
|
|
|
|
|
|
|
|
|
|
res.updateConfiguration( |
|
|
|
|
|
config, |
|
|
|
|
|
getResources().getDisplayMetrics() |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// GmeApplication.getStringExtractor().updateResources(res); |
|
|
|
|
|
try { |
|
|
|
|
|
Intent i = getBaseContext().getPackageManager() |
|
|
|
|
|
.getLaunchIntentForPackage(getBaseContext().getPackageName()); |
|
|
|
|
|
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
|
|
|
|
|
startActivity(i); |
|
|
|
|
|
// logout(this,500); |
|
|
|
|
|
} |
|
|
|
|
|
catch(NullPointerException ne) |
|
|
|
|
|
{ |
|
|
|
|
|
showToastMessage("Please logout app manually."); |
|
|
|
|
|
} |
|
|
|
|
|
// performLogout(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void restart(Context context, int delay) { |
|
|
|
|
|
if (delay == 0) { |
|
|
|
|
|
delay = 1; |
|
|
|
|
|
} |
|
|
|
|
|
Log.e("", "restarting app"); |
|
|
|
|
|
Intent restartIntent = context.getPackageManager() |
|
|
|
|
|
.getLaunchIntentForPackage(context.getPackageName() ); |
|
|
|
|
|
PendingIntent intent = PendingIntent.getActivity( |
|
|
|
|
|
context, 0, |
|
|
|
|
|
restartIntent, PendingIntent.FLAG_CANCEL_CURRENT); |
|
|
|
|
|
AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); |
|
|
|
|
|
manager.set(AlarmManager.RTC, System.currentTimeMillis() + delay, intent); |
|
|
|
|
|
System.exit(2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
|
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
|
|