We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7b8333a + 211fcd5 commit 85022e9Copy full SHA for 85022e9
src/com/netease/qa/emmagee/utils/ProcessInfo.java
@@ -210,9 +210,9 @@ public static String getTopActivity(Context context) {
210
ActivityManager manager = (ActivityManager) context
211
.getSystemService(Context.ACTIVITY_SERVICE);
212
// Note: getRunningTasks is deprecated in API 21(Official)
213
-// if (Build.VERSION.SDK_INT >= 21) {
214
-// return Constants.NA;
215
-// }
+ if (Build.VERSION.SDK_INT >= 21) {
+ return Constants.NA;
+ }
216
List<RunningTaskInfo> runningTaskInfos = manager.getRunningTasks(1);
217
if (runningTaskInfos != null)
218
return (runningTaskInfos.get(0).topActivity).toString();
0 commit comments