Did Unity 2017.1. deprecate Vibration on Android? My vibration methods no longer work on newer builds.

So, recently I’ve upgraded from 5.4.3f to 2017.1. I’ve had a Vibration section full of methods which had worked on builds prior to 2017.1, but now no longer work for some reason. The code is here:

static bool isAndroid()
		{
			#if UNITY_ANDROID && !UNITY_EDITOR
			return true;
			#else
			return false;
			#endif
		}

	#region VIBRATION
		#if UNITY_ANDROID && !UNITY_EDITOR
		public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
		public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
		public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator");
		#endif

		public static void Vibrate(long ms)
		{
			#if UNITY_ANDROID && !UNITY_EDITOR
				vibrator.Call("vibrate", ms);
			#else
				Handheld.Vibrate();
			#endif
		}

		public static void Vibrate (long ms, float intensity)
		{
			#if UNITY_ANDROID && !UNITY_EDITOR
				vibrator.Call("vibrate", CreateIntensity(ms, intensity), -1);
			#else
				Handheld.Vibrate();
			#endif
		}

		public static void Vibrate(long[] WaitThenVibrate, int restartIndex)
		{
			#if UNITY_ANDROID && !UNITY_EDITOR
				vibrator.Call("vibrate", WaitThenVibrate, restartIndex);
			#else
				Handheld.Vibrate();
			#endif
		}

		public static bool HasVibrator()
		{
			return isAndroid();
		}

		public static void Cancel()
		{
			#if UNITY_ANDROID && !UNITY_EDITOR
			vibrator.Call("cancel");
			#endif
		}

		static float GetVibrate(float intensity, int NumberOfQuantums)
		{
			return math.round(intensity * NumberOfQuantums);
		}

		static long[] CreateIntensity (long ms, float intensity)
		{
			if (intensity < 0.025f)
				return new long[] { ms, 0 };
			else if (intensity >= 0.975)
				return new long[] {0, ms};
			else
			{
				int pairs = (int)(ms / Constants.NumberOfVibrateParts) + ((int)ms % Constants.NumberOfVibrateParts);

				if (ms < Constants.NumberOfVibrateParts)
				{
					long[] toReturn = new long[4 * pairs];

					long VibrateTime = (long)Mathf.Clamp(GetVibrate(intensity, Constants.NumberOfVibrateParts / 2) + (intensity > 0.45f ? 2 : 0), 0, Constants.NumberOfVibrateParts);
					long DelayTime = (Constants.NumberOfVibrateParts / 2) - VibrateTime;

					for (int i = 0; i < toReturn.Length;)
					{
						toReturn[i++] = DelayTime;
						toReturn[i++] = VibrateTime;
					}

					return toReturn;
				}
				else
				{
					long[] toReturn = new long[2 * pairs];

					long VibrateTime =  (long)Mathf.Clamp(GetVibrate(intensity, Constants.NumberOfVibrateParts) + (intensity > 0.45f ? 3 : 0), 0, Constants.NumberOfVibrateParts);
					long DelayTime = Constants.NumberOfVibrateParts - VibrateTime;

					for (int i = 0; i < toReturn.Length;)
					{
						toReturn[i++] = DelayTime;
						toReturn[i++] = VibrateTime;
					}

					return toReturn;
				}
			}
		}
	#endregion

After building in 2017.1 my vibration stopped working. I call it in methods I call when touching a button. An example of my use would be this:

public void OnButtonX ()
	{
		StartCoroutine(OpenMenu());
		Statics.android.Vibrate(60, 0.35f);
	}

However, they no longer work. I am unsure why. As far as I know, I should still have the permission to vibrate. The API level is 16. I’m testing this on a Resurrection Remix (Android 7.1) phone. The vibrate method runs surely because I can see the phoneutils.Vibrate in the editor every time I press a button.

Anyone had a similar issue or has an idea how to fix this?

I tried almost the same code in my 2017.1 project and it didn’t work on the device also.