Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e77a9215 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Expose NotificationChannel#setBlockableSystem as SystemApi" am: f3b914bd am: 5dacbd48

Change-Id: Ic90b28b4efa8c744728805f34249f253c53bd427
parents d02143c7 5dacbd48
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
// Signature format: 2.0
package android.app {

  public final class NotificationChannel implements android.os.Parcelable {
    method public void setBlockableSystem(boolean);
  }

}
+2 −0
Original line number Diff line number Diff line
@@ -320,8 +320,10 @@ package android.app {
  }

  public final class NotificationChannel implements android.os.Parcelable {
    method public boolean isBlockableSystem();
    method public boolean isImportanceLockedByCriticalDeviceFunction();
    method public boolean isImportanceLockedByOEM();
    method public void setBlockableSystem(boolean);
    method public void setImportanceLockedByCriticalDeviceFunction(boolean);
    method public void setImportanceLockedByOEM(boolean);
  }
+9 −1
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
package android.app;

import static android.annotation.SystemApi.Client.MODULE_APPS;

import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
@@ -317,9 +319,14 @@ public final class NotificationChannel implements Parcelable {
    }

    /**
     * Allows users to block notifications sent through this channel, if this channel belongs to
     * a package that is signed with the system signature. If the channel does not belong to a
     * package that is signed with the system signature, this method does nothing.
     * @param blockableSystem if {@code true}, allows users to block notifications on this channel.
     * @hide
     */
    @UnsupportedAppUsage
    @SystemApi(client = MODULE_APPS)
    @TestApi
    public void setBlockableSystem(boolean blockableSystem) {
        mBlockableSystem = blockableSystem;
    }
@@ -639,6 +646,7 @@ public final class NotificationChannel implements Parcelable {
    /**
     * @hide
     */
    @TestApi
    public boolean isBlockableSystem() {
        return mBlockableSystem;
    }