Commit 9cac1f4f authored by Bastien Le Querrec's avatar Bastien Le Querrec

Start the permissions' verification on boot and on updates

parent f9c24771
......@@ -422,13 +422,16 @@
</provider>
<receiver android:enabled="true"
android:name=".service.BootReceiver">
<receiver android:name=".service.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="org.smssecure.smssecure.RESTART"/>
</intent-filter>
</receiver>
</application>
......
......@@ -12,13 +12,8 @@ public class BootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if((Intent.ACTION_PACKAGE_REPLACED.equals(intent.getAction()) ||
Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) &&
intent.getData().getSchemeSpecificPart().equals(context.getPackageName()))
{
Log.w(TAG, "onReceive()");
WelcomeActivity.checkForPermissions(context, intent);
}
Log.w(TAG, "onReceive()");
WelcomeActivity.checkForPermissions(context, intent);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment