Commit 4516bfdb authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas

LocaleChangeReceiver: check intent action

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: default avatarAlexander Martinz <amartinz@shiftphones.com>
parent 1cd7ae2e
......@@ -30,6 +30,9 @@ public class LocaleChangeReceiver extends BroadcastReceiver {
@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();
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment