Эх сурвалжийг харах

EncryptionUtils: fix new lint warning

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 жил өмнө
parent
commit
863c9b72c9

+ 2 - 2
app/src/main/java/com/owncloud/android/utils/EncryptionUtils.java

@@ -30,6 +30,7 @@ import com.google.common.collect.Lists;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.nextcloud.client.account.User;
+import com.owncloud.android.R;
 import com.owncloud.android.datamodel.ArbitraryDataProvider;
 import com.owncloud.android.datamodel.ArbitraryDataProviderImpl;
 import com.owncloud.android.datamodel.DecryptedFolderMetadata;
@@ -664,8 +665,7 @@ public final class EncryptionUtils {
      */
 
     public static List<String> getRandomWords(int count, Context context) throws IOException {
-        InputStream ins = context.getResources().openRawResource(context.getResources()
-                .getIdentifier("encryption_key_words", "raw", context.getPackageName()));
+        InputStream ins = context.getResources().openRawResource(R.raw.encryption_key_words);
 
         InputStreamReader inputStreamReader = new InputStreamReader(ins);