Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bc59bb0 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Use Android Q compatible external dir

We previously used Environment.getExternalDir to obtain the output dir for the tests. However, since Android Q this method is deprecated and returns an invalid path, leading to errors. Replace this method for context.getExternalDir(null) that return a Q  friendly path.

Test: atest FlickerTests
Bug: 161341377
Change-Id: I5389ac6116b2b74fb19417683dbcfca604ca5b58
parent 6429892e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.server.wm.flicker">

    <uses-sdk android:minSdkVersion="27" android:targetSdkVersion="27"/>
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29"/>
    <!-- Read and write traces from external storage -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
        <option name="hidden-api-checks" value="false" />
    </test>
    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys" value="/sdcard/flicker" />
        <option name="directory-keys" value="/storage/emulated/0/Android/data/com.android.server.wm.flicker/files" />
        <option name="collect-on-run-ended-only" value="true" />
        <option name="clean-up" value="true" />
    </metrics_collector>
+2 −2
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.server.wm.flicker.testapp">

    <uses-sdk android:minSdkVersion="17"
         android:targetSdkVersion="27"/>
    <uses-sdk android:minSdkVersion="29"
         android:targetSdkVersion="29"/>
    <application android:allowBackup="false"
         android:supportsRtl="true">
        <activity android:name=".SimpleActivity"