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

Commit bbce34d9 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "API review - move confirm credential constants from Intent" into lmp-dev

parents ce8d3910 75fe9e02
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1109,7 +1109,11 @@
        <!-- Lock screen settings -->
        <activity android:name="ConfirmDeviceCredentialActivity"
            android:exported="true">
            <!-- Use high-priority to prevent an installed activity from masquerading as this one. -->
            <intent-filter>
                <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <!-- TODO: Remove this once new API is being used -->
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.CONFIRM_DEVICE_CREDENTIAL" />
                <category android:name="android.intent.category.DEFAULT" />
+3 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
package com.android.settings;

import android.app.Activity;
import android.app.KeyguardManager;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
@@ -34,8 +35,8 @@ public class ConfirmDeviceCredentialActivity extends Activity {
        super.onCreate(savedInstanceState);

        Intent intent = getIntent();
        String title = intent.getStringExtra(Intent.EXTRA_TITLE);
        String details = intent.getStringExtra(Intent.EXTRA_DETAILS);
        String title = intent.getStringExtra(KeyguardManager.EXTRA_TITLE);
        String details = intent.getStringExtra(KeyguardManager.EXTRA_DESCRIPTION);

        ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
        if (!helper.launchConfirmationActivity(0 /* request code */, title, details)) {