Catch quick settings tile exceptions (#7006)
The exception gets thrown if AntennaPod is installed in a work profile.
This commit is contained in:
parent
8177875674
commit
ac8e8137bb
|
@ -44,7 +44,7 @@ android {
|
|||
}
|
||||
|
||||
lint {
|
||||
disable "GradleDependency"
|
||||
disable "GradleDependency", "OutdatedLibrary"
|
||||
checkDependencies true
|
||||
warningsAsErrors true
|
||||
abortOnError true
|
||||
|
|
|
@ -867,8 +867,12 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
TileService.requestListeningState(getApplicationContext(),
|
||||
new ComponentName(getApplicationContext(), QuickSettingsTileService.class));
|
||||
try {
|
||||
TileService.requestListeningState(getApplicationContext(),
|
||||
new ComponentName(getApplicationContext(), QuickSettingsTileService.class));
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.d(TAG, "Skipping quick settings tile setup");
|
||||
}
|
||||
}
|
||||
|
||||
IntentUtils.sendLocalBroadcast(getApplicationContext(), ACTION_PLAYER_STATUS_CHANGED);
|
||||
|
|
Loading…
Reference in New Issue