Remove collapsePanels() publicAlternatives

Back when we added Intent.ACSD to publicAlternatives of collapsePanels()
in ag/13035420, we didn't have the complete picture of which use-cases
the Intent.ACSD would remain valid for and I thought there might still
be 3p valid use-cases. Turns out cinek@ was right in that CL.

After finished implementation, there are not 3p valid use-cases for
Intent.ACSD anymore - this is explained in detail in ag/13331897 but
TL;DR; for security reasons we're deprecating the intent and in S the
platform will automatically be responsible for collapsing the shade
where applicable. So, the result is that there are no public
alternatives to collapsePanels() anymore and this is on purpose since
having this capability lead to abuse.

Test: Builds
Bug: 159105552
Change-Id: I5ead6f83d19b00a27498a0ef42b6957667964644
This commit is contained in:
Bernardo Rufino
2021-03-09 14:57:25 +00:00
parent d620cd52cf
commit 5752b1b27b

View File

@@ -331,10 +331,12 @@ public class StatusBarManager {
* @hide
*/
@RequiresPermission(android.Manifest.permission.STATUS_BAR)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, publicAlternatives = "Send {@link "
+ "android.content.Intent#ACTION_CLOSE_SYSTEM_DIALOGS} instead.")
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, publicAlternatives = "This operation"
+ " is not allowed anymore, please see {@link android.content"
+ ".Intent#ACTION_CLOSE_SYSTEM_DIALOGS} for more details.")
@TestApi
public void collapsePanels() {
try {
final IStatusBarService svc = getService();
if (svc != null) {