summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/Presenter.java
diff options
context:
space:
mode:
authorChiao Cheng <chiaocheng@google.com>2013-07-23 13:30:19 -0700
committerChiao Cheng <chiaocheng@google.com>2013-07-24 14:52:07 -0700
commit241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88 (patch)
treeaa2557f1634ef7c2cb30f46ff4b807f02222b751 /src/com/android/incallui/Presenter.java
parent4747d3bfd809847c1a1b83d3e558e3091d6e995c (diff)
downloadpackages_apps_InCallUI-241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88.tar.gz
packages_apps_InCallUI-241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88.tar.bz2
packages_apps_InCallUI-241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88.zip
Integrating mute and speaker buttons.
* Adding base classes for presenter, ui and fragments. * Moved common presenter integration logic into base fragment. * Adding presenter to handle button logic. * Integrated disconnect and text from glowpad to presenter. * Changed in-call buttons to be invisible so they do not show under transparent glowpad. Change-Id: I446db149769b5cf1abce960ecede01effeabfe1e
Diffstat (limited to 'src/com/android/incallui/Presenter.java')
-rw-r--r--src/com/android/incallui/Presenter.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/com/android/incallui/Presenter.java b/src/com/android/incallui/Presenter.java
new file mode 100644
index 00000000..d4024d53
--- /dev/null
+++ b/src/com/android/incallui/Presenter.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2013 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.incallui;
+
+/**
+ * Base class for Presenters.
+ */
+public abstract class Presenter<U extends Ui> {
+
+ private U mUi;
+
+ /**
+ * Called after the UI view has been created. That is when fragment.onViewCreated() is called.
+ *
+ * @param ui The Ui implementation that is now ready to be used.
+ */
+ public void onUiReady(U ui) {
+ mUi = ui;
+ }
+
+ public U getUi() {
+ return mUi;
+ }
+}