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

Commit a925a5c4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix for goat detection code" into rvc-dev am: 7588f0d7 am: 8ced41c7

Change-Id: I0cfaf912f30697d9fd1bb421157a9b18584b18c8
parents d805a7ff 8ced41c7
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -1729,9 +1729,15 @@ public class UserManager {
     * <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
     * <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
     * now automatically identify goats using advanced goat recognition technology.</p>
     * now automatically identify goats using advanced goat recognition technology.</p>
     *
     *
     * @return Returns true if the user making this call is a goat.
     * <p>As of {@link android.os.Build.VERSION_CODES#R}, this method always returns
     * {@code false} in order to protect goat privacy.</p>
     *
     * @return Returns whether the user making this call is a goat.
     */
     */
    public boolean isUserAGoat() {
    public boolean isUserAGoat() {
        if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) {
            return false;
        }
        return mContext.getPackageManager()
        return mContext.getPackageManager()
                .isPackageAvailable("com.coffeestainstudios.goatsimulator");
                .isPackageAvailable("com.coffeestainstudios.goatsimulator");
    }
    }