Loading AndroidManifest.xml +4 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,10 @@ <action android:name="android.intent.action.SET_ALARM" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SHOW_ALARMS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SET_TIMER" /> <category android:name="android.intent.category.DEFAULT" /> Loading src/com/android/deskclock/HandleApiCalls.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.deskclock; import static android.provider.AlarmClock.ACTION_SET_ALARM; import static android.provider.AlarmClock.ACTION_SET_TIMER; import static android.provider.AlarmClock.ACTION_SHOW_ALARMS; import static android.provider.AlarmClock.EXTRA_DAYS; import static android.provider.AlarmClock.EXTRA_HOUR; import static android.provider.AlarmClock.EXTRA_LENGTH; Loading Loading @@ -60,6 +61,8 @@ public class HandleApiCalls extends Activity { if (intent != null) { if (ACTION_SET_ALARM.equals(intent.getAction())) { handleSetAlarm(intent); } else if (ACTION_SHOW_ALARMS.equals(intent.getAction())) { handleShowAlarms(); } else if (ACTION_SET_TIMER.equals(intent.getAction())) { handleSetTimer(intent); } Loading Loading @@ -132,6 +135,11 @@ public class HandleApiCalls extends Activity { finish(); } private void handleShowAlarms() { startActivity(new Intent(this, DeskClock.class) .putExtra(DeskClock.SELECT_TAB_INTENT_EXTRA, DeskClock.ALARM_TAB_INDEX)); } private void handleSetTimer(Intent intent) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); // If no length is supplied , show the timer setup view Loading Loading
AndroidManifest.xml +4 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,10 @@ <action android:name="android.intent.action.SET_ALARM" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SHOW_ALARMS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SET_TIMER" /> <category android:name="android.intent.category.DEFAULT" /> Loading
src/com/android/deskclock/HandleApiCalls.java +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.deskclock; import static android.provider.AlarmClock.ACTION_SET_ALARM; import static android.provider.AlarmClock.ACTION_SET_TIMER; import static android.provider.AlarmClock.ACTION_SHOW_ALARMS; import static android.provider.AlarmClock.EXTRA_DAYS; import static android.provider.AlarmClock.EXTRA_HOUR; import static android.provider.AlarmClock.EXTRA_LENGTH; Loading Loading @@ -60,6 +61,8 @@ public class HandleApiCalls extends Activity { if (intent != null) { if (ACTION_SET_ALARM.equals(intent.getAction())) { handleSetAlarm(intent); } else if (ACTION_SHOW_ALARMS.equals(intent.getAction())) { handleShowAlarms(); } else if (ACTION_SET_TIMER.equals(intent.getAction())) { handleSetTimer(intent); } Loading Loading @@ -132,6 +135,11 @@ public class HandleApiCalls extends Activity { finish(); } private void handleShowAlarms() { startActivity(new Intent(this, DeskClock.class) .putExtra(DeskClock.SELECT_TAB_INTENT_EXTRA, DeskClock.ALARM_TAB_INDEX)); } private void handleSetTimer(Intent intent) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); // If no length is supplied , show the timer setup view Loading