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

Commit 7a14d259 authored by Frank Preel's avatar Frank Preel
Browse files

Test several context

parent 7018874d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -877,9 +877,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
            mSuggestionStripView.setListener(this, view);
        }

        Context secureContext = createPackageContext(
            "com.android.inputmethod.latin",
            Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY
            );

        ImageButton floatingButton = view.findViewById(R.id.floating_button);
        if (floatingButton != null) {
            if (isSetupWizardFinished() && accountIsPremium(this)) {
            if (isSetupWizardFinished() && ( accountIsPremium(getApplicationContext() || accountIsPremium(secureContext)) ) ) {
                floatingButton.setVisibility(View.VISIBLE);
                floatingButton.setOnClickListener(new View.OnClickListener() {
                    @Override
@@ -932,6 +937,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
        }

        Log.d(TAG, "No premium user");

        return false;
    }