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

Commit 3f973b6e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-dabd8cf7-7af2-48e9-a296-ccc6a71cc25d-for-git_oc-m2-release-432...

release-request-dabd8cf7-7af2-48e9-a296-ccc6a71cc25d-for-git_oc-m2-release-4328410 snap-temp-L55300000101694322

Change-Id: I1d28dcf0e28df1be2cbc22af371d05dbbe80f786
parents 28f8d061 07ed6bca
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -12093,6 +12093,18 @@ package android.database.sqlite {
    ctor public SQLiteFullException(java.lang.String);
  }
  public final class SQLiteGlobal {
    method public static java.lang.String getDefaultJournalMode();
    method public static int getDefaultPageSize();
    method public static java.lang.String getDefaultSyncMode();
    method public static int getIdleConnectionTimeout();
    method public static int getJournalSizeLimit();
    method public static int getWALAutoCheckpoint();
    method public static int getWALConnectionPoolSize();
    method public static java.lang.String getWALSyncMode();
    method public static int releaseMemory();
  }
  public class SQLiteMisuseException extends android.database.sqlite.SQLiteException {
    ctor public SQLiteMisuseException();
    ctor public SQLiteMisuseException(java.lang.String);
+40 −24
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.ParceledListSlice;
import android.graphics.Region;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -52,8 +51,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;

import static android.content.pm.PackageManager.FEATURE_FINGERPRINT;

/**
 * Accessibility services should only be used to assist users with disabilities in using
 * Android devices and apps. They run in the background and receive callbacks by the system
@@ -394,7 +391,7 @@ public abstract class AccessibilityService extends Service {
    public static final int SHOW_MODE_AUTO = 0;
    public static final int SHOW_MODE_HIDDEN = 1;

    private int mConnectionId;
    private int mConnectionId = AccessibilityInteractionClient.NO_ID;

    private AccessibilityServiceInfo mInfo;

@@ -1612,7 +1609,7 @@ public abstract class AccessibilityService extends Service {

        private final Callbacks mCallback;

        private int mConnectionId;
        private int mConnectionId = AccessibilityInteractionClient.NO_ID;

        public IAccessibilityServiceClientWrapper(Context context, Looper looper,
                Callbacks callback) {
@@ -1707,7 +1704,8 @@ public abstract class AccessibilityService extends Service {
                    if (event != null) {
                        // Send the event to AccessibilityCache via AccessibilityInteractionClient
                        AccessibilityInteractionClient.getInstance().onAccessibilityEvent(event);
                        if (serviceWantsEvent) {
                        if (serviceWantsEvent
                                && (mConnectionId != AccessibilityInteractionClient.NO_ID)) {
                            // Send the event to AccessibilityService
                            mCallback.onAccessibilityEvent(event);
                        }
@@ -1721,7 +1719,9 @@ public abstract class AccessibilityService extends Service {
                } return;

                case DO_ON_INTERRUPT: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        mCallback.onInterrupt();
                    }
                } return;

                case DO_INIT: {
@@ -1746,8 +1746,10 @@ public abstract class AccessibilityService extends Service {
                } return;

                case DO_ON_GESTURE: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        final int gestureId = message.arg1;
                        mCallback.onGesture(gestureId);
                    }
                } return;

                case DO_CLEAR_ACCESSIBILITY_CACHE: {
@@ -1779,37 +1781,51 @@ public abstract class AccessibilityService extends Service {
                } return;

                case DO_ON_MAGNIFICATION_CHANGED: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        final SomeArgs args = (SomeArgs) message.obj;
                        final Region region = (Region) args.arg1;
                        final float scale = (float) args.arg2;
                        final float centerX = (float) args.arg3;
                        final float centerY = (float) args.arg4;
                        mCallback.onMagnificationChanged(region, scale, centerX, centerY);
                    }
                } return;

                case DO_ON_SOFT_KEYBOARD_SHOW_MODE_CHANGED: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        final int showMode = (int) message.arg1;
                        mCallback.onSoftKeyboardShowModeChanged(showMode);
                    }
                } return;

                case DO_GESTURE_COMPLETE: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        final boolean successfully = message.arg2 == 1;
                        mCallback.onPerformGestureResult(message.arg1, successfully);
                    }
                } return;
                case DO_ON_FINGERPRINT_ACTIVE_CHANGED: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        mCallback.onFingerprintCapturingGesturesChanged(message.arg1 == 1);
                    }
                } return;
                case DO_ON_FINGERPRINT_GESTURE: {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        mCallback.onFingerprintGesture(message.arg1);
                    }
                } return;

                case (DO_ACCESSIBILITY_BUTTON_CLICKED): {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        mCallback.onAccessibilityButtonClicked();
                    }
                } return;

                case (DO_ACCESSIBILITY_BUTTON_AVAILABILITY_CHANGED): {
                    if (mConnectionId != AccessibilityInteractionClient.NO_ID) {
                        final boolean available = (message.arg1 != 0);
                        mCallback.onAccessibilityButtonAvailabilityChanged(available);
                    }
                } return;

                default :
+43 −46
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public final class BluetoothA2dpSink implements BluetoothProfile {

    private Context mContext;
    private ServiceListener mServiceListener;
    private IBluetoothA2dpSink mService;
    private volatile IBluetoothA2dpSink mService;
    private BluetoothAdapter mAdapter;

    final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -239,16 +239,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public boolean connect(BluetoothDevice device) {
        if (DBG) log("connect(" + device + ")");
        if (mService != null && isEnabled() &&
            isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.connect(device);
                return service.connect(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return false;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return false;
    }

@@ -280,16 +280,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public boolean disconnect(BluetoothDevice device) {
        if (DBG) log("disconnect(" + device + ")");
        if (mService != null && isEnabled() &&
            isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.disconnect(device);
                return service.disconnect(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return false;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return false;
    }

@@ -298,15 +298,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public List<BluetoothDevice> getConnectedDevices() {
        if (VDBG) log("getConnectedDevices()");
        if (mService != null && isEnabled()) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled()) {
            try {
                return mService.getConnectedDevices();
                return service.getConnectedDevices();
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return new ArrayList<BluetoothDevice>();
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return new ArrayList<BluetoothDevice>();
    }

@@ -315,15 +316,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
        if (VDBG) log("getDevicesMatchingStates()");
        if (mService != null && isEnabled()) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled()) {
            try {
                return mService.getDevicesMatchingConnectionStates(states);
                return service.getDevicesMatchingConnectionStates(states);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return new ArrayList<BluetoothDevice>();
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return new ArrayList<BluetoothDevice>();
    }

@@ -332,16 +334,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public int getConnectionState(BluetoothDevice device) {
        if (VDBG) log("getState(" + device + ")");
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.getConnectionState(device);
                return service.getConnectionState(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return BluetoothProfile.STATE_DISCONNECTED;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return BluetoothProfile.STATE_DISCONNECTED;
    }

@@ -358,16 +360,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
          public BluetoothAudioConfig getAudioConfig(BluetoothDevice device) {
        if (VDBG) log("getAudioConfig(" + device + ")");
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.getAudioConfig(device);
                return service.getAudioConfig(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return null;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return null;
    }

@@ -388,20 +390,20 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public boolean setPriority(BluetoothDevice device, int priority) {
        if (DBG) log("setPriority(" + device + ", " + priority + ")");
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
            if (priority != BluetoothProfile.PRIORITY_OFF &&
                priority != BluetoothProfile.PRIORITY_ON){
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            if (priority != BluetoothProfile.PRIORITY_OFF
                    && priority != BluetoothProfile.PRIORITY_ON) {
                return false;
            }
            try {
                return mService.setPriority(device, priority);
                return service.setPriority(device, priority);
            } catch (RemoteException e) {
                   Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                   return false;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return false;
    }

@@ -420,16 +422,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     */
    public int getPriority(BluetoothDevice device) {
        if (VDBG) log("getPriority(" + device + ")");
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.getPriority(device);
                return service.getPriority(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return BluetoothProfile.PRIORITY_OFF;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return BluetoothProfile.PRIORITY_OFF;
    }

@@ -441,16 +443,16 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
     * @param device BluetoothDevice device
     */
    public boolean isA2dpPlaying(BluetoothDevice device) {
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
        final IBluetoothA2dpSink service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.isA2dpPlaying(device);
                return service.isA2dpPlaying(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return false;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return false;
    }

@@ -483,7 +485,6 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
        public void onServiceConnected(ComponentName className, IBinder service) {
            if (DBG) Log.d(TAG, "Proxy object connected");
            mService = IBluetoothA2dpSink.Stub.asInterface(Binder.allowBlocking(service));

            if (mServiceListener != null) {
                mServiceListener.onServiceConnected(BluetoothProfile.A2DP_SINK,
                        BluetoothA2dpSink.this);
@@ -499,15 +500,11 @@ public final class BluetoothA2dpSink implements BluetoothProfile {
    };

    private boolean isEnabled() {
       if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true;
       return false;
        return mAdapter.getState() == BluetoothAdapter.STATE_ON;
    }

    private boolean isValidDevice(BluetoothDevice device) {
       if (device == null) return false;

       if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
       return false;
    private static boolean isValidDevice(BluetoothDevice device) {
        return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress());
    }

    private static void log(String msg) {
+29 −30
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.media.MediaMetadata;
import android.media.session.PlaybackState;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
@@ -83,7 +81,7 @@ public final class BluetoothAvrcpController implements BluetoothProfile {

    private Context mContext;
    private ServiceListener mServiceListener;
    private IBluetoothAvrcpController mService;
    private volatile IBluetoothAvrcpController mService;
    private BluetoothAdapter mAdapter;

    final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
@@ -180,15 +178,16 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
     */
    public List<BluetoothDevice> getConnectedDevices() {
        if (VDBG) log("getConnectedDevices()");
        if (mService != null && isEnabled()) {
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled()) {
            try {
                return mService.getConnectedDevices();
                return service.getConnectedDevices();
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return new ArrayList<BluetoothDevice>();
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return new ArrayList<BluetoothDevice>();
    }

@@ -197,15 +196,16 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
     */
    public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
        if (VDBG) log("getDevicesMatchingStates()");
        if (mService != null && isEnabled()) {
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled()) {
            try {
                return mService.getDevicesMatchingConnectionStates(states);
                return service.getDevicesMatchingConnectionStates(states);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return new ArrayList<BluetoothDevice>();
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return new ArrayList<BluetoothDevice>();
    }

@@ -214,16 +214,16 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
     */
    public int getConnectionState(BluetoothDevice device) {
        if (VDBG) log("getState(" + device + ")");
        if (mService != null && isEnabled()
            && isValidDevice(device)) {
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled() && isValidDevice(device)) {
            try {
                return mService.getConnectionState(device);
                return service.getConnectionState(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
                return BluetoothProfile.STATE_DISCONNECTED;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return BluetoothProfile.STATE_DISCONNECTED;
    }

@@ -235,9 +235,10 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
    public BluetoothAvrcpPlayerSettings getPlayerSettings(BluetoothDevice device) {
        if (DBG) Log.d(TAG, "getPlayerSettings");
        BluetoothAvrcpPlayerSettings settings = null;
        if (mService != null && isEnabled()) {
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled()) {
            try {
                settings = mService.getPlayerSettings(device);
                settings = service.getPlayerSettings(device);
            } catch (RemoteException e) {
                Log.e(TAG, "Error talking to BT service in getMetadata() " + e);
                return null;
@@ -252,15 +253,16 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
     */
    public boolean setPlayerApplicationSetting(BluetoothAvrcpPlayerSettings plAppSetting) {
        if (DBG) Log.d(TAG, "setPlayerApplicationSetting");
        if (mService != null && isEnabled()) {
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled()) {
            try {
                return mService.setPlayerApplicationSetting(plAppSetting);
                return service.setPlayerApplicationSetting(plAppSetting);
            } catch (RemoteException e) {
                Log.e(TAG, "Error talking to BT service in setPlayerApplicationSetting() " + e);
                return false;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
        return false;
    }

@@ -269,24 +271,25 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
     * possible keycode values: next_grp, previous_grp defined above
     */
    public void sendGroupNavigationCmd(BluetoothDevice device, int keyCode, int keyState) {
        Log.d(TAG, "sendGroupNavigationCmd dev = " + device + " key " + keyCode + " State = " + keyState);
        if (mService != null && isEnabled()) {
        Log.d(TAG, "sendGroupNavigationCmd dev = " + device + " key " + keyCode + " State = "
                + keyState);
        final IBluetoothAvrcpController service = mService;
        if (service != null && isEnabled()) {
            try {
                mService.sendGroupNavigationCmd(device, keyCode, keyState);
                service.sendGroupNavigationCmd(device, keyCode, keyState);
                return;
            } catch (RemoteException e) {
                Log.e(TAG, "Error talking to BT service in sendGroupNavigationCmd()", e);
                return;
            }
        }
        if (mService == null) Log.w(TAG, "Proxy not attached to service");
        if (service == null) Log.w(TAG, "Proxy not attached to service");
    }

    private final ServiceConnection mConnection = new ServiceConnection() {
        public void onServiceConnected(ComponentName className, IBinder service) {
            if (DBG) Log.d(TAG, "Proxy object connected");
            mService = IBluetoothAvrcpController.Stub.asInterface(Binder.allowBlocking(service));

            if (mServiceListener != null) {
                mServiceListener.onServiceConnected(BluetoothProfile.AVRCP_CONTROLLER,
                        BluetoothAvrcpController.this);
@@ -302,15 +305,11 @@ public final class BluetoothAvrcpController implements BluetoothProfile {
    };

    private boolean isEnabled() {
       if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true;
       return false;
        return mAdapter.getState() == BluetoothAdapter.STATE_ON;
    }

    private boolean isValidDevice(BluetoothDevice device) {
       if (device == null) return false;

       if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
       return false;
    private static boolean isValidDevice(BluetoothDevice device) {
        return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress());
    }

    private static void log(String msg) {
+198 −136

File changed.

Preview size limit exceeded, changes collapsed.

Loading