Skip to content

Commit 80c477c

Browse files
minaripenguinneobuddy89
authored andcommitted
Launcher3: Open running services activity when clicking meminfo view
Signed-off-by: minaripenguin <[email protected]> Signed-off-by: Pranav Vashi <[email protected]>
1 parent ff8752c commit 80c477c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

quickstep/src/com/android/quickstep/views/MemInfoView.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import android.app.ActivityManager;
2323
import android.content.Context;
24+
import android.content.Intent;
2425
import android.os.Handler;
2526
import android.os.Looper;
2627
import android.util.AttributeSet;
@@ -83,6 +84,7 @@ public MemInfoView(Context context, AttributeSet attrs) {
8384
mWorker = new MemInfoWorker();
8485

8586
mMemInfoText = context.getResources().getString(R.string.meminfo_text);
87+
setListener(context);
8688
}
8789

8890
/* Hijack this method to detect visibility rather than
@@ -148,6 +150,15 @@ private void updateMemInfoText(long availMemMiB, long totalMemMiB) {
148150
setText(text);
149151
}
150152

153+
public void setListener(Context context) {
154+
setOnClickListener(view -> {
155+
Intent intent = new Intent(Intent.ACTION_MAIN);
156+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
157+
intent.setClassName("com.android.settings", "com.android.settings.Settings$DevRunningServicesActivity");
158+
context.startActivity(intent);
159+
});
160+
}
161+
151162
private class MemInfoWorker implements Runnable {
152163
@Override
153164
public void run() {

0 commit comments

Comments
 (0)