aboutsummaryrefslogtreecommitdiff
path: root/shadows/framework/src/main/java/org/robolectric/shadows/ShadowFileIntegrityManager.java
blob: f00259319e8fac2311a6446e56cccb57e1e4ab7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.robolectric.shadows;

import static android.os.Build.VERSION_CODES.R;

import android.security.FileIntegrityManager;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;

/** Shadow for {@link FileIntegrityManager}. */
@Implements(value = FileIntegrityManager.class, minSdk = R)
public class ShadowFileIntegrityManager {

  private boolean isApkVeritySupported = true;

  /** Sets the value of {@link #isApkVeritySupported}. */
  public void setIsApkVeritySupported(boolean isApkVeritySupported) {
    this.isApkVeritySupported = isApkVeritySupported;
  }

  /**
   * Returns {@code true} by default, or can be changed by {@link
   * #setIsApkVeritySupported(boolean)}.
   */
  @Implementation
  protected boolean isApkVeritySupported() {
    return isApkVeritySupported;
  }
}