Skip to content

Commit baf8711

Browse files
jreckAndroid Git Automerger
authored andcommitted
Merge branch 'master' of ssh://android-git:29418/platform/frameworks/base
2 parents c351ab4 + 79425fd commit baf8711

File tree

5 files changed

+12
-71
lines changed

5 files changed

+12
-71
lines changed

core/java/android/nfc/NfcAdapter.java

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -767,61 +767,6 @@ public void disableForegroundNdefPush(Activity activity) {
767767
mNfcActivityManager.setOnNdefPushCompleteCallback(activity, null);
768768
}
769769

770-
/**
771-
* TODO: Remove this once pre-built apk's (Maps, Youtube etc) are updated
772-
* @deprecated use {@link CreateNdefMessageCallback} or {@link OnNdefPushCompleteCallback}
773-
* @hide
774-
*/
775-
@Deprecated
776-
public interface NdefPushCallback {
777-
/**
778-
* @deprecated use {@link CreateNdefMessageCallback} instead
779-
*/
780-
@Deprecated
781-
NdefMessage createMessage();
782-
/**
783-
* @deprecated use{@link OnNdefPushCompleteCallback} instead
784-
*/
785-
@Deprecated
786-
void onMessagePushed();
787-
}
788-
789-
/**
790-
* TODO: Remove this
791-
* Converts new callbacks to old callbacks.
792-
*/
793-
static final class LegacyCallbackWrapper implements CreateNdefMessageCallback,
794-
OnNdefPushCompleteCallback {
795-
final NdefPushCallback mLegacyCallback;
796-
LegacyCallbackWrapper(NdefPushCallback legacyCallback) {
797-
mLegacyCallback = legacyCallback;
798-
}
799-
@Override
800-
public void onNdefPushComplete(NfcEvent event) {
801-
mLegacyCallback.onMessagePushed();
802-
}
803-
@Override
804-
public NdefMessage createNdefMessage(NfcEvent event) {
805-
return mLegacyCallback.createMessage();
806-
}
807-
}
808-
809-
/**
810-
* TODO: Remove this once pre-built apk's (Maps, Youtube etc) are updated
811-
* @deprecated use {@link #setNdefPushMessageCallback} instead
812-
* @hide
813-
*/
814-
@Deprecated
815-
public void enableForegroundNdefPush(Activity activity, final NdefPushCallback callback) {
816-
if (activity == null || callback == null) {
817-
throw new NullPointerException();
818-
}
819-
enforceResumed(activity);
820-
LegacyCallbackWrapper callbackWrapper = new LegacyCallbackWrapper(callback);
821-
mNfcActivityManager.setNdefPushMessageCallback(activity, callbackWrapper);
822-
mNfcActivityManager.setOnNdefPushCompleteCallback(activity, callbackWrapper);
823-
}
824-
825770
/**
826771
* Enable NDEF Push feature.
827772
* <p>This API is for the Settings application.

core/java/android/os/StrictMode.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import java.io.PrintWriter;
3636
import java.io.StringWriter;
3737
import java.util.ArrayList;
38-
import java.util.Collections;
3938
import java.util.HashMap;
4039
import java.util.Map;
4140
import java.util.concurrent.atomic.AtomicInteger;
@@ -902,22 +901,22 @@ public static boolean conditionallyEnableDebugLogging() {
902901
return false;
903902
}
904903

904+
// Thread policy controls BlockGuard.
905905
int threadPolicyMask = StrictMode.DETECT_DISK_WRITE |
906906
StrictMode.DETECT_DISK_READ |
907907
StrictMode.DETECT_NETWORK;
908908

909909
if (!IS_USER_BUILD) {
910910
threadPolicyMask |= StrictMode.PENALTY_DROPBOX;
911-
if (IS_ENG_BUILD) {
912-
threadPolicyMask |= StrictMode.PENALTY_LOG;
913-
}
914911
}
915912
if (doFlashes) {
916913
threadPolicyMask |= StrictMode.PENALTY_FLASH;
917914
}
918915

919916
StrictMode.setThreadPolicyMask(threadPolicyMask);
920917

918+
// VM Policy controls CloseGuard, detection of Activity leaks,
919+
// and instance counting.
921920
if (IS_USER_BUILD) {
922921
setCloseGuardEnabled(false);
923922
} else {

core/java/android/widget/AdapterView.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,15 +922,20 @@ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
922922
if (selectedView != null) {
923923
event.setEnabled(selectedView.isEnabled());
924924
}
925+
event.setCurrentItemIndex(getSelectedItemPosition());
925926
event.setFromIndex(getFirstVisiblePosition());
926927
event.setToIndex(getLastVisiblePosition());
927928
event.setItemCount(getAdapter().getCount());
928929
}
929930

930931
private boolean isScrollableForAccessibility() {
931-
final int itemCount = getAdapter().getCount();
932-
return itemCount > 0
933-
&& (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
932+
T adapter = getAdapter();
933+
if (adapter != null) {
934+
final int itemCount = adapter.getCount();
935+
return itemCount > 0
936+
&& (getFirstVisiblePosition() > 0 || getLastVisiblePosition() < itemCount - 1);
937+
}
938+
return false;
934939
}
935940

936941
@Override

data/keyboards/keyboards.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,3 @@ PRODUCT_COPY_FILES += $(foreach file,$(keycharmaps),\
2424

2525
PRODUCT_COPY_FILES += $(foreach file,$(keyconfigs),\
2626
frameworks/base/data/keyboards/$(file):system/usr/idc/$(file))
27-
28-
PRODUCT_PACKAGES := $(keylayouts) $(keycharmaps) $(keyconfigs)
29-

policy/src/com/android/internal/policy/impl/GlobalActions.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import android.app.Activity;
2020
import android.app.AlertDialog;
21-
import android.app.StatusBarManager;
2221
import android.content.BroadcastReceiver;
2322
import android.content.Context;
2423
import android.content.DialogInterface;
@@ -57,8 +56,6 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
5756

5857
private static final String TAG = "GlobalActions";
5958

60-
private StatusBarManager mStatusBar;
61-
6259
private final Context mContext;
6360
private final AudioManager mAudioManager;
6461

@@ -103,13 +100,12 @@ public void showDialog(boolean keyguardShowing, boolean isDeviceProvisioned) {
103100
mKeyguardShowing = keyguardShowing;
104101
mDeviceProvisioned = isDeviceProvisioned;
105102
if (mDialog == null) {
106-
mStatusBar = (StatusBarManager)mContext.getSystemService(Context.STATUS_BAR_SERVICE);
107103
mDialog = createDialog();
108104
}
109105
prepareDialog();
110106

111-
mStatusBar.disable(StatusBarManager.DISABLE_EXPAND);
112107
mDialog.show();
108+
mDialog.getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_DISABLE_EXPAND);
113109
}
114110

115111
/**
@@ -249,7 +245,6 @@ private void prepareDialog() {
249245

250246
/** {@inheritDoc} */
251247
public void onDismiss(DialogInterface dialog) {
252-
mStatusBar.disable(StatusBarManager.DISABLE_NONE);
253248
}
254249

255250
/** {@inheritDoc} */

0 commit comments

Comments
 (0)