summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/DialtactsActivity.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-09-18 12:54:59 -0700
committerYorke Lee <yorkelee@google.com>2015-09-22 09:47:04 -0700
commit762b357ec94aef3e7ee6f991c553aa950840a8bc (patch)
treeae5834a64f7f38fe8698c166156d92f9c9f0c06f /src/com/android/dialer/DialtactsActivity.java
parenta5dd7f93654181ebf927723d19e2f84a7e4c6ceb (diff)
Protect against more Telecom privileged operations
Make sure that all invocations of TelecomManager methods that could possibly require a permission are protected by a permission check. Some of these are overcautious - for example, the UI should never show the option to return to a call (READ_PHONE_STATE) if we didn't detect an active call (READ_PHONE_STATE) in the first place, so it is not strictly necessary to protect against the former. But not crashing is the most preferable of all options. Bug: 20266292 Change-Id: Id91dd16e34320a5e607f91dbce9a4296025eeaaf
Diffstat (limited to 'src/com/android/dialer/DialtactsActivity.java')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index f8fb17f6b..fe828a3bb 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -34,7 +34,6 @@ import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.telecom.PhoneAccount;
-import android.telecom.TelecomManager;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@@ -370,7 +369,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
TouchPointManager.getInstance().setPoint((int) ev.getRawX(), (int) ev.getRawY());
}
return super.dispatchTouchEvent(ev);
-
}
@Override
@@ -929,7 +927,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
final boolean callKey = Intent.ACTION_CALL_BUTTON.equals(intent.getAction());
if (callKey) {
- getTelecomManager().showInCallScreen(false);
+ TelecomUtil.showInCallScreen(this, false);
return true;
}
@@ -1340,10 +1338,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
public void onPageScrollStateChanged(int state) {
}
- private TelecomManager getTelecomManager() {
- return (TelecomManager) getSystemService(Context.TELECOM_SERVICE);
- }
-
@Override
public boolean isActionBarShowing() {
return mActionBarController.isActionBarShowing();