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

Commit 358f5589 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7695811 from 3ac7cfd3 to sc-qpr1-release

Change-Id: I7ae95fb2f21f23cb0dfba620b315165fe6fa642e
parents 9ceaf99a 3ac7cfd3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.util.Log;

import com.android.internal.annotations.GuardedBy;

import java.util.Objects;
import java.util.Set;

/**
@@ -86,6 +87,12 @@ public class Account implements Parcelable {
        if (TextUtils.isEmpty(type)) {
            throw new IllegalArgumentException("the type must not be empty: " + type);
        }
        if (name.length() > 200) {
            throw new IllegalArgumentException("account name is longer than 200 characters");
        }
        if (type.length() > 200) {
            throw new IllegalArgumentException("account type is longer than 200 characters");
        }
        this.name = name;
        this.type = type;
        this.accessId = accessId;
+17 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ public final class GameManager {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Returns a list of supported game modes for a given package.
     * <p>
@@ -151,4 +152,20 @@ public final class GameManager {
        }
    }

    /**
     * Returns if ANGLE is enabled for a given package.
     * <p>
     * The caller must have {@link android.Manifest.permission#MANAGE_GAME_MODE}.
     *
     * @hide
     */
    @UserHandleAware
    @RequiresPermission(Manifest.permission.MANAGE_GAME_MODE)
    public @GameMode boolean isAngleEnabled(@NonNull String packageName) {
        try {
            return mService.getAngleEnabled(packageName, mContext.getUserId());
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -23,4 +23,5 @@ interface IGameManagerService {
    int getGameMode(String packageName, int userId);
    void setGameMode(String packageName, int gameMode, int userId);
    int[] getAvailableGameModes(String packageName);
    boolean getAngleEnabled(String packageName, int userId);
}
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
@@ -1329,7 +1329,10 @@ public final class BluetoothDevice implements Parcelable, Attributable {
            if (alias == null) {
                return getName();
            }
            return alias;
            return alias
                    .replace('\t', ' ')
                    .replace('\n', ' ')
                    .replace('\r', ' ');
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
        }
+3 −3
Original line number Diff line number Diff line
@@ -3195,7 +3195,7 @@ public abstract class Context {
     * apps targeting SDK Version {@link android.os.Build.VERSION_CODES#O}
     * or higher are not allowed to start background services from the background.
     * See
     * <a href="{@docRoot}/about/versions/oreo/background">
     * <a href="/about/versions/oreo/background">
     * Background Execution Limits</a>
     * for more details.
     *
@@ -3204,7 +3204,7 @@ public abstract class Context {
     * apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
     * or higher are not allowed to start foreground services from the background.
     * See
     * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
     * <a href="/about/versions/12/behavior-changes-12">
     * Behavior changes: Apps targeting Android 12
     * </a>
     * for more details.
@@ -3258,7 +3258,7 @@ public abstract class Context {
     * apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
     * or higher are not allowed to start foreground services from the background.
     * See
     * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
     * <a href="/about/versions/12/behavior-changes-12">
     * Behavior changes: Apps targeting Android 12
     * </a>
     * for more details.
Loading