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

Commit 36087f25 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-bbc747ae-190b-4d38-8704-432aa6396c16-for-git_oc-mr1-release-43...

release-request-bbc747ae-190b-4d38-8704-432aa6396c16-for-git_oc-mr1-release-4351869 snap-temp-L93800000104806132

Change-Id: I019eb49ff564543fafa12f41ca35ceb75bb3a8fa
parents 1fb2af43 204346c2
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ import android.text.style.TextAppearanceSpan;
import android.util.ArraySet;
import android.util.Log;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.NotificationHeaderView;
import android.view.View;
@@ -3899,7 +3898,6 @@ public class Notification implements Parcelable
            if (p.title != null) {
                contentView.setViewVisibility(R.id.title, View.VISIBLE);
                contentView.setTextViewText(R.id.title, processTextSpans(p.title));
                updateTextSizePrimary(contentView, R.id.title);
                if (!p.ambient) {
                    setTextViewColorPrimary(contentView, R.id.title);
                }
@@ -3911,7 +3909,6 @@ public class Notification implements Parcelable
                int textId = showProgress ? com.android.internal.R.id.text_line_1
                        : com.android.internal.R.id.text;
                contentView.setTextViewText(textId, processTextSpans(p.text));
                updateTextSizeSecondary(contentView, textId);
                if (!p.ambient) {
                    setTextViewColorSecondary(contentView, textId);
                }
@@ -3923,25 +3920,6 @@ public class Notification implements Parcelable
            return contentView;
        }

        private void updateTextSizeSecondary(RemoteViews contentView, int textId) {
            updateTextSizeColorized(contentView, textId,
                    com.android.internal.R.dimen.notification_text_size_colorized,
                    com.android.internal.R.dimen.notification_text_size);
        }

        private void updateTextSizePrimary(RemoteViews contentView, int textId) {
            updateTextSizeColorized(contentView, textId,
                    com.android.internal.R.dimen.notification_title_text_size_colorized,
                    com.android.internal.R.dimen.notification_title_text_size);
        }

        private void updateTextSizeColorized(RemoteViews contentView, int textId,
                int colorizedDimen, int normalDimen) {
            int size = mContext.getResources().getDimensionPixelSize(isColorized()
                    ? colorizedDimen : normalDimen);
            contentView.setTextViewTextSize(textId, TypedValue.COMPLEX_UNIT_PX, size);
        }

        private CharSequence processTextSpans(CharSequence text) {
            if (hasForegroundColor()) {
                return NotificationColorUtil.clearColorSpans(text);
@@ -5867,7 +5845,6 @@ public class Notification implements Parcelable
            builder.setTextViewColorSecondary(contentView, R.id.big_text);
            contentView.setViewVisibility(R.id.big_text,
                    TextUtils.isEmpty(bigTextText) ? View.GONE : View.VISIBLE);
            builder.updateTextSizeSecondary(contentView, R.id.big_text);
            contentView.setBoolean(R.id.big_text, "setHasImage", builder.mN.hasLargeIcon());
        }
    }
