Loading services/autofill/java/com/android/server/autofill/ui/SaveUi.java +15 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.metrics.LogMaker; Loading Loading @@ -187,7 +188,10 @@ final class SaveUi { context = new ContextThemeWrapper(context, mThemeId) { @Override public void startActivity(Intent intent) { if (intent.resolveActivity(getPackageManager()) == null) { if (resolveActivity(intent) == null) { if (sDebug) { Slog.d(TAG, "Can not startActivity for save UI with intent=" + intent); } return; } intent.putExtra(AutofillManager.EXTRA_RESTORE_CROSS_ACTIVITY, true); Loading @@ -199,6 +203,16 @@ final class SaveUi { // Apply restore mechanism startIntentSenderWithRestore(p, intent); } private ComponentName resolveActivity(Intent intent) { final PackageManager packageManager = getPackageManager(); final ComponentName componentName = intent.resolveActivity(packageManager); if (componentName != null) { return componentName; } intent.addFlags(Intent.FLAG_ACTIVITY_MATCH_EXTERNAL); return intent.resolveActivity(packageManager); } }; final LayoutInflater inflater = LayoutInflater.from(context); final View view = inflater.inflate(R.layout.autofill_save, null); Loading Loading
services/autofill/java/com/android/server/autofill/ui/SaveUi.java +15 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.metrics.LogMaker; Loading Loading @@ -187,7 +188,10 @@ final class SaveUi { context = new ContextThemeWrapper(context, mThemeId) { @Override public void startActivity(Intent intent) { if (intent.resolveActivity(getPackageManager()) == null) { if (resolveActivity(intent) == null) { if (sDebug) { Slog.d(TAG, "Can not startActivity for save UI with intent=" + intent); } return; } intent.putExtra(AutofillManager.EXTRA_RESTORE_CROSS_ACTIVITY, true); Loading @@ -199,6 +203,16 @@ final class SaveUi { // Apply restore mechanism startIntentSenderWithRestore(p, intent); } private ComponentName resolveActivity(Intent intent) { final PackageManager packageManager = getPackageManager(); final ComponentName componentName = intent.resolveActivity(packageManager); if (componentName != null) { return componentName; } intent.addFlags(Intent.FLAG_ACTIVITY_MATCH_EXTERNAL); return intent.resolveActivity(packageManager); } }; final LayoutInflater inflater = LayoutInflater.from(context); final View view = inflater.inflate(R.layout.autofill_save, null); Loading