Do you guys ever noticed that sometimes a “Ref frame” appear on the screen of your Android phone. If no, then you probably never check the strict mode setting under developer option.

This “Red frame” is caused by the strict mode setting under the developer option. It flashes a red border around the screen when anything does a long operation on the main thread.

Red Frame on screen
Red Frame on screen

Well you guys may think “What’s a main thread now”, Well this explained here:

According to developers.android.com, When an application in your android mobile phone starts, your android phone’s Linux kernel starts a new process for that application by executing a new thread and this only happen when a component of that application is not running. This new thread is called as “Main thread”.

When an application component starts and there is already exists a process for that application (because a component of that particular application already exists), then that component is started under same process with different thread of execution.

By default, all components of same application started under the same process with different threads and most application obey this rule.

What is strict mode?

Strict mode is a developer tool that detects disk read and write and network processes and flashes red frame border on screen or some other indication when it detects any violation with the rules set for different GPU’s processes.

According to developers.android.com, Strict mode is defined as:

Strict Mode (Developer Option)
Strict Mode (Developer Option)

” Strict Mode is a developer tool which detects things you might be doing by accident and brings them to your attention so you can fix them. Strict Mode is most commonly used to catch accidental disk or network access on the application’s main thread, where UI operations are received and animations take place. Keeping disk and network operations off the main thread makes for much smoother, more responsive applications.”

Strict Mode is not found on all android devices. It is a new feature added from Android’s Ice Cream Sandwich and above to assist developers. It doesn’t matter whether you have Samsung, Motorola, HTC, Sony Xperia or Micromax etc., this feature is available on all android phones with operating system Ice Cream Sandwich and above.

So, when you see a red frame flashes on your screen don’t freak out, you probably checked this strict mode option (intentionally or unintentionally).

How to disable Strict mode:

You can disable Strict mode or get rid of red frame flashes, by going to System settings and,

• Open Settings> Developer Options.

•  Find Strict Mode option here,

•  Un-check it,

•  Reboot your system.

And Voila, you are back to normal.

Advertisements