@Override public boolean doPreviousAction() { Intent intent = new Intent(ACTION_EMERGENCY_DIAL); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); ActivityOptions options = ActivityOptions.makeCustomAnimation( mContext, android.R.anim.fade_in, android.R.anim.fade_out); SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK, SetupStats.Label.EMERGENCY_CALL); SetupStats.addEvent( SetupStats.Categories.EXTERNAL_PAGE_LOAD, SetupStats.Action.EXTERNAL_PAGE_LAUNCH, SetupStats.Label.PAGE, SetupStats.Label.EMERGENCY_CALL); mContext.startActivity(intent, options.toBundle()); return true; }
private void onLocaleChanged(Locale paramLocale) { Resources localResources = getActivity().getResources(); Configuration localConfiguration1 = localResources.getConfiguration(); Configuration localConfiguration2 = new Configuration(); localConfiguration2.locale = paramLocale; localResources.updateConfiguration(localConfiguration2, null); localResources.updateConfiguration(localConfiguration1, null); mHandler.removeCallbacks(mUpdateLocale); mCurrentLocale = paramLocale; SetupStats.addEvent( SetupStats.Categories.SETTING_CHANGED, SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE, mCurrentLocale.getDisplayName()); mHandler.postDelayed(mUpdateLocale, 1000); }