Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does android:exported="false" restrict system calls/access?

Tags:

android

I know that setting android:exported="false" will restrict other applications from using/accessing my application components.
Does setting this attribute will restrict the system as well from using/accessing my components? i doubt.

for example, i have the following receiver:

   <receiver
        android:name="ConnectivityManager"
        android:label="NetworkConnection"
        android:exported = "false" >
        <intent-filter>
            <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
        </intent-filter>
    </receiver>

The receiver is still receiving broadcasts from the system once the connection state changes (on/of).

Does this mean that the system calls/access can never be stopped? Please illustrate.

like image 266
Strider007 Avatar asked May 03 '13 07:05

Strider007


2 Answers

Google‘s online document does not describe this clearly.

From the real result, the receiver can still be triggered by system broadcast even if set exported="false".

like image 178
posaidong Avatar answered Sep 22 '22 21:09

posaidong


Yes, if exported="false", it will still respond to system broadcasts such as connectivity changes. This is easy to test by using your above broadcast-receiver and toggling airplane mode

like image 32
Andrew Flynn Avatar answered Sep 20 '22 21:09

Andrew Flynn