mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 13:05:31 +03:00
Merge pull request #2148 from nextcloud/fix/callactivity-receiver
Use custom permission for unfiltered broadcast receiver in CallActivity
This commit is contained in:
commit
c4d9105613
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