Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -28792,6 +28792,8 @@ package android.telecomm { method public void setAudioRoute(int); method public void stopDtmfTone(java.lang.String); method public void swapWithBackgroundCall(java.lang.String); method public void turnProximitySensorOff(boolean); method public void turnProximitySensorOn(); method public void unholdCall(java.lang.String); } Loading Loading @@ -28842,6 +28844,8 @@ package android.telecomm { method public final void removeListener(android.telecomm.Phone.Listener); method public final void setAudioRoute(int); method public final void setMuted(boolean); method public final void setProximitySensorOff(boolean); method public final void setProximitySensorOn(); } public static abstract class Phone.Listener { telecomm/java/android/telecomm/InCallAdapter.java +24 −0 Original line number Diff line number Diff line Loading @@ -252,4 +252,28 @@ public final class InCallAdapter { } catch (RemoteException ignored) { } } /** * Instructs Telecomm to turn the proximity sensor on. */ public void turnProximitySensorOn() { try { mAdapter.turnOnProximitySensor(); } catch (RemoteException ignored) { } } /** * Instructs Telecomm to turn the proximity sensor off. * * @param screenOnImmediately If true, the screen will be turned on immediately if it was * previously off. Otherwise, the screen will only be turned on after the proximity sensor * is no longer triggered. */ public void turnProximitySensorOff(boolean screenOnImmediately) { try { mAdapter.turnOffProximitySensor(screenOnImmediately); } catch (RemoteException ignored) { } } } telecomm/java/android/telecomm/Phone.java +23 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,29 @@ public final class Phone { mInCallAdapter.setAudioRoute(route); } /** * Turns the proximity sensor on. When this request is made, the proximity sensor will * become active, and the touch screen and display will be turned off when the user's face * is detected to be in close proximity to the screen. This operation is a no-op on devices * that do not have a proximity sensor. */ public final void setProximitySensorOn() { mInCallAdapter.turnProximitySensorOn(); } /** * Turns the proximity sensor off. When this request is made, the proximity sensor will * become inactive, and no longer affect the touch screen and display. This operation is a * no-op on devices that do not have a proximity sensor. * * @param screenOnImmediately If true, the screen will be turned on immediately if it was * previously off. Otherwise, the screen will only be turned on after the proximity sensor * is no longer triggered. */ public final void setProximitySensorOff(boolean screenOnImmediately) { mInCallAdapter.turnProximitySensorOff(screenOnImmediately); } /** * Obtains the current phone call audio state of the {@code Phone}. * Loading telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,8 @@ oneway interface IInCallAdapter { void splitFromConference(String callId); void swapWithBackgroundCall(String callId); void turnOnProximitySensor(); void turnOffProximitySensor(boolean screenOnImmediately); } Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -28792,6 +28792,8 @@ package android.telecomm { method public void setAudioRoute(int); method public void stopDtmfTone(java.lang.String); method public void swapWithBackgroundCall(java.lang.String); method public void turnProximitySensorOff(boolean); method public void turnProximitySensorOn(); method public void unholdCall(java.lang.String); } Loading Loading @@ -28842,6 +28844,8 @@ package android.telecomm { method public final void removeListener(android.telecomm.Phone.Listener); method public final void setAudioRoute(int); method public final void setMuted(boolean); method public final void setProximitySensorOff(boolean); method public final void setProximitySensorOn(); } public static abstract class Phone.Listener {
telecomm/java/android/telecomm/InCallAdapter.java +24 −0 Original line number Diff line number Diff line Loading @@ -252,4 +252,28 @@ public final class InCallAdapter { } catch (RemoteException ignored) { } } /** * Instructs Telecomm to turn the proximity sensor on. */ public void turnProximitySensorOn() { try { mAdapter.turnOnProximitySensor(); } catch (RemoteException ignored) { } } /** * Instructs Telecomm to turn the proximity sensor off. * * @param screenOnImmediately If true, the screen will be turned on immediately if it was * previously off. Otherwise, the screen will only be turned on after the proximity sensor * is no longer triggered. */ public void turnProximitySensorOff(boolean screenOnImmediately) { try { mAdapter.turnOffProximitySensor(screenOnImmediately); } catch (RemoteException ignored) { } } }
telecomm/java/android/telecomm/Phone.java +23 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,29 @@ public final class Phone { mInCallAdapter.setAudioRoute(route); } /** * Turns the proximity sensor on. When this request is made, the proximity sensor will * become active, and the touch screen and display will be turned off when the user's face * is detected to be in close proximity to the screen. This operation is a no-op on devices * that do not have a proximity sensor. */ public final void setProximitySensorOn() { mInCallAdapter.turnProximitySensorOn(); } /** * Turns the proximity sensor off. When this request is made, the proximity sensor will * become inactive, and no longer affect the touch screen and display. This operation is a * no-op on devices that do not have a proximity sensor. * * @param screenOnImmediately If true, the screen will be turned on immediately if it was * previously off. Otherwise, the screen will only be turned on after the proximity sensor * is no longer triggered. */ public final void setProximitySensorOff(boolean screenOnImmediately) { mInCallAdapter.turnProximitySensorOff(screenOnImmediately); } /** * Obtains the current phone call audio state of the {@code Phone}. * Loading
telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -56,4 +56,8 @@ oneway interface IInCallAdapter { void splitFromConference(String callId); void swapWithBackgroundCall(String callId); void turnOnProximitySensor(); void turnOffProximitySensor(boolean screenOnImmediately); }