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

Commit 04538afa authored by Nancy Chen's avatar Nancy Chen
Browse files

Add a general isMarshmallowCompatible method.

Bug: 25776171
Change-Id: I5632f9156a553f00da1220f58d4f059bf94d396d
parent 0d53352b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -83,4 +83,15 @@ public final class CompatUtils {
        return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP)
                >= Build.VERSION_CODES.M;
    }

    /**
     * Determines if this version is compatible with Marshmallow-specific APIs. Can also force the
     * version to be lower through SdkVersionOverride.
     *
     * @return {@code true} if call subject is a feature on this device, {@code false} otherwise.
     */
    public static boolean isMarshmallowCompatible() {
        return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP)
                >= Build.VERSION_CODES.M;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ public class CallSubjectDialog extends Activity {
            };

    /**
     * Show the call subhect dialog given a phone number to dial (e.g. from the dialpad).
     * Show the call subject dialog given a phone number to dial (e.g. from the dialpad).
     *
     * @param activity The activity.
     * @param number The number to dial.