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

Commit baf87116 authored by John Reck's avatar John Reck Committed by Android Git Automerger
Browse files
parents c351ab47 79425fd6
Loading
Loading
Loading
Loading
+0 −55
Original line number Diff line number Diff line
@@ -767,61 +767,6 @@ public final class NfcAdapter {
        mNfcActivityManager.setOnNdefPushCompleteCallback(activity, null);
    }

    /**
     * TODO: Remove this once pre-built apk's (Maps, Youtube etc) are updated
     * @deprecated use {@link CreateNdefMessageCallback} or {@link OnNdefPushCompleteCallback}
     * @hide
     */
    @Deprecated
    public interface NdefPushCallback {
        /**
         * @deprecated use {@link CreateNdefMessageCallback} instead
         */
        @Deprecated
        NdefMessage createMessage();
        /**
         * @deprecated use{@link OnNdefPushCompleteCallback} instead
         */
        @Deprecated
        void onMessagePushed();
    }

    /**
     * TODO: Remove this
     * Converts new callbacks to old callbacks.
     */
    static final class LegacyCallbackWrapper implements CreateNdefMessageCallback,
            OnNdefPushCompleteCallback {
        final NdefPushCallback mLegacyCallback;
        LegacyCallbackWrapper(NdefPushCallback legacyCallback) {
            mLegacyCallback = legacyCallback;
        }
        @Override
        public void onNdefPushComplete(NfcEvent event) {
            mLegacyCallback.onMessagePushed();
        }
        @Override
        public NdefMessage createNdefMessage(NfcEvent event) {
            return mLegacyCallback.createMessage();
        }
    }

    /**
     * TODO: Remove this once pre-built apk's (Maps, Youtube etc) are updated
     * @deprecated use {@link #setNdefPushMessageCallback} instead
     * @hide
     */
    @Deprecated
    public void enableForegroundNdefPush(Activity activity, final NdefPushCallback callback) {
        if (activity == null || callback == null) {
            throw new NullPointerException();
        }
        enforceResumed(activity);
        LegacyCallbackWrapper callbackWrapper = new LegacyCallbackWrapper(callback);
        mNfcActivityManager.setNdefPushMessageCallback(activity, callbackWrapper);
        mNfcActivityManager.setOnNdefPushCompleteCallback(activity, callbackWrapper);
    }

    /**
     * Enable NDEF Push feature.
     * <p>This API is for the Settings application.
+3 −4
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import dalvik.system.VMDebug;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@@ -902,15 +901,13 @@ public final class StrictMode {
            return false;
        }

        // Thread policy controls BlockGuard.
        int threadPolicyMask = StrictMode.DETECT_DISK_WRITE |
                StrictMode.DETECT_DISK_READ |
                StrictMode.DETECT_NETWORK;

        if (!IS_USER_BUILD) {
            threadPolicyMask |= StrictMode.PENALTY_DROPBOX;
            if (IS_ENG_BUILD) {
                threadPolicyMask |= StrictMode.PENALTY_LOG;
            }
        }
        if (doFlashes) {
            threadPolicyMask |= StrictMode.PENALTY_FLASH;
@@ -918,6 +915,8 @@ public final class StrictMode {

        StrictMode.setThreadPolicyMask(threadPolicyMask);

        // VM Policy controls CloseGuard, detection of Activity leaks,
        // and instance counting.
        if (IS_USER_BUILD) {
            setCloseGuardEnabled(false);
        } else {
+8 −3
Original line number Diff line number Diff line
@@ -922,16 +922,21 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
        if (selectedView != null) {
            event.setEnabled(selectedView.isEnabled());
        }
        event.setCurrentItemIndex(getSelectedItemPosition());
        event.setFromIndex(getFirstVisiblePosition());
        event.setToIndex(getLastVisiblePosition());
        event.setItemCount(getAdapter().getCount());
    }

    private boolean isScrollableForAccessibility() {
        final int itemCount = getAdapter().getCount();
        T adapter = getAdapter();
        if (adapter != null) {
            final int itemCount = adapter.getCount();
            return itemCount > 0
                && (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
        }
        return false;
    }

    @Override
    protected boolean canAnimate() {
+0 −3
Original line number Diff line number Diff line
@@ -24,6 +24,3 @@ PRODUCT_COPY_FILES += $(foreach file,$(keycharmaps),\

PRODUCT_COPY_FILES += $(foreach file,$(keyconfigs),\
    frameworks/base/data/keyboards/$(file):system/usr/idc/$(file))

PRODUCT_PACKAGES := $(keylayouts) $(keycharmaps) $(keyconfigs)
+1 −6
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.internal.policy.impl;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.StatusBarManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -57,8 +56,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac

    private static final String TAG = "GlobalActions";

    private StatusBarManager mStatusBar;

    private final Context mContext;
    private final AudioManager mAudioManager;

@@ -103,13 +100,12 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
        mKeyguardShowing = keyguardShowing;
        mDeviceProvisioned = isDeviceProvisioned;
        if (mDialog == null) {
            mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
            mDialog = createDialog();
        }
        prepareDialog();

        mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
        mDialog.show();
        mDialog.getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_DISABLE_EXPAND);
    }

    /**
@@ -249,7 +245,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac

    /** {@inheritDoc} */
    public void onDismiss(DialogInterface dialog) {
        mStatusBar.disable(StatusBarManager.DISABLE_NONE);
    }

    /** {@inheritDoc} */