Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e723d93 authored by Walter Jang's avatar Walter Jang
Browse files

Added optional uses-feature telephony to enable tablet installs (1/3)

Also, just use the Manifest.permission constants directly in
QuickContactActivity instead of referencing them through
the Activity that asks the user for dessired permissions.

Bug 30000144

Change-Id: I56da60bf54cdf5118500e9717b0980425f02c467
parent 3a2fe3b2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@
    <!-- Following used for Contact metadata syncing -->
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />

    <uses-feature android:name="android.hardware.telephony" required="false"/>

    <application
        android:name="com.android.contacts.ContactsApplication"
        android:label="@string/applicationLabel"
+5 −4
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.contacts.quickcontact;

import android.Manifest;
import android.accounts.Account;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
@@ -957,16 +958,16 @@ public class QuickContactActivity extends ContactsActivity
        // 3. App has permission.
        // Permission explanation card is displayed only for case 1.
        final boolean hasCalendarPermission = PermissionsUtil.hasPermission(
                this, RequestDesiredPermissionsActivity.DESIRED_PERMISSIONS[0]);
                this, Manifest.permission.READ_CALENDAR);
        final boolean hasSMSPermission = PermissionsUtil.hasPermission(
                this, RequestDesiredPermissionsActivity.DESIRED_PERMISSIONS[1]);
                this, Manifest.permission.READ_SMS);

        final boolean wasCalendarPermissionDenied =
                ActivityCompat.shouldShowRequestPermissionRationale(
                        this, RequestDesiredPermissionsActivity.DESIRED_PERMISSIONS[0]);
                        this, Manifest.permission.READ_CALENDAR);
        final boolean wasSMSPermissionDenied =
                ActivityCompat.shouldShowRequestPermissionRationale(
                        this, RequestDesiredPermissionsActivity.DESIRED_PERMISSIONS[1]);
                        this, Manifest.permission.READ_SMS);

        final boolean shouldDisplayCalendarMessage =
                !hasCalendarPermission && !wasCalendarPermissionDenied;