summaryrefslogtreecommitdiff
path: root/src/com/android/deskclock/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/deskclock/controller')
-rw-r--r--src/com/android/deskclock/controller/Controller.java8
-rw-r--r--src/com/android/deskclock/controller/ShortcutController.java2
-rw-r--r--src/com/android/deskclock/controller/VoiceController.java10
3 files changed, 2 insertions, 18 deletions
diff --git a/src/com/android/deskclock/controller/Controller.java b/src/com/android/deskclock/controller/Controller.java
index 76f839ad3..13be1d33a 100644
--- a/src/com/android/deskclock/controller/Controller.java
+++ b/src/com/android/deskclock/controller/Controller.java
@@ -55,9 +55,7 @@ public final class Controller {
mContext = context.getApplicationContext();
mEventController = new EventController();
mVoiceController = new VoiceController();
- if (Utils.isNMR1OrLater()) {
- mShortcutController = new ShortcutController(mContext);
- }
+ mShortcutController = new ShortcutController(mContext);
}
}
@@ -111,8 +109,6 @@ public final class Controller {
public void updateShortcuts() {
enforceMainLooper();
- if (mShortcutController != null) {
- mShortcutController.updateShortcuts();
- }
+ mShortcutController.updateShortcuts();
}
} \ No newline at end of file
diff --git a/src/com/android/deskclock/controller/ShortcutController.java b/src/com/android/deskclock/controller/ShortcutController.java
index 8eba32f5f..d0b6799bb 100644
--- a/src/com/android/deskclock/controller/ShortcutController.java
+++ b/src/com/android/deskclock/controller/ShortcutController.java
@@ -16,7 +16,6 @@
package com.android.deskclock.controller;
-import android.annotation.TargetApi;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -46,7 +45,6 @@ import com.android.deskclock.uidata.UiDataModel;
import java.util.Arrays;
import java.util.Collections;
-@TargetApi(Build.VERSION_CODES.N_MR1)
class ShortcutController {
private final Context mContext;
diff --git a/src/com/android/deskclock/controller/VoiceController.java b/src/com/android/deskclock/controller/VoiceController.java
index 1eae56047..ad4e9584a 100644
--- a/src/com/android/deskclock/controller/VoiceController.java
+++ b/src/com/android/deskclock/controller/VoiceController.java
@@ -16,7 +16,6 @@
package com.android.deskclock.controller;
-import android.annotation.TargetApi;
import android.app.Activity;
import android.app.VoiceInteractor;
import android.app.VoiceInteractor.AbortVoiceRequest;
@@ -26,7 +25,6 @@ import android.os.Build;
import com.android.deskclock.Utils;
-@TargetApi(Build.VERSION_CODES.M)
class VoiceController {
/**
* If the {@code activity} is currently hosting a voice interaction session, indicate the voice
@@ -36,10 +34,6 @@ class VoiceController {
* @param message to be spoken to the user to indicate success
*/
void notifyVoiceSuccess(Activity activity, String message) {
- if (!Utils.isMOrLater()) {
- return;
- }
-
final VoiceInteractor voiceInteractor = activity.getVoiceInteractor();
if (voiceInteractor != null) {
final Prompt prompt = new Prompt(message);
@@ -55,10 +49,6 @@ class VoiceController {
* @param message to be spoken to the user to indicate failure
*/
void notifyVoiceFailure(Activity activity, String message) {
- if (!Utils.isMOrLater()) {
- return;
- }
-
final VoiceInteractor voiceInteractor = activity.getVoiceInteractor();
if (voiceInteractor != null) {
final Prompt prompt = new Prompt(message);