Send a broadcast when turning grayscale off
When users turn grayscale off in Settings, Settings will send an intent to receivers who have requested the CONTROL_DISPLAY_COLOR_TRANSFORMS permission. We also specify FLAG_RECIEVER_INCLUDE_BACKGROUND to make sure that the intent could be sent to manifest receivers. Bug: 118387886 Test: robotests Change-Id: Ib0c959e72dd4068014951347df35409790c77ab5
This commit is contained in:
@@ -113,8 +113,8 @@ public class GrayscaleConditionController implements ConditionalCardController {
|
||||
}
|
||||
|
||||
private void sendBroadcast() {
|
||||
final Intent intent = new Intent();
|
||||
intent.setAction(ACTION_GRAYSCALE_CHANGED);
|
||||
final Intent intent = new Intent(ACTION_GRAYSCALE_CHANGED);
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
||||
mAppContext.sendBroadcast(intent, Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user