Without checking the intent action anyone could send spoofed intents with
empty or different action strings to trigger the BroadcastReceiver.
Change-Id: I4d78ed9d7466df47b17091e998cb67d46e98e612
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
@Override
public void onReceive(Context context, Intent intent) {
- LocalizedStore.getInstance(context).onLocaleChanged();
+ final String action = intent.getAction();
+ if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
+ LocalizedStore.getInstance(context).onLocaleChanged();
+ }
}
}