diff options
author | Yabin Cui <yabinc@google.com> | 2021-11-04 09:26:28 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2021-11-05 15:51:33 -0700 |
commit | 788fa4183441f4977ddbd5a055e42a7fe7691d21 (patch) | |
tree | d0157b2ae0df580f39930698dae7dbb361eed835 /simpleperf/demo/CppApi | |
parent | f1ce5ed2a95c864ba06cade6556daa9f0f323bb9 (diff) | |
download | extras-788fa4183441f4977ddbd5a055e42a7fe7691d21.tar.gz |
simpleperf: update app_api and api_profiler.py.
Update app_api interface to check persist properties.
Update api_profiler.py to use new options in api-prepare cmd.
Also refactor api_profiler.py to move functions inside ApiProfiler
class.
Also update build config of demo packages.
Also update test apk files. Apk files targeting prev Q are removed,
Because Android Studio already recommends targeting Android 11.
Bug: 204601121
Test: run scripts/test/test.py -p TestApiProfiler*
Change-Id: I91c3a9f1a5cfeb528af27b1a0648812541121ae3
Diffstat (limited to 'simpleperf/demo/CppApi')
-rw-r--r-- | simpleperf/demo/CppApi/.gitignore | 2 | ||||
-rw-r--r-- | simpleperf/demo/CppApi/app/build.gradle | 4 | ||||
-rw-r--r-- | simpleperf/demo/CppApi/app/src/main/AndroidManifest.xml | 1 | ||||
-rw-r--r-- | simpleperf/demo/CppApi/build.gradle | 2 | ||||
-rw-r--r-- | simpleperf/demo/CppApi/gradle/wrapper/gradle-wrapper.properties | 6 |
5 files changed, 9 insertions, 6 deletions
diff --git a/simpleperf/demo/CppApi/.gitignore b/simpleperf/demo/CppApi/.gitignore index 09b993d0..7101d91e 100644 --- a/simpleperf/demo/CppApi/.gitignore +++ b/simpleperf/demo/CppApi/.gitignore @@ -6,3 +6,5 @@ /build /captures .externalNativeBuild +.cxx +release diff --git a/simpleperf/demo/CppApi/app/build.gradle b/simpleperf/demo/CppApi/app/build.gradle index 46866964..dd2f172d 100644 --- a/simpleperf/demo/CppApi/app/build.gradle +++ b/simpleperf/demo/CppApi/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + compileSdkVersion 30 defaultConfig { applicationId "simpleperf.demo.cpp_api" // Simpleperf suggests running on Android >= N. // (https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#why-we-suggest-profiling-on-android-n-devices) minSdkVersion 24 - targetSdkVersion 28 + targetSdkVersion 30 versionCode 1 versionName "1.0" externalNativeBuild { diff --git a/simpleperf/demo/CppApi/app/src/main/AndroidManifest.xml b/simpleperf/demo/CppApi/app/src/main/AndroidManifest.xml index 26b51b30..633ebfb8 100644 --- a/simpleperf/demo/CppApi/app/src/main/AndroidManifest.xml +++ b/simpleperf/demo/CppApi/app/src/main/AndroidManifest.xml @@ -9,6 +9,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> + <profileable android:shell="true" /> <activity android:name=".MainActivity" android:exported="true"> <intent-filter> diff --git a/simpleperf/demo/CppApi/build.gradle b/simpleperf/demo/CppApi/build.gradle index 9ce834aa..416b90cc 100644 --- a/simpleperf/demo/CppApi/build.gradle +++ b/simpleperf/demo/CppApi/build.gradle @@ -4,7 +4,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.1' + classpath 'com.android.tools.build:gradle:4.2.2' } } diff --git a/simpleperf/demo/CppApi/gradle/wrapper/gradle-wrapper.properties b/simpleperf/demo/CppApi/gradle/wrapper/gradle-wrapper.properties index a677278e..cddfac7e 100644 --- a/simpleperf/demo/CppApi/gradle/wrapper/gradle-wrapper.properties +++ b/simpleperf/demo/CppApi/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Feb 14 15:10:26 PST 2019 +#Thu Nov 04 10:39:12 PDT 2021 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip +zipStoreBase=GRADLE_USER_HOME |