mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Fixed grammars and some other importants file not being overwritten
This commit is contained in:
parent
6c752ae38b
commit
4fc8137289
1 changed files with 16 additions and 8 deletions
|
|
@ -181,24 +181,32 @@ public class AndroidPlatformHelper {
|
|||
if (resId == 0) {
|
||||
Log.d("App doesn't seem to embed resource " + name + "in it's res/raw/ directory, use linphone's instead");
|
||||
resId = mResources.getIdentifier(name, "raw", "org.linphone");
|
||||
if (resId == 0) {
|
||||
Log.e("App doesn't seem to embed resource " + name + "in it's res/raw/ directory, please add it");
|
||||
}
|
||||
}
|
||||
return resId;
|
||||
}
|
||||
|
||||
private void copyAssetsFromPackage() throws IOException {
|
||||
copyIfNotExist(getResourceIdentifierFromName("notes_of_the_optimistic"), mRingSoundFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("ringback"), mRingbackSoundFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("hold"), mPauseSoundFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("incoming_chat"), mErrorToneFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("cpim_grammar"), mGrammarCpimFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("vcard_grammar"), mGrammarVcardFile);
|
||||
copyIfNotExist(getResourceIdentifierFromName("rootca"), mLinphoneRootCaFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("cpim_grammar"), mGrammarCpimFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("vcard_grammar"), mGrammarVcardFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("rootca"), mLinphoneRootCaFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("notes_of_the_optimistic"), mRingSoundFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("ringback"), mRingbackSoundFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("hold"), mPauseSoundFile);
|
||||
copyEvenIfExists(getResourceIdentifierFromName("incoming_chat"), mErrorToneFile);
|
||||
}
|
||||
|
||||
public void copyEvenIfExists(int ressourceId, String target) throws IOException {
|
||||
File lFileToCopy = new File(target);
|
||||
copyFromPackage(ressourceId, lFileToCopy.getName());
|
||||
}
|
||||
|
||||
public void copyIfNotExist(int ressourceId, String target) throws IOException {
|
||||
File lFileToCopy = new File(target);
|
||||
if (!lFileToCopy.exists()) {
|
||||
copyFromPackage(ressourceId,lFileToCopy.getName());
|
||||
copyFromPackage(ressourceId, lFileToCopy.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue