Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6719d0c7 authored by alperozturk's avatar alperozturk Committed by Tobias Kaminsky
Browse files

Add registerFilesAppType

parent 943dbc4a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
<?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>