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

Skip to content
Commit 95b10567 authored by T.J. Mercier's avatar T.J. Mercier
Browse files

Return error code when there's an error starting an activity

When an error occurs while attempting to start an activity,
runStartActivity does not always return an error code like it should.
This causes tools like the simpleperf app profiler to have incorrect
behavior:

$ system/extras/simpleperf/scripts/app_profiler.py -p com.google.android.youtube -a doesntexist
18:08:45,394 [DEBUG] (simpleperf_utils.py:304) run adb cmd: ['adb', 'shell', 'am', 'start', '-n', 'com.google.android.youtube/doesntexist']  [result True]
<Blocks forever>

Immediately return an error code in these cases like elsewhere in the
function.

Bug: 294402973
Test: $ system/extras/simpleperf/scripts/app_profiler.py -p com.google.android.youtube -a doesntexist
Test: 17:39:26,843 [DEBUG] (simpleperf_utils.py:304) run adb cmd: ['adb', 'shell', 'am', 'start', '-n', 'com.google.android.youtube/doesntexist']  [result False]
Test: Can't start activity com.google.android.youtube/doesntexist
Change-Id: If1ebbde6ee77b27b8d6fa7d4097163d3b4594389
parent 6f74b260
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment