Loading api/current.xml +26 −2 Original line number Diff line number Diff line Loading @@ -1035,6 +1035,17 @@ visibility="public" > </field> <field name="SET_TIME" type="java.lang.String" transient="false" volatile="false" value=""android.permission.SET_TIME"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SET_TIME_ZONE" type="java.lang.String" transient="false" Loading Loading @@ -18808,6 +18819,19 @@ <parameter name="operation" type="android.app.PendingIntent"> </parameter> </method> <method name="setTime" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="millis" type="long"> </parameter> </method> <method name="setTimeZone" return="void" abstract="false" Loading Loading @@ -72328,7 +72352,7 @@ type="float" transient="false" volatile="false" value="0.0010f" value="0.001f" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -209963,7 +209987,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface> core/java/android/app/AlarmManager.java +20 −1 Original line number Diff line number Diff line Loading @@ -278,6 +278,25 @@ public class AlarmManager } } /** * Set the system wall clock time. * Requires the permission android.permission.SET_TIME. * * @param millis time in milliseconds since the Epoch */ public void setTime(long millis) { try { mService.setTime(millis); } catch (RemoteException ex) { } } /** * Set the system default time zone. * Requires the permission android.permission.SET_TIME_ZONE. * * @param timeZone in the format understood by {@link java.util.TimeZone} */ public void setTimeZone(String timeZone) { try { mService.setTimeZone(timeZone); Loading core/java/android/app/IAlarmManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ interface IAlarmManager { void set(int type, long triggerAtTime, in PendingIntent operation); void setRepeating(int type, long triggerAtTime, long interval, in PendingIntent operation); void setInexactRepeating(int type, long triggerAtTime, long interval, in PendingIntent operation); void setTime(long millis); void setTimeZone(String zone); void remove(in PendingIntent operation); } Loading core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,12 @@ android:label="@string/permlab_setWallpaperHints" android:description="@string/permdesc_setWallpaperHints" /> <!-- Allows applications to set the system time --> <permission android:name="android.permission.SET_TIME" android:protectionLevel="signatureOrSystem" android:label="@string/permlab_setTime" android:description="@string/permdesc_setTime" /> <!-- Allows applications to set the system time zone --> <permission android:name="android.permission.SET_TIME_ZONE" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" Loading core/res/res/values/strings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,12 @@ reset the system to its factory settings, erasing all data, configuration, and installed applications.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_setTime">set time</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permdesc_setTime">Allows an application to change the phone\'s clock time.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_setTimeZone">set time zone</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> Loading Loading
api/current.xml +26 −2 Original line number Diff line number Diff line Loading @@ -1035,6 +1035,17 @@ visibility="public" > </field> <field name="SET_TIME" type="java.lang.String" transient="false" volatile="false" value=""android.permission.SET_TIME"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SET_TIME_ZONE" type="java.lang.String" transient="false" Loading Loading @@ -18808,6 +18819,19 @@ <parameter name="operation" type="android.app.PendingIntent"> </parameter> </method> <method name="setTime" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="millis" type="long"> </parameter> </method> <method name="setTimeZone" return="void" abstract="false" Loading Loading @@ -72328,7 +72352,7 @@ type="float" transient="false" volatile="false" value="0.0010f" value="0.001f" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -209963,7 +209987,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface>
core/java/android/app/AlarmManager.java +20 −1 Original line number Diff line number Diff line Loading @@ -278,6 +278,25 @@ public class AlarmManager } } /** * Set the system wall clock time. * Requires the permission android.permission.SET_TIME. * * @param millis time in milliseconds since the Epoch */ public void setTime(long millis) { try { mService.setTime(millis); } catch (RemoteException ex) { } } /** * Set the system default time zone. * Requires the permission android.permission.SET_TIME_ZONE. * * @param timeZone in the format understood by {@link java.util.TimeZone} */ public void setTimeZone(String timeZone) { try { mService.setTimeZone(timeZone); Loading
core/java/android/app/IAlarmManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ interface IAlarmManager { void set(int type, long triggerAtTime, in PendingIntent operation); void setRepeating(int type, long triggerAtTime, long interval, in PendingIntent operation); void setInexactRepeating(int type, long triggerAtTime, long interval, in PendingIntent operation); void setTime(long millis); void setTimeZone(String zone); void remove(in PendingIntent operation); } Loading
core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -679,6 +679,12 @@ android:label="@string/permlab_setWallpaperHints" android:description="@string/permdesc_setWallpaperHints" /> <!-- Allows applications to set the system time --> <permission android:name="android.permission.SET_TIME" android:protectionLevel="signatureOrSystem" android:label="@string/permlab_setTime" android:description="@string/permdesc_setTime" /> <!-- Allows applications to set the system time zone --> <permission android:name="android.permission.SET_TIME_ZONE" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" Loading
core/res/res/values/strings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,12 @@ reset the system to its factory settings, erasing all data, configuration, and installed applications.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_setTime">set time</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permdesc_setTime">Allows an application to change the phone\'s clock time.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_setTimeZone">set time zone</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> Loading