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

Commit f36da27b authored by frankpreel's avatar frankpreel
Browse files

Try to find if user is premium in several ways

parent 310186a8
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -915,12 +915,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                "com.android.inputmethod.latin",
                "com.android.inputmethod.latin",
                Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY
                Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY
            );
            );
            Log.d(TAG, "Contexte sécurisé créé avec succès: " + secureContext);
            Log.d(TAG, "Secur context: " + secureContext);
            return accountIsPremium(secureContext);
            return accountIsPremium(secureContext);
        } catch (PackageManager.NameNotFoundException e) {
        } catch (PackageManager.NameNotFoundException e) {
            // Cas gravissime, impossible réellement en théorie dans ton cas précis
            Log.wtf(TAG, "Error createPackageContext()", e);
            Log.wtf(TAG, "Erreur CRITIQUE: Le package LatinIME n'est pas trouvé par createPackageContext()", e);
            // Logique de secours absolue: repli sur contexte initial même si restreint, mieux que rien
            return accountIsPremium(this);
            return accountIsPremium(this);
        }
        }
    }
    }