@@ -6201,7 +6178,6 @@ public class Notification implements Parcelable
                contentView.setViewVisibility(rowId, View.VISIBLE);
                contentView.setTextViewText(rowId, mBuilder.processTextSpans(
                        makeMessageLine(m, mBuilder)));
                mBuilder.updateTextSizeSecondary(contentView, rowId);
                mBuilder.setTextViewColorSecondary(contentView, rowId);

                if (contractedMessage == m) {
@@ -6569,7 +6545,6 @@ public class Notification implements Parcelable
                    contentView.setViewVisibility(rowIds[i], View.VISIBLE);
                    contentView.setTextViewText(rowIds[i],
                            mBuilder.processTextSpans(mBuilder.processLegacyText(str)));
                    mBuilder.updateTextSizeSecondary(contentView, rowIds[i]);
                    mBuilder.setTextViewColorSecondary(contentView, rowIds[i]);
                    contentView.setViewPadding(rowIds[i], 0, topPadding, 0, 0);
                    handleInboxImageMargin(contentView, rowIds[i], first);
+23 −3
Original line number Diff line number Diff line
@@ -17,10 +17,13 @@ package android.service.carrier;
import android.annotation.CallSuper;
import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.util.Log;

import com.android.internal.telephony.ITelephonyRegistry;

@@ -48,6 +51,8 @@ import com.android.internal.telephony.ITelephonyRegistry;
 */
public abstract class CarrierService extends Service {

    private static final String LOG_TAG = "CarrierService";

    public static final String CARRIER_SERVICE_INTERFACE = "android.service.carrier.CarrierService";

    private static ITelephonyRegistry sRegistry;
@@ -133,11 +138,26 @@ public abstract class CarrierService extends Service {
    /**
     * A wrapper around ICarrierService that forwards calls to implementations of
     * {@link CarrierService}.
     * @hide
     */
    private class ICarrierServiceWrapper extends ICarrierService.Stub {
    public class ICarrierServiceWrapper extends ICarrierService.Stub {
        /** @hide */
        public static final int RESULT_OK = 0;
        /** @hide */
        public static final int RESULT_ERROR = 1;
        /** @hide */
        public static final String KEY_CONFIG_BUNDLE = "config_bundle";

        @Override
        public PersistableBundle getCarrierConfig(CarrierIdentifier id) {
            return CarrierService.this.onLoadConfig(id);
        public void getCarrierConfig(CarrierIdentifier id, ResultReceiver result) {
            try {
                Bundle data = new Bundle();
                data.putParcelable(KEY_CONFIG_BUNDLE, CarrierService.this.onLoadConfig(id));
                result.send(RESULT_OK, data);
            } catch (Exception e) {
                Log.e(LOG_TAG, "Error in onLoadConfig: " + e.getMessage(), e);
                result.send(RESULT_ERROR, null);
            }
        }
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.service.carrier;

import android.os.PersistableBundle;
import android.os.ResultReceiver;
import android.service.carrier.CarrierIdentifier;

/**
@@ -28,5 +29,5 @@ import android.service.carrier.CarrierIdentifier;
interface ICarrierService {

    /** @see android.service.carrier.CarrierService#onLoadConfig */
    PersistableBundle getCarrierConfig(in CarrierIdentifier id);
    oneway void getCarrierConfig(in CarrierIdentifier id, in ResultReceiver result);
}
+24 −8
Original line number Diff line number Diff line
@@ -61,7 +61,10 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
    // This value will be set to 0 as soon as the first tab is added to TabHost.
    private int mSelectedTab = -1;

    @Nullable
    private Drawable mLeftStrip;

    @Nullable
    private Drawable mRightStrip;

    private boolean mDrawBottomStrips = true;
@@ -374,24 +377,37 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
        final Drawable leftStrip = mLeftStrip;
        final Drawable rightStrip = mRightStrip;

        if (leftStrip != null) {
            leftStrip.setState(selectedChild.getDrawableState());
        }
        if (rightStrip != null) {
            rightStrip.setState(selectedChild.getDrawableState());
        }

        if (mStripMoved) {
            final Rect bounds = mBounds;
            bounds.left = selectedChild.getLeft();
            bounds.right = selectedChild.getRight();
            final int myHeight = getHeight();
            if (leftStrip != null) {
                leftStrip.setBounds(Math.min(0, bounds.left - leftStrip.getIntrinsicWidth()),
                        myHeight - leftStrip.getIntrinsicHeight(), bounds.left, myHeight);
            }
            if (rightStrip != null) {
                rightStrip.setBounds(bounds.right, myHeight - rightStrip.getIntrinsicHeight(),
                    Math.max(getWidth(), bounds.right + rightStrip.getIntrinsicWidth()), myHeight);
                        Math.max(getWidth(), bounds.right + rightStrip.getIntrinsicWidth()),
                        myHeight);
            }
            mStripMoved = false;
        }

        if (leftStrip != null) {
            leftStrip.draw(canvas);
        }
        if (rightStrip != null) {
            rightStrip.draw(canvas);
        }
    }

    /**
     * Sets the current tab.
+3 −3
Original line number Diff line number Diff line
@@ -484,14 +484,14 @@ static jint LegacyCameraDevice_nativeDetectSurfaceUsageFlags(JNIEnv* env, jobjec

    sp<ANativeWindow> anw;
    if ((anw = getNativeWindow(env, surface)) == NULL) {
        jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
        jniThrowException(env, "java/lang/UnsupportedOperationException;",
            "Could not retrieve native window from surface.");
        return BAD_VALUE;
    }
    int32_t usage = 0;
    status_t err = anw->query(anw.get(), NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage);
    if(err != NO_ERROR) {
        jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
        jniThrowException(env, "java/lang/UnsupportedOperationException;",
            "Error while querying surface usage bits");
        return err;
    }
@@ -511,7 +511,7 @@ static jint LegacyCameraDevice_nativeDisconnectSurface(JNIEnv* env, jobject thiz

    status_t err = native_window_api_disconnect(anw.get(), NATIVE_WINDOW_API_CAMERA);
    if(err != NO_ERROR) {
        jniThrowException(env, "Ljava/lang/UnsupportedOperationException;",
        jniThrowException(env, "java/lang/UnsupportedOperationException;",
            "Error while disconnecting surface");
        return err;
    }
Loading