API review - move confirm credential constants from Intent
Moves constants from Intent to KeyguardManager. Fixes bug 17006280 Change-Id: I8ee1f534816a3fe823ad44479e227ba6d3675389
This commit is contained in:
@@ -1109,7 +1109,11 @@
|
|||||||
<!-- Lock screen settings -->
|
<!-- Lock screen settings -->
|
||||||
<activity android:name="ConfirmDeviceCredentialActivity"
|
<activity android:name="ConfirmDeviceCredentialActivity"
|
||||||
android:exported="true">
|
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">
|
<intent-filter android:priority="1000">
|
||||||
<action android:name="android.intent.action.CONFIRM_DEVICE_CREDENTIAL" />
|
<action android:name="android.intent.action.CONFIRM_DEVICE_CREDENTIAL" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
package com.android.settings;
|
package com.android.settings;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.KeyguardManager;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -34,8 +35,8 @@ public class ConfirmDeviceCredentialActivity extends Activity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
String title = intent.getStringExtra(Intent.EXTRA_TITLE);
|
String title = intent.getStringExtra(KeyguardManager.EXTRA_TITLE);
|
||||||
String details = intent.getStringExtra(Intent.EXTRA_DETAILS);
|
String details = intent.getStringExtra(KeyguardManager.EXTRA_DESCRIPTION);
|
||||||
|
|
||||||
ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
|
ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
|
||||||
if (!helper.launchConfirmationActivity(0 /* request code */, title, details)) {
|
if (!helper.launchConfirmationActivity(0 /* request code */, title, details)) {
|
||||||
|
Reference in New Issue
Block a user