This commit is contained in:
Philipp Crocoll
2019-02-05 19:46:56 +01:00
2 changed files with 15 additions and 1 deletions

View File

@@ -4,3 +4,7 @@ files:
/src/keepass2android/Resources/values-%two_letters_code%/%original_file_name%
translate_attributes: '0'
content_segmentation: '0'
languages_mapping:
two_letters_code:
zh-CN: zh
zh-TW: zh-rTW

View File

@@ -6,6 +6,7 @@ import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONArray;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -65,7 +66,16 @@ public abstract class PluginActionBroadcastReceiver extends BroadcastReceiver {
protected String[] getProtectedFieldsListFromIntent()
{
return _intent.getStringArrayExtra(Strings.EXTRA_PROTECTED_FIELDS_LIST);
try {
JSONArray json = new JSONArray(_intent.getStringExtra(Strings.EXTRA_PROTECTED_FIELDS_LIST));
String[] res = new String[json.length()];
for(int i = 0; i < json.length(); i++)
res[i] = json.getString(i);
return res;
} catch (JSONException e) {
e.printStackTrace();
return null;
}
}