mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-29 09:58:54 +03:00
Use custom permission for unfiltered broadcast receiver in CallActivity
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
67298a63e6
commit
bb7e82fbcb
3 changed files with 14 additions and 1 deletions
|
@ -83,6 +83,10 @@ android {
|
|||
testInstrumentationRunnerArgument "TEST_SERVER_URL", "${NC_TEST_SERVER_BASEURL}"
|
||||
testInstrumentationRunnerArgument "TEST_SERVER_USERNAME", "${NC_TEST_SERVER_USERNAME}"
|
||||
testInstrumentationRunnerArgument "TEST_SERVER_PASSWORD", "${NC_TEST_SERVER_PASSWORD}"
|
||||
|
||||
def localBroadcastPermission = "com.nextcloud.talk.permission.PRIVATE_BROADCAST"
|
||||
manifestPlaceholders.broadcastPermission = localBroadcastPermission
|
||||
buildConfigField "String", "PERMISSION_LOCAL_BROADCAST", "\"${localBroadcastPermission}\""
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
|
@ -79,6 +79,11 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
|
||||
<permission
|
||||
android:name="${broadcastPermission}"
|
||||
android:protectionLevel="signature" />
|
||||
<uses-permission android:name="${broadcastPermission}"/>
|
||||
|
||||
<application
|
||||
android:name=".application.NextcloudTalkApplication"
|
||||
android:allowBackup="true"
|
||||
|
|
|
@ -52,6 +52,7 @@ import android.widget.RelativeLayout;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.bluelinelabs.logansquare.LoganSquare;
|
||||
import com.nextcloud.talk.BuildConfig;
|
||||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.adapters.ParticipantDisplayItem;
|
||||
import com.nextcloud.talk.adapters.ParticipantsAdapter;
|
||||
|
@ -2555,7 +2556,10 @@ public class CallActivity extends CallBaseActivity {
|
|||
}
|
||||
}
|
||||
};
|
||||
registerReceiver(mReceiver, new IntentFilter(MICROPHONE_PIP_INTENT_NAME));
|
||||
registerReceiver(mReceiver,
|
||||
new IntentFilter(MICROPHONE_PIP_INTENT_NAME),
|
||||
BuildConfig.PERMISSION_LOCAL_BROADCAST,
|
||||
null);
|
||||
|
||||
updateUiForPipMode();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue