1. Are you ready for the Galaxy S20? Here is everything we know so far!

CM9 Rom Disable Recent Apps

Discussion in 'Android Devices' started by hokiescoot, Dec 18, 2013.

  1. hokiescoot

    hokiescoot Member
    Thread Starter

    If you hold down the Home button it brings up a list of Recent Apps. You can swipe these away to clear them. When my phone is acting wacky I found that going into Settings, Apps, Running, the apps in the Recent Apps list is cycling every second on the same line. If I press home and swipe these away they are removed from the Running apps in Settings and the phone is fine. I would like to disable the recent apps function to eliminate this problem. I would like to know how to do this on our CM9. I found a thread elsewhere that shows how to do this, but I do not know where or what file to edit on the Elite. Here is a copy past of the thread I found. Can someone explain how to do this on the Elite?

    This will close the RecentActivity dialog. Put it in your activity class.
    @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (!hasFocus) { windowCloseHandler.postDelayed(windowCloserRunnable, 250); } } private void toggleRecents() { Intent closeRecents = new Intent("com.android.systemui.recent.action.TOGGLE_RECENTS"); closeRecents.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); ComponentName recents = new ComponentName("com.android.systemui", "com.android.systemui.recent.RecentsActivity"); closeRecents.setComponent(recents); this.startActivity(closeRecents); } private Handler windowCloseHandler = new Handler(); private Runnable windowCloserRunnable = new Runnable() { @Override public void run() { ActivityManager am = (ActivityManager)getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE); ComponentName cn = am.getRunningTasks(1).get(0).topActivity; if (cn != null && cn.getClassName().equals("com.android.systemui.recent.RecentsActivity")) { toggleRecents(); } } } You will need to put the following permission in your manifest.
    <uses-permission android:name="android.permission.GET_TASKS" />
     



    1. Download the Forums for Android™ app!


      Download

       

LG Optimus Elite Forum

The LG Optimus Elite release date was May 2012. Features and Specs include a 3.5" inch screen, 5MP camera, 512GB RAM, Snapdragon S2 processor, and 1520mAh battery.

May 2012
Release Date
0
Reviews
Loading...
Similar Threads - CM9 Rom Disable
  1. SpanDragon18
    Replies:
    2
    Views:
    944
  2. krakengz
    Replies:
    4
    Views:
    508
  3. N4ty_Kitty
    Replies:
    2
    Views:
    4,097
  4. LuckyBit33
    Replies:
    4
    Views:
    1,528
  5. kisame010588
    Replies:
    0
    Views:
    1,952
  6. kisame010588
    Replies:
    5
    Views:
    1,211
  7. kisame010588
    Replies:
    1
    Views:
    808
  8. Vii Cards
    Replies:
    2
    Views:
    2,322
  9. realname8940
    Replies:
    2
    Views:
    4,598
  10. Hedwig7s
    Replies:
    0
    Views:
    1,063

Share This Page

Loading...