mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-28 03:25:18 +03:00
Add registerFilesAppType
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
d532060a57
commit
9410241045
2 changed files with 27 additions and 0 deletions
|
@ -15,11 +15,15 @@ import static androidx.preference.PreferenceManager.getDefaultSharedPreferences;
|
|||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
|
||||
import com.nextcloud.android.sso.FilesAppTypeRegistry;
|
||||
import com.nextcloud.android.sso.model.FilesAppType;
|
||||
|
||||
import it.niedermann.owncloud.notes.branding.BrandingUtil;
|
||||
import it.niedermann.owncloud.notes.preferences.DarkModeSetting;
|
||||
|
||||
|
@ -46,6 +50,18 @@ public class NotesApplication extends Application {
|
|||
if (BuildConfig.DEBUG) {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
}
|
||||
registerFilesAppType();
|
||||
}
|
||||
|
||||
private void registerFilesAppType() {
|
||||
String packageId = getResources().getString(R.string.package_id);
|
||||
String accountType = getResources().getString(R.string.account_type);
|
||||
|
||||
if (TextUtils.isEmpty(packageId) || TextUtils.isEmpty(accountType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
FilesAppTypeRegistry.getInstance().init(new FilesAppType(packageId, accountType, FilesAppType.Type.PROD));
|
||||
}
|
||||
|
||||
public static BrandingUtil brandingUtil() {
|
||||
|
|
11
app/src/main/res/values/setup.xml
Normal file
11
app/src/main/res/values/setup.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Nextcloud - Android Client
|
||||
~
|
||||
~ SPDX-FileCopyrightText: 2024 Alper Ozturk <alper.ozturk@nextcloud.com>
|
||||
~ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="package_id" translatable="false"></string>
|
||||
<string name="account_type" translatable="false"></string>
|
||||
</resources>
|
Loading…
Reference in a new issue