Prepare Android Studio 3.1 in AOSP
Add profiler prebuilt, remove dependencies on
the closed source C++ plugin, and remove dependency
on project service extension.
Change-Id: I15c8e3ce46099d54e77c17fff0f0d42d11238e3b
diff --git a/android/lib/studio-profiler-grpc-1.0-jarjar.jar b/android/lib/studio-profiler-grpc-1.0-jarjar.jar
new file mode 100644
index 0000000..7b50bfd
--- /dev/null
+++ b/android/lib/studio-profiler-grpc-1.0-jarjar.jar
Binary files differ
diff --git a/android/src/com/android/tools/idea/gradle/structure/AndroidProjectStructureConfigurable.java b/android/src/com/android/tools/idea/gradle/structure/AndroidProjectStructureConfigurable.java
index 46d9897..20856b1 100644
--- a/android/src/com/android/tools/idea/gradle/structure/AndroidProjectStructureConfigurable.java
+++ b/android/src/com/android/tools/idea/gradle/structure/AndroidProjectStructureConfigurable.java
@@ -344,6 +344,15 @@
}
}
+/* Developer services disabled:
+[ 55563] WARN - ture.services.DeveloperService - Caught exception while initializing services
+java.lang.IllegalArgumentException: could not find extension implementation class com.google.services.GoogleServiceLoginListener
+ at com.intellij.openapi.extensions.Extensions.findExtension(Extensions.java:113)
+ at com.google.services.GoogleServiceLoginListener.getInstance(GoogleServiceLoginListener.java:30)
+ at com.google.services.creators.GoogleServiceCreator.initializeContext(GoogleServiceCreator.java:41)
+ at com.android.tools.idea.structure.services.DeveloperServiceCreator.createService(DeveloperServiceCreator.java:174)
+ at com.android.tools.idea.structure.services.DeveloperServices.initializeFor(DeveloperServices.java:65)
+
if (!myProject.isDefault() && moduleList.getSize() > 0) {
// This may not be our first time opening the developer services dialog. User may have
// modified developer service values last time but then pressed cancel. To be safe, we
@@ -370,6 +379,7 @@
myConfigurables.add(new ServiceCategoryConfigurable(moduleList, category));
}
}
+*/
}
// Populate the "Modules" section.
diff --git a/profilers-android/profilers-android.iml b/profilers-android/profilers-android.iml
index c2e960e..afc2fdd 100644
--- a/profilers-android/profilers-android.iml
+++ b/profilers-android/profilers-android.iml
@@ -31,6 +31,5 @@
<orderEntry type="library" scope="TEST" name="truth" level="project" />
<orderEntry type="module" module-name="artwork" />
<orderEntry type="module" module-name="android-adb" />
- <orderEntry type="module" module-name="cidr-lang" />
</component>
</module>
\ No newline at end of file
diff --git a/profilers-android/src/com/android/tools/idea/profilers/stacktrace/IntellijCodeNavigator.java b/profilers-android/src/com/android/tools/idea/profilers/stacktrace/IntellijCodeNavigator.java
index a1bfcba..e80254c 100644
--- a/profilers-android/src/com/android/tools/idea/profilers/stacktrace/IntellijCodeNavigator.java
+++ b/profilers-android/src/com/android/tools/idea/profilers/stacktrace/IntellijCodeNavigator.java
@@ -26,17 +26,9 @@
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.util.ClassUtil;
-import com.intellij.util.Processor;
-import com.jetbrains.cidr.lang.symbols.OCQualifiedName;
-import com.jetbrains.cidr.lang.symbols.OCSymbol;
-import com.jetbrains.cidr.lang.symbols.cpp.OCDeclaratorSymbol;
-import com.jetbrains.cidr.lang.symbols.cpp.OCFunctionSymbol;
-import com.jetbrains.cidr.lang.symbols.symtable.OCGlobalProjectSymbolsCache;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import java.util.List;
-
/**
* A {@link CodeNavigator} with logic to jump to code inside of an IntelliJ code editor.
*/
@@ -107,6 +99,7 @@
// false.
Navigatable[] navigatable = new Navigatable[1]; // Workaround to set the navigatable inside the processor.
+ /* Disabled in AOSP: Depends on closed source code
Processor<OCSymbol> processor = symbol -> {
if (!(symbol instanceof OCFunctionSymbol)) {
return true; // Symbol is not a function. Continue the processing.
@@ -149,7 +142,7 @@
assert location.getMethodName() != null;
OCGlobalProjectSymbolsCache.processByQualifiedName(myProject, processor, location.getMethodName());
-
+*/
return navigatable[0];
}