Loading core/java/android/hardware/SensorManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1577,7 +1577,7 @@ public abstract class SensorManager { * Significant Motion, Step Counter etc. * * The tests which call this API need to have {@code * android.permission.HARDWARE_TEST} permission which isn't * android.permission.LOCATION_HADWARE} permission which isn't * available for third party applications. * * @param enable True to set the HAL in DATA_INJECTION mode. Loading Loading @@ -1607,7 +1607,7 @@ public abstract class SensorManager { * the HAL is already in data injection mode. * * The tests which call this API need to have {@code * android.permission.HARDWARE_TEST} permission which isn't * android.permission.LOCATION_HARDWARE} permission which isn't * available for third party applications. * * @param sensor The sensor to inject. Loading core/java/android/hardware/SystemSensorManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class SystemSensorManager extends SensorManager { nativeClassInit(); } mHasDataInjectionPermissions = context.checkSelfPermission( Manifest.permission.HARDWARE_TEST) == PackageManager.PERMISSION_GRANTED; Manifest.permission.LOCATION_HARDWARE) == PackageManager.PERMISSION_GRANTED; } // initialize the sensor list Loading Loading @@ -233,7 +233,7 @@ public class SystemSensorManager extends SensorManager { protected boolean enableDataInjectionImpl(boolean enable) { if (!mHasDataInjectionPermissions) { throw new SecurityException("Permission denial. Calling enableDataInjection without " + Manifest.permission.HARDWARE_TEST); + Manifest.permission.LOCATION_HARDWARE); } synchronized (mLock) { int ret = nativeEnableDataInjection(mNativeInstance, enable); Loading @@ -256,7 +256,7 @@ public class SystemSensorManager extends SensorManager { long timestamp) { if (!mHasDataInjectionPermissions) { throw new SecurityException("Permission denial. Calling injectSensorData without " + Manifest.permission.HARDWARE_TEST); + Manifest.permission.LOCATION_HARDWARE); } synchronized (mLock) { if (!mDataInjectionMode) { Loading Loading
core/java/android/hardware/SensorManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -1577,7 +1577,7 @@ public abstract class SensorManager { * Significant Motion, Step Counter etc. * * The tests which call this API need to have {@code * android.permission.HARDWARE_TEST} permission which isn't * android.permission.LOCATION_HADWARE} permission which isn't * available for third party applications. * * @param enable True to set the HAL in DATA_INJECTION mode. Loading Loading @@ -1607,7 +1607,7 @@ public abstract class SensorManager { * the HAL is already in data injection mode. * * The tests which call this API need to have {@code * android.permission.HARDWARE_TEST} permission which isn't * android.permission.LOCATION_HARDWARE} permission which isn't * available for third party applications. * * @param sensor The sensor to inject. Loading
core/java/android/hardware/SystemSensorManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class SystemSensorManager extends SensorManager { nativeClassInit(); } mHasDataInjectionPermissions = context.checkSelfPermission( Manifest.permission.HARDWARE_TEST) == PackageManager.PERMISSION_GRANTED; Manifest.permission.LOCATION_HARDWARE) == PackageManager.PERMISSION_GRANTED; } // initialize the sensor list Loading Loading @@ -233,7 +233,7 @@ public class SystemSensorManager extends SensorManager { protected boolean enableDataInjectionImpl(boolean enable) { if (!mHasDataInjectionPermissions) { throw new SecurityException("Permission denial. Calling enableDataInjection without " + Manifest.permission.HARDWARE_TEST); + Manifest.permission.LOCATION_HARDWARE); } synchronized (mLock) { int ret = nativeEnableDataInjection(mNativeInstance, enable); Loading @@ -256,7 +256,7 @@ public class SystemSensorManager extends SensorManager { long timestamp) { if (!mHasDataInjectionPermissions) { throw new SecurityException("Permission denial. Calling injectSensorData without " + Manifest.permission.HARDWARE_TEST); + Manifest.permission.LOCATION_HARDWARE); } synchronized (mLock) { if (!mDataInjectionMode) { Loading