Loading AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,12 @@ <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SHOW_TIMERS" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.DISMISS_ALARM" /> Loading src/com/android/deskclock/HandleApiCalls.java +16 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ public class HandleApiCalls extends Activity { private Context mAppContext; public static final String ACTION_SHOW_TIMERS = "android.intent.action.SHOW_TIMERS"; @Override protected void onCreate(Bundle icicle) { try { Loading @@ -83,6 +85,9 @@ public class HandleApiCalls extends Activity { case AlarmClock.ACTION_SET_TIMER: handleSetTimer(intent); break; case ACTION_SHOW_TIMERS: handleShowTimers(intent); break; case AlarmClock.ACTION_DISMISS_ALARM: handleDismissAlarm(intent); break; Loading Loading @@ -373,6 +378,17 @@ public class HandleApiCalls extends Activity { LogUtils.i("HandleApiCalls show alarms"); } private void handleShowTimers(Intent intent) { // Change to the timers tab. UiDataModel.getUiDataModel().setSelectedTab(TIMERS); // Open DeskClock which is now positioned on the timers tab. startActivity(new Intent(this, DeskClock.class)); Events.sendTimerEvent(R.string.action_show, R.string.label_intent); LogUtils.i("HandleApiCalls show timers"); } private void handleSetTimer(Intent intent) { // If no length is supplied, show the timer setup view. if (!intent.hasExtra(AlarmClock.EXTRA_LENGTH)) { Loading Loading
AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,12 @@ <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.SHOW_TIMERS" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.VOICE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.DISMISS_ALARM" /> Loading
src/com/android/deskclock/HandleApiCalls.java +16 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ public class HandleApiCalls extends Activity { private Context mAppContext; public static final String ACTION_SHOW_TIMERS = "android.intent.action.SHOW_TIMERS"; @Override protected void onCreate(Bundle icicle) { try { Loading @@ -83,6 +85,9 @@ public class HandleApiCalls extends Activity { case AlarmClock.ACTION_SET_TIMER: handleSetTimer(intent); break; case ACTION_SHOW_TIMERS: handleShowTimers(intent); break; case AlarmClock.ACTION_DISMISS_ALARM: handleDismissAlarm(intent); break; Loading Loading @@ -373,6 +378,17 @@ public class HandleApiCalls extends Activity { LogUtils.i("HandleApiCalls show alarms"); } private void handleShowTimers(Intent intent) { // Change to the timers tab. UiDataModel.getUiDataModel().setSelectedTab(TIMERS); // Open DeskClock which is now positioned on the timers tab. startActivity(new Intent(this, DeskClock.class)); Events.sendTimerEvent(R.string.action_show, R.string.label_intent); LogUtils.i("HandleApiCalls show timers"); } private void handleSetTimer(Intent intent) { // If no length is supplied, show the timer setup view. if (!intent.hasExtra(AlarmClock.EXTRA_LENGTH)) { Loading