diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-23 22:03:13 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-23 22:03:13 +0000 |
commit | d76861b26d0d2ed0688745e3365ca0754e683b14 (patch) | |
tree | 5b7ef765baeb07383f66acf1d5149cf99f191e98 | |
parent | b3f76613e59063577305354117627010696d61e3 (diff) | |
parent | 6685f5212500be05037f67ebfb34c1cd4e0d85f9 (diff) | |
download | appindexing-studio-2022.1.1-canary.tar.gz |
Snap for 8758061 from 6685f5212500be05037f67ebfb34c1cd4e0d85f9 to studio-ee-releasestudio-2022.1.1-rc3studio-2022.1.1-canarystudio-2022.1.1-beta4studio-2022.1.1-beta2studio-2022.1.1studio-canarystudio-2022.1.1-canary
Change-Id: If381bb0b72d46f7b9a01f6c814137190ad3b01bf
-rw-r--r-- | src/com/google/appindexing/ui/AppIndexingDialog.java | 20 | ||||
-rw-r--r-- | src/com/google/appindexing/ui/CheckErrorDialog.java | 17 |
2 files changed, 23 insertions, 14 deletions
diff --git a/src/com/google/appindexing/ui/AppIndexingDialog.java b/src/com/google/appindexing/ui/AppIndexingDialog.java index 4fb2328..3c4d5e4 100644 --- a/src/com/google/appindexing/ui/AppIndexingDialog.java +++ b/src/com/google/appindexing/ui/AppIndexingDialog.java @@ -44,14 +44,21 @@ import com.intellij.ui.ListCellRendererWrapper; import com.intellij.ui.SortedComboBoxModel; import com.intellij.ui.TextFieldWithHistory; import com.intellij.ui.components.JBTextField; +import java.awt.Font; +import java.util.List; +import javax.swing.ButtonGroup; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JTextField; +import javax.swing.plaf.basic.BasicComboBoxEditor; import org.jetbrains.android.facet.AndroidFacet; import org.jetbrains.annotations.NotNull; -import javax.swing.*; -import javax.swing.plaf.basic.BasicComboBoxEditor; -import java.awt.*; -import java.util.List; - /** * A dialog which setup config and start a Fetch as Google task. */ @@ -117,7 +124,8 @@ public class AppIndexingDialog extends DialogWrapper { myLoginButton.addActionListener(e -> { try { myLoginButton.setEnabled(false); - GoogleLogin.promptToLogIn(null, () -> ApplicationManager.getApplication().invokeLater(this::verifyInput, ModalityState.any())); + GoogleLogin.getInstance().logIn(null, + () -> ApplicationManager.getApplication().invokeLater(this::verifyInput, ModalityState.any())); } catch (Exception ex) { getLog().warn("Login fail", ex); diff --git a/src/com/google/appindexing/ui/CheckErrorDialog.java b/src/com/google/appindexing/ui/CheckErrorDialog.java index b71d24a..4df0d40 100644 --- a/src/com/google/appindexing/ui/CheckErrorDialog.java +++ b/src/com/google/appindexing/ui/CheckErrorDialog.java @@ -32,16 +32,16 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.ui.ListCellRendererWrapper; import com.intellij.ui.SortedComboBoxModel; +import java.util.Arrays; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.swing.*; - -import java.util.Arrays; -import java.util.stream.Collector; - -import static com.google.appindexing.ui.AppIndexingDialog.isModuleAccepted; - /** * A dialog for users to select a module and login (if necessary) before checking app indexing errors. */ @@ -91,7 +91,8 @@ public final class CheckErrorDialog extends DialogWrapper { myLoginButton.addActionListener(e -> { try { myLoginButton.setEnabled(false); - GoogleLogin.promptToLogIn(null, () -> ApplicationManager.getApplication().invokeLater(this::verifyInput, ModalityState.any())); + GoogleLogin.getInstance().logIn(null, + () -> ApplicationManager.getApplication().invokeLater(this::verifyInput, ModalityState.any())); } catch (Exception ex) { getLog().warn("Failed to login with your Google developer account.", ex); |