summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/preferredsim/PreferredSimModule.java
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2018-04-30 14:25:46 -0700
committerCopybara-Service <copybara-piper@google.com>2018-04-30 18:18:34 -0700
commit56f79ba6c6608f7041f5e65866b7164499ca7676 (patch)
tree7699f1e6bd1b2180d70144327d68f6df94dd3265 /java/com/android/dialer/preferredsim/PreferredSimModule.java
parent90a68377c36abccde8c4f1e5d3aa781944a1413c (diff)
Refactor PreferredAccountWorker to provide the dialog to be shown.
When dual SIM selection support is added to In Call UI it was a rush order and codes are duplicated. This CL moves the duplicated logic into PreferredAccountWorker so the same dialog can be shown for both. TEST=manual Bug: 69675796,72618783 Test: manual PiperOrigin-RevId: 194845320 Change-Id: Id283ca7616580b0efd4e8f02e63691c70ee7f93c
Diffstat (limited to 'java/com/android/dialer/preferredsim/PreferredSimModule.java')
-rw-r--r--java/com/android/dialer/preferredsim/PreferredSimModule.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/java/com/android/dialer/preferredsim/PreferredSimModule.java b/java/com/android/dialer/preferredsim/PreferredSimModule.java
new file mode 100644
index 000000000..bdc6a5a13
--- /dev/null
+++ b/java/com/android/dialer/preferredsim/PreferredSimModule.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.dialer.preferredsim;
+
+import com.android.dialer.preferredsim.impl.PreferredAccountWorkerImpl;
+import dagger.Binds;
+import dagger.Module;
+
+/** Module for preferred SIM */
+@Module
+public abstract class PreferredSimModule {
+
+ @Binds
+ public abstract PreferredAccountWorker to(PreferredAccountWorkerImpl impl);
+}