Merge "Fix for goat detection code" into rvc-dev am: 7588f0d7a0 am: 4606688141 am: e43bd566f7
Change-Id: Ia9b1e5bed85cb654505f9afafb81bf42f99ea7c1
This commit is contained in:
@@ -1729,9 +1729,15 @@ public class UserManager {
|
||||
* <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
|
||||
* 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() {
|
||||
if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) {
|
||||
return false;
|
||||
}
|
||||
return mContext.getPackageManager()
|
||||
.isPackageAvailable("com.coffeestainstudios.goatsimulator");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user