Loading core/java/android/app/ActivityManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,18 @@ public class ActivityManager { return RoSystemProperties.CONFIG_LOW_RAM; } /** * Returns true if this is a small battery device. Exactly whether a device is considered to be * small battery is ultimately up to the device configuration, but currently it generally means * something in the class of a device with 1000 mAh or less. This is mostly intended to be used * to determine whether certain features should be altered to account for a drastically smaller * battery. * @hide */ public static boolean isSmallBatteryDevice() { return RoSystemProperties.CONFIG_SMALL_BATTERY; } /** * Used by persistent processes to determine if they are running on a * higher-end device so should be okay using hardware drawing acceleration Loading core/java/android/app/job/JobInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,10 +107,10 @@ public class JobInfo implements Parcelable { public static final int BACKOFF_POLICY_EXPONENTIAL = 1; /* Minimum interval for a periodic job, in milliseconds. */ private static final long MIN_PERIOD_MILLIS = 15 * 60 * 1000L; // 15 minutes private static final long MIN_PERIOD_MILLIS = 30 * 60 * 1000L; // HACK|STOPSHIP:ewol 30 minutes /* Minimum flex for a periodic job, in milliseconds. */ private static final long MIN_FLEX_MILLIS = 5 * 60 * 1000L; // 5 minutes private static final long MIN_FLEX_MILLIS = 10 * 60 * 1000L; // HACK|STOPSHIP:ewol 10 minutes /** * Minimum backoff interval for a job, in milliseconds Loading core/java/android/hardware/camera2/CameraManager.java +21 −9 Original line number Diff line number Diff line Loading @@ -16,28 +16,29 @@ package android.hardware.camera2; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; import android.hardware.CameraInfo; import android.hardware.CameraStatus; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.legacy.CameraDeviceUserShim; import android.hardware.camera2.legacy.LegacyMetadataMapper; import android.os.IBinder; import android.os.Binder; import android.os.DeadObjectException; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.util.Log; import android.os.SystemProperties; import android.util.ArrayMap; import android.util.Log; import java.util.ArrayList; Loading Loading @@ -210,7 +211,9 @@ public final class CameraManager { public CameraCharacteristics getCameraCharacteristics(@NonNull String cameraId) throws CameraAccessException { CameraCharacteristics characteristics = null; if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } synchronized (mLock) { /* * Get the camera characteristics from the camera service directly if it supports it, Loading Loading @@ -462,6 +465,9 @@ public final class CameraManager { "Handler argument is null, but no looper exists in the calling thread"); } } if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } openCameraDeviceUserAsync(cameraId, callback, handler, clientUid); } Loading Loading @@ -507,6 +513,9 @@ public final class CameraManager { */ public void setTorchMode(@NonNull String cameraId, boolean enabled) throws CameraAccessException { if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } CameraManagerGlobal.get().setTorchMode(cameraId, enabled); } Loading Loading @@ -745,6 +754,9 @@ public final class CameraManager { private CameraManagerGlobal() { } public static final boolean sCameraServiceDisabled = SystemProperties.getBoolean("config.disable_cameraservice", false); public static CameraManagerGlobal get() { return gCameraManager; } Loading @@ -764,7 +776,7 @@ public final class CameraManager { public ICameraService getCameraService() { synchronized(mLock) { connectCameraServiceLocked(); if (mCameraService == null) { if (mCameraService == null && !sCameraServiceDisabled) { Log.e(TAG, "Camera service is unavailable"); } return mCameraService; Loading @@ -779,7 +791,7 @@ public final class CameraManager { */ private void connectCameraServiceLocked() { // Only reconnect if necessary if (mCameraService != null) return; if (mCameraService != null || sCameraServiceDisabled) return; Log.i(TAG, "Connecting to camera service"); Loading core/java/android/hardware/input/IInputManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,11 @@ interface IInputManager { InputDevice getInputDevice(int deviceId); int[] getInputDeviceIds(); // Enable/disable input device. boolean isInputDeviceEnabled(int deviceId); void enableInputDevice(int deviceId); void disableInputDevice(int deviceId); // Reports whether the hardware supports the given keys; returns true if successful boolean hasKeys(int deviceId, int sourceMask, in int[] keyCodes, out boolean[] keyExists); Loading core/java/android/hardware/input/InputManager.java +56 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,62 @@ public final class InputManager { } } /** * Returns true if an input device is enabled. Should return true for most * situations. Some system apps may disable an input device, for * example to prevent unwanted touch events. * * @param id The input device Id. * * @hide */ public boolean isInputDeviceEnabled(int id) { try { return mIm.isInputDeviceEnabled(id); } catch (RemoteException ex) { Log.w(TAG, "Could not check enabled status of input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Enables an InputDevice. * <p> * Requires {@link android.Manifest.permissions.DISABLE_INPUT_DEVICE}. * </p> * * @param id The input device Id. * * @hide */ public void enableInputDevice(int id) { try { mIm.enableInputDevice(id); } catch (RemoteException ex) { Log.w(TAG, "Could not enable input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Disables an InputDevice. * <p> * Requires {@link android.Manifest.permissions.DISABLE_INPUT_DEVICE}. * </p> * * @param id The input device Id. * * @hide */ public void disableInputDevice(int id) { try { mIm.disableInputDevice(id); } catch (RemoteException ex) { Log.w(TAG, "Could not disable input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Registers an input device listener to receive notifications about when * input devices are added, removed or changed. Loading Loading
core/java/android/app/ActivityManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -1118,6 +1118,18 @@ public class ActivityManager { return RoSystemProperties.CONFIG_LOW_RAM; } /** * Returns true if this is a small battery device. Exactly whether a device is considered to be * small battery is ultimately up to the device configuration, but currently it generally means * something in the class of a device with 1000 mAh or less. This is mostly intended to be used * to determine whether certain features should be altered to account for a drastically smaller * battery. * @hide */ public static boolean isSmallBatteryDevice() { return RoSystemProperties.CONFIG_SMALL_BATTERY; } /** * Used by persistent processes to determine if they are running on a * higher-end device so should be okay using hardware drawing acceleration Loading
core/java/android/app/job/JobInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -107,10 +107,10 @@ public class JobInfo implements Parcelable { public static final int BACKOFF_POLICY_EXPONENTIAL = 1; /* Minimum interval for a periodic job, in milliseconds. */ private static final long MIN_PERIOD_MILLIS = 15 * 60 * 1000L; // 15 minutes private static final long MIN_PERIOD_MILLIS = 30 * 60 * 1000L; // HACK|STOPSHIP:ewol 30 minutes /* Minimum flex for a periodic job, in milliseconds. */ private static final long MIN_FLEX_MILLIS = 5 * 60 * 1000L; // 5 minutes private static final long MIN_FLEX_MILLIS = 10 * 60 * 1000L; // HACK|STOPSHIP:ewol 10 minutes /** * Minimum backoff interval for a job, in milliseconds Loading
core/java/android/hardware/camera2/CameraManager.java +21 −9 Original line number Diff line number Diff line Loading @@ -16,28 +16,29 @@ package android.hardware.camera2; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; import android.hardware.CameraInfo; import android.hardware.CameraStatus; import android.hardware.ICameraService; import android.hardware.ICameraServiceListener; import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.legacy.CameraDeviceUserShim; import android.hardware.camera2.legacy.LegacyMetadataMapper; import android.os.IBinder; import android.os.Binder; import android.os.DeadObjectException; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.util.Log; import android.os.SystemProperties; import android.util.ArrayMap; import android.util.Log; import java.util.ArrayList; Loading Loading @@ -210,7 +211,9 @@ public final class CameraManager { public CameraCharacteristics getCameraCharacteristics(@NonNull String cameraId) throws CameraAccessException { CameraCharacteristics characteristics = null; if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } synchronized (mLock) { /* * Get the camera characteristics from the camera service directly if it supports it, Loading Loading @@ -462,6 +465,9 @@ public final class CameraManager { "Handler argument is null, but no looper exists in the calling thread"); } } if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } openCameraDeviceUserAsync(cameraId, callback, handler, clientUid); } Loading Loading @@ -507,6 +513,9 @@ public final class CameraManager { */ public void setTorchMode(@NonNull String cameraId, boolean enabled) throws CameraAccessException { if (CameraManagerGlobal.sCameraServiceDisabled) { throw new IllegalArgumentException("No cameras available on device"); } CameraManagerGlobal.get().setTorchMode(cameraId, enabled); } Loading Loading @@ -745,6 +754,9 @@ public final class CameraManager { private CameraManagerGlobal() { } public static final boolean sCameraServiceDisabled = SystemProperties.getBoolean("config.disable_cameraservice", false); public static CameraManagerGlobal get() { return gCameraManager; } Loading @@ -764,7 +776,7 @@ public final class CameraManager { public ICameraService getCameraService() { synchronized(mLock) { connectCameraServiceLocked(); if (mCameraService == null) { if (mCameraService == null && !sCameraServiceDisabled) { Log.e(TAG, "Camera service is unavailable"); } return mCameraService; Loading @@ -779,7 +791,7 @@ public final class CameraManager { */ private void connectCameraServiceLocked() { // Only reconnect if necessary if (mCameraService != null) return; if (mCameraService != null || sCameraServiceDisabled) return; Log.i(TAG, "Connecting to camera service"); Loading
core/java/android/hardware/input/IInputManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,11 @@ interface IInputManager { InputDevice getInputDevice(int deviceId); int[] getInputDeviceIds(); // Enable/disable input device. boolean isInputDeviceEnabled(int deviceId); void enableInputDevice(int deviceId); void disableInputDevice(int deviceId); // Reports whether the hardware supports the given keys; returns true if successful boolean hasKeys(int deviceId, int sourceMask, in int[] keyCodes, out boolean[] keyExists); Loading
core/java/android/hardware/input/InputManager.java +56 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,62 @@ public final class InputManager { } } /** * Returns true if an input device is enabled. Should return true for most * situations. Some system apps may disable an input device, for * example to prevent unwanted touch events. * * @param id The input device Id. * * @hide */ public boolean isInputDeviceEnabled(int id) { try { return mIm.isInputDeviceEnabled(id); } catch (RemoteException ex) { Log.w(TAG, "Could not check enabled status of input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Enables an InputDevice. * <p> * Requires {@link android.Manifest.permissions.DISABLE_INPUT_DEVICE}. * </p> * * @param id The input device Id. * * @hide */ public void enableInputDevice(int id) { try { mIm.enableInputDevice(id); } catch (RemoteException ex) { Log.w(TAG, "Could not enable input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Disables an InputDevice. * <p> * Requires {@link android.Manifest.permissions.DISABLE_INPUT_DEVICE}. * </p> * * @param id The input device Id. * * @hide */ public void disableInputDevice(int id) { try { mIm.disableInputDevice(id); } catch (RemoteException ex) { Log.w(TAG, "Could not disable input device with id = " + id); throw ex.rethrowFromSystemServer(); } } /** * Registers an input device listener to receive notifications about when * input devices are added, removed or changed. Loading