diff options
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r-- | java/com/android/incallui/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | java/com/android/incallui/InCallActivity.java | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml index a98cc91d2..3d5aa1ceb 100644 --- a/java/com/android/incallui/AndroidManifest.xml +++ b/java/com/android/incallui/AndroidManifest.xml @@ -28,6 +28,9 @@ reset state of the app. --> <uses-permission android:name="android.permission.STATUS_BAR"/> <uses-permission android:name="android.permission.CAMERA"/> + + <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> + <!-- Warning: setting the required boolean to true would prevent installation of Dialer on devices which do not support a camera. --> <uses-feature diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index 990560674..535b894f6 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -822,7 +822,11 @@ public class InCallActivity extends TransactionSafeFragmentActivity public boolean isDialpadVisible() { DialpadFragment dialpadFragment = getDialpadFragment(); - return dialpadFragment != null && dialpadFragment.getUserVisibleHint(); + return dialpadFragment != null + && dialpadFragment.isAdded() + && !dialpadFragment.isHidden() + && dialpadFragment.getView() != null + && dialpadFragment.getUserVisibleHint(); } /** Returns the {@link DialpadFragment} that's shown by this activity, or {@code null} */ |