From 56f0ff3c48c88b969d9bf5e62eb1ee590e03e461 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Thu, 13 Aug 2015 16:29:33 -0700 Subject: Make "Ask every time" actually work that way ..in link-opening behavior. If a candidate is marked as "ask every time," then the user is guaranteed to get a disambiguation prompt including that candidate even when some other candidate app is in the "always prefer this over a browser" state. Bug 23147746 Change-Id: I904d8697a992b3f16f32b1c1b49c2bf9424c7137 --- cmds/pm/src/com/android/commands/pm/Pm.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmds') diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index b39376c..9f385fe 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -19,6 +19,7 @@ package com.android.commands.pm; import static android.content.pm.PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED; import static android.content.pm.PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK; import static android.content.pm.PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS; +import static android.content.pm.PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK; import static android.content.pm.PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER; import android.app.ActivityManager; @@ -840,7 +841,7 @@ public final class Pm { return Integer.toString(result); } - // pm set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined} + // pm set-app-link [--user USER_ID] PACKAGE {always|ask|always-ask|never|undefined} private int runSetAppLink() { int userId = UserHandle.USER_OWNER; @@ -889,6 +890,10 @@ public final class Pm { newMode = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK; break; + case "always-ask": + newMode = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK; + break; + case "never": newMode = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER; break; -- cgit v1.1