Loading core/java/android/speech/RecognitionService.java +26 −10 Original line number Diff line number Diff line Loading @@ -33,10 +33,13 @@ import android.os.Binder; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.util.Log; import com.android.internal.util.function.pooled.PooledLambda; import java.lang.ref.WeakReference; import java.util.Objects; Loading Loading @@ -225,6 +228,27 @@ public abstract class RecognitionService extends Service { */ protected abstract void onStopListening(Callback listener); @Override public Context createContext(@NonNull ContextParams contextParams) { if (contextParams.getNextAttributionSource() != null) { if (mHandler.getLooper().equals(Looper.myLooper())) { handleAttributionContextCreation(contextParams.getNextAttributionSource()); } else { mHandler.sendMessage( PooledLambda.obtainMessage(this::handleAttributionContextCreation, contextParams.getNextAttributionSource())); } } return super.createContext(contextParams); } private void handleAttributionContextCreation(@NonNull AttributionSource attributionSource) { if (mCurrentCallback != null && mCurrentCallback.mCallingAttributionSource.equals(attributionSource)) { mCurrentCallback.mAttributionContextCreated = true; } } @Override public final IBinder onBind(final Intent intent) { if (DBG) Log.d(TAG, "onBind, intent=" + intent); Loading @@ -249,6 +273,7 @@ public abstract class RecognitionService extends Service { private final IRecognitionListener mListener; private final @NonNull AttributionSource mCallingAttributionSource; private @Nullable Context mAttributionContext; private boolean mAttributionContextCreated; private Callback(IRecognitionListener listener, @NonNull AttributionSource attributionSource) { Loading Loading @@ -421,7 +446,7 @@ public abstract class RecognitionService extends Service { } private boolean checkPermissionAndStartDataDelivery() { if (isPerformingDataDelivery()) { if (mCurrentCallback.mAttributionContextCreated) { return true; } if (PermissionChecker.checkPermissionAndStartDataDelivery( Loading @@ -441,13 +466,4 @@ public abstract class RecognitionService extends Service { mCurrentCallback.getAttributionContextForCaller().getAttributionSource()); } } @SuppressWarnings("ConstantCondition") private boolean isPerformingDataDelivery() { final int op = AppOpsManager.permissionToOpCode(Manifest.permission.RECORD_AUDIO); final AppOpsManager appOpsManager = getSystemService(AppOpsManager.class); return appOpsManager.isProxying(op, getAttributionTag(), mCurrentCallback.getCallingAttributionSource().getUid(), mCurrentCallback.getCallingAttributionSource().getPackageName()); } } core/java/android/uwb/AdapterStateListener.java +6 −9 Original line number Diff line number Diff line Loading @@ -108,16 +108,13 @@ public class AdapterStateListener extends IUwbAdapterStateCallbacks.Stub { */ public void setEnabled(boolean isEnabled) { synchronized (this) { if (!mIsRegistered) { return; } else { try { mAdapter.setEnabled(isEnabled); } catch (RemoteException e) { Log.w(TAG, "Failed to set adapter state"); throw e.rethrowFromSystemServer(); } } } } Loading core/res/res/values-es-rCO/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources> core/res/res/values-es-rCR/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources> core/res/res/values-es-rEC/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources> Loading
core/java/android/speech/RecognitionService.java +26 −10 Original line number Diff line number Diff line Loading @@ -33,10 +33,13 @@ import android.os.Binder; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.util.Log; import com.android.internal.util.function.pooled.PooledLambda; import java.lang.ref.WeakReference; import java.util.Objects; Loading Loading @@ -225,6 +228,27 @@ public abstract class RecognitionService extends Service { */ protected abstract void onStopListening(Callback listener); @Override public Context createContext(@NonNull ContextParams contextParams) { if (contextParams.getNextAttributionSource() != null) { if (mHandler.getLooper().equals(Looper.myLooper())) { handleAttributionContextCreation(contextParams.getNextAttributionSource()); } else { mHandler.sendMessage( PooledLambda.obtainMessage(this::handleAttributionContextCreation, contextParams.getNextAttributionSource())); } } return super.createContext(contextParams); } private void handleAttributionContextCreation(@NonNull AttributionSource attributionSource) { if (mCurrentCallback != null && mCurrentCallback.mCallingAttributionSource.equals(attributionSource)) { mCurrentCallback.mAttributionContextCreated = true; } } @Override public final IBinder onBind(final Intent intent) { if (DBG) Log.d(TAG, "onBind, intent=" + intent); Loading @@ -249,6 +273,7 @@ public abstract class RecognitionService extends Service { private final IRecognitionListener mListener; private final @NonNull AttributionSource mCallingAttributionSource; private @Nullable Context mAttributionContext; private boolean mAttributionContextCreated; private Callback(IRecognitionListener listener, @NonNull AttributionSource attributionSource) { Loading Loading @@ -421,7 +446,7 @@ public abstract class RecognitionService extends Service { } private boolean checkPermissionAndStartDataDelivery() { if (isPerformingDataDelivery()) { if (mCurrentCallback.mAttributionContextCreated) { return true; } if (PermissionChecker.checkPermissionAndStartDataDelivery( Loading @@ -441,13 +466,4 @@ public abstract class RecognitionService extends Service { mCurrentCallback.getAttributionContextForCaller().getAttributionSource()); } } @SuppressWarnings("ConstantCondition") private boolean isPerformingDataDelivery() { final int op = AppOpsManager.permissionToOpCode(Manifest.permission.RECORD_AUDIO); final AppOpsManager appOpsManager = getSystemService(AppOpsManager.class); return appOpsManager.isProxying(op, getAttributionTag(), mCurrentCallback.getCallingAttributionSource().getUid(), mCurrentCallback.getCallingAttributionSource().getPackageName()); } }
core/java/android/uwb/AdapterStateListener.java +6 −9 Original line number Diff line number Diff line Loading @@ -108,16 +108,13 @@ public class AdapterStateListener extends IUwbAdapterStateCallbacks.Stub { */ public void setEnabled(boolean isEnabled) { synchronized (this) { if (!mIsRegistered) { return; } else { try { mAdapter.setEnabled(isEnabled); } catch (RemoteException e) { Log.w(TAG, "Failed to set adapter state"); throw e.rethrowFromSystemServer(); } } } } Loading
core/res/res/values-es-rCO/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources>
core/res/res/values-es-rCR/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources>
core/res/res/values-es-rEC/donottranslate-cldr.xml 0 → 100755 +8 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="month_day_year">%-e %B %Y</string> <string name="time_of_day">%H:%M:%S</string> <string name="date_and_time">%-e %b %Y, %H:%M:%S</string> <string name="date_time">%1$s, %2$s</string> </resources>