Merge "get rid of MemoryHeapPmem"
diff --git a/api/16.txt b/api/16.txt
index be544de..357d618 100644
--- a/api/16.txt
+++ b/api/16.txt
@@ -27303,7 +27303,6 @@
method public boolean onTextContextMenuItem(int);
method public void removeTextChangedListener(android.text.TextWatcher);
method protected void resetResolvedDrawables();
- method protected void resetResolvedLayoutDirection();
method protected void resolveDrawables();
method protected void resolveTextDirection();
method public void setAllCaps(boolean);
diff --git a/api/current.txt b/api/current.txt
index 137b672..8af75db 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -7616,11 +7616,11 @@
}
public class DrmStore {
- ctor public DrmStore();
+ ctor public deprecated DrmStore();
}
public static class DrmStore.Action {
- ctor public DrmStore.Action();
+ ctor public deprecated DrmStore.Action();
field public static final int DEFAULT = 0; // 0x0
field public static final int DISPLAY = 7; // 0x7
field public static final int EXECUTE = 6; // 0x6
@@ -7641,7 +7641,7 @@
}
public static class DrmStore.DrmObjectType {
- ctor public DrmStore.DrmObjectType();
+ ctor public deprecated DrmStore.DrmObjectType();
field public static final int CONTENT = 1; // 0x1
field public static final int RIGHTS_OBJECT = 2; // 0x2
field public static final int TRIGGER_OBJECT = 3; // 0x3
@@ -7649,7 +7649,7 @@
}
public static class DrmStore.Playback {
- ctor public DrmStore.Playback();
+ ctor public deprecated DrmStore.Playback();
field public static final int PAUSE = 2; // 0x2
field public static final int RESUME = 3; // 0x3
field public static final int START = 0; // 0x0
@@ -7657,7 +7657,7 @@
}
public static class DrmStore.RightsStatus {
- ctor public DrmStore.RightsStatus();
+ ctor public deprecated DrmStore.RightsStatus();
field public static final int RIGHTS_EXPIRED = 2; // 0x2
field public static final int RIGHTS_INVALID = 1; // 0x1
field public static final int RIGHTS_NOT_ACQUIRED = 3; // 0x3
@@ -7668,7 +7668,8 @@
ctor public DrmSupportInfo();
method public void addFileSuffix(java.lang.String);
method public void addMimeType(java.lang.String);
- method public java.lang.String getDescriprition();
+ method public deprecated java.lang.String getDescriprition();
+ method public java.lang.String getDescription();
method public java.util.Iterator<java.lang.String> getFileSuffixIterator();
method public java.util.Iterator<java.lang.String> getMimeTypeIterator();
method public void setDescription(java.lang.String);
@@ -27659,7 +27660,6 @@
method public boolean onTextContextMenuItem(int);
method public void removeTextChangedListener(android.text.TextWatcher);
method protected void resetResolvedDrawables();
- method protected void resetResolvedLayoutDirection();
method protected void resolveDrawables();
method public void setAllCaps(boolean);
method public final void setAutoLinkMask(int);
diff --git a/cmds/stagefright/SimplePlayer.cpp b/cmds/stagefright/SimplePlayer.cpp
index f269e80..fac3a8c 100644
--- a/cmds/stagefright/SimplePlayer.cpp
+++ b/cmds/stagefright/SimplePlayer.cpp
@@ -396,7 +396,7 @@
for (size_t i = 0; i < mStateByTrackIndex.size(); ++i) {
CodecState *state = &mStateByTrackIndex.editValueAt(i);
- CHECK_EQ(state->mCodec->stop(), (status_t)OK);
+ CHECK_EQ(state->mCodec->release(), (status_t)OK);
}
mStartTimeRealUs = -1ll;
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp
index b850190..fbf800c 100644
--- a/cmds/stagefright/codec.cpp
+++ b/cmds/stagefright/codec.cpp
@@ -295,7 +295,7 @@
for (size_t i = 0; i < stateByTrack.size(); ++i) {
CodecState *state = &stateByTrack.editValueAt(i);
- CHECK_EQ((status_t)OK, state->mCodec->stop());
+ CHECK_EQ((status_t)OK, state->mCodec->release());
}
return 0;
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5d1d461..d4b9a36 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3986,6 +3986,12 @@
dalvik.system.VMRuntime.getRuntime().clearGrowthLimit();
}
+ // allow disk access during application and provider setup. this could
+ // block processing ordered broadcasts, but later processing would
+ // probably end up doing the same disk access. restore not guarded with
+ // finally block, since exceptions here will take down the application.
+ final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskWrites();
+
// If the app is being launched for full backup or restore, bring it up in
// a restricted environment with the base application class.
Application app = data.info.makeApplication(data.restrictedBackupMode, null);
@@ -3993,7 +3999,7 @@
// don't bring up providers in restricted mode; they may depend on the
// app's custom Application class
- if (!data.restrictedBackupMode){
+ if (!data.restrictedBackupMode) {
List<ProviderInfo> providers = data.providers;
if (providers != null) {
installContentProviders(app, providers);
@@ -4012,6 +4018,8 @@
+ ": " + e.toString(), e);
}
}
+
+ StrictMode.setThreadPolicy(savedPolicy);
}
/*package*/ final void finishInstrumentation(int resultCode, Bundle results) {
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java
index e8c0239..dc8c71b7 100644
--- a/core/java/android/view/animation/Animation.java
+++ b/core/java/android/view/animation/Animation.java
@@ -913,7 +913,7 @@
*
* @param interpolatedTime The value of the normalized time (0.0 to 1.0)
* after it has been run through the interpolation function.
- * @param t The Transofrmation object to fill in with the current
+ * @param t The Transformation object to fill in with the current
* transforms.
*/
protected void applyTransformation(float interpolatedTime, Transformation t) {
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 89aba3c..7ec5398 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -152,6 +152,15 @@
}
/**
+ * Called when this InputConnection is no longer used by the InputMethodManager.
+ *
+ * @hide
+ */
+ protected void reportFinish() {
+ // Intentionaly empty
+ }
+
+ /**
* Default implementation uses
* {@link MetaKeyKeyListener#clearMetaKeyState(long, int)
* MetaKeyKeyListener.clearMetaKeyState(long, int)} to clear the state.
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index b6b27c1..3b6ebbe 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -708,6 +708,10 @@
public void reportFinishInputConnection(InputConnection ic) {
if (mServedInputConnection != ic) {
ic.finishComposingText();
+ // To avoid modifying the public InputConnection interface
+ if (ic instanceof BaseInputConnection) {
+ ((BaseInputConnection) ic).reportFinish();
+ }
}
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 8618510..af3bb4d 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -378,6 +378,7 @@
private int mInputType;
private int mImeOptions;
private String mHint;
+ private int mMaxLength;
public WebViewInputConnection() {
super(WebView.this, true);
@@ -412,13 +413,9 @@
Editable editable = getEditable();
int selectionStart = Selection.getSelectionStart(editable);
int selectionEnd = Selection.getSelectionEnd(editable);
+ text = limitReplaceTextByMaxLength(text, editable.length());
editable.replace(0, editable.length(), text);
- InputMethodManager imm = InputMethodManager.peekInstance();
- if (imm != null) {
- // Since the text has changed, do not allow the IME to replace the
- // existing text as though it were a completion.
- imm.restartInput(WebView.this);
- }
+ restartInput();
// Keep the previous selection.
selectionStart = Math.min(selectionStart, editable.length());
selectionEnd = Math.min(selectionEnd, editable.length());
@@ -429,14 +426,10 @@
Editable editable = getEditable();
int selectionStart = Selection.getSelectionStart(editable);
int selectionEnd = Selection.getSelectionEnd(editable);
+ text = limitReplaceTextByMaxLength(text, selectionEnd - selectionStart);
setNewText(selectionStart, selectionEnd, text);
editable.replace(selectionStart, selectionEnd, text);
- InputMethodManager imm = InputMethodManager.peekInstance();
- if (imm != null) {
- // Since the text has changed, do not allow the IME to replace the
- // existing text as though it were a completion.
- imm.restartInput(WebView.this);
- }
+ restartInput();
// Move caret to the end of the new text
int newCaret = selectionStart + text.length();
setSelection(newCaret, newCaret);
@@ -456,8 +449,19 @@
end = start;
start = temp;
}
- setNewText(start, end, text);
- return super.setComposingText(text, newCursorPosition);
+ CharSequence limitedText = limitReplaceTextByMaxLength(text, end - start);
+ setNewText(start, end, limitedText);
+ if (limitedText != text) {
+ newCursorPosition -= text.length() - limitedText.length();
+ }
+ super.setComposingText(limitedText, newCursorPosition);
+ if (limitedText != text) {
+ restartInput();
+ int lastCaret = start + limitedText.length();
+ finishComposingText();
+ setSelection(lastCaret, lastCaret);
+ }
+ return true;
}
@Override
@@ -573,6 +577,7 @@
mHint = initData.mLabel;
mInputType = inputType;
mImeOptions = imeOptions;
+ mMaxLength = initData.mMaxLength;
}
public void setupEditorInfo(EditorInfo outAttrs) {
@@ -660,6 +665,29 @@
KeyCharacterMap.VIRTUAL_KEYBOARD, 0,
KeyEvent.FLAG_SOFT_KEYBOARD));
}
+
+ private CharSequence limitReplaceTextByMaxLength(CharSequence text,
+ int numReplaced) {
+ if (mMaxLength > 0) {
+ Editable editable = getEditable();
+ int maxReplace = mMaxLength - editable.length() + numReplaced;
+ if (maxReplace < text.length()) {
+ maxReplace = Math.max(maxReplace, 0);
+ // New length is greater than the maximum. trim it down.
+ text = text.subSequence(0, maxReplace);
+ }
+ }
+ return text;
+ }
+
+ private void restartInput() {
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ if (imm != null) {
+ // Since the text has changed, do not allow the IME to replace the
+ // existing text as though it were a completion.
+ imm.restartInput(WebView.this);
+ }
+ }
}
private class PastePopupWindow extends PopupWindow implements OnClickListener {
@@ -3144,7 +3172,7 @@
return;
}
if (nativeHasCursorNode()) {
- Rect cursorBounds = nativeGetCursorRingBounds();
+ Rect cursorBounds = cursorRingBounds();
if (!cursorBounds.contains(contentX, contentY)) {
int slop = viewToContentDimension(mNavSlop);
cursorBounds.inset(-slop, -slop);
@@ -5345,7 +5373,11 @@
}
}
+ // TODO: Remove this
WebViewCore.CursorData cursorData() {
+ if (sDisableNavcache) {
+ return new WebViewCore.CursorData(0, 0, 0, 0);
+ }
WebViewCore.CursorData result = cursorDataNoPosition();
Point position = nativeCursorPosition();
result.mX = position.x;
@@ -7541,7 +7573,7 @@
return false;
}
if (time - mLastCursorTime <= TRACKBALL_TIMEOUT
- && !mLastCursorBounds.equals(nativeGetCursorRingBounds())) {
+ && !mLastCursorBounds.equals(cursorRingBounds())) {
nativeSelectBestAt(mLastCursorBounds);
}
if (DebugFlags.WEB_VIEW) {
@@ -10121,7 +10153,7 @@
}
mInitialHitTestResult = null;
mLastCursorTime = time;
- mLastCursorBounds = nativeGetCursorRingBounds();
+ mLastCursorBounds = cursorRingBounds();
boolean keyHandled
= nativeMoveCursor(keyCode, count, noScroll) == false;
if (DebugFlags.WEB_VIEW) {
@@ -10132,7 +10164,7 @@
if (keyHandled == false) {
return keyHandled;
}
- Rect contentCursorRingBounds = nativeGetCursorRingBounds();
+ Rect contentCursorRingBounds = cursorRingBounds();
if (contentCursorRingBounds.isEmpty()) return keyHandled;
Rect viewCursorRingBounds = contentToViewRect(contentCursorRingBounds);
// set last touch so that context menu related functions will work
@@ -10346,6 +10378,14 @@
return isEditable;
}
+ // TODO: Remove this
+ Rect cursorRingBounds() {
+ if (sDisableNavcache) {
+ return new Rect();
+ }
+ return nativeGetCursorRingBounds();
+ }
+
private native int nativeCacheHitFramePointer();
private native boolean nativeCacheHitIsPlugin();
private native Rect nativeCacheHitNodeBounds();
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index e7da1a8..93fd92b 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -923,13 +923,14 @@
static class TextFieldInitData {
public TextFieldInitData(int fieldPointer,
String text, int type, boolean isSpellCheckEnabled,
- boolean isTextFieldNext, String label) {
+ boolean isTextFieldNext, String label, int maxLength) {
mFieldPointer = fieldPointer;
mText = text;
mType = type;
mIsSpellCheckEnabled = isSpellCheckEnabled;
mIsTextFieldNext = isTextFieldNext;
mLabel = label;
+ mMaxLength = maxLength;
}
int mFieldPointer;
String mText;
@@ -937,6 +938,7 @@
boolean mIsSpellCheckEnabled;
boolean mIsTextFieldNext;
String mLabel;
+ int mMaxLength;
}
// mAction of TouchEventData can be MotionEvent.getAction() which uses the
@@ -2826,12 +2828,13 @@
// called by JNI
private void initEditField(int pointer, String text, int inputType,
boolean isSpellCheckEnabled, boolean nextFieldIsText,
- String label, int start, int end, int selectionPtr) {
+ String label, int start, int end, int selectionPtr, int maxLength) {
if (mWebView == null) {
return;
}
TextFieldInitData initData = new TextFieldInitData(pointer,
- text, inputType, isSpellCheckEnabled, nextFieldIsText, label);
+ text, inputType, isSpellCheckEnabled, nextFieldIsText, label,
+ maxLength);
Message.obtain(mWebView.mPrivateHandler,
WebView.INIT_EDIT_FIELD, initData).sendToTarget();
Message.obtain(mWebView.mPrivateHandler,
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 84e86af..6405ee9 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -49,6 +49,7 @@
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.DecelerateInterpolator;
+import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import com.android.internal.R;
@@ -373,9 +374,9 @@
private float mLastMotionEventY;
/**
- * Flag if to begin edit on next up event.
+ * Flag if to check for double tap and potentially start edit.
*/
- private boolean mBeginEditOnUpEvent;
+ private boolean mCheckBeginEditOnUpEvent;
/**
* Flag if to adjust the selector wheel on next up event.
@@ -453,6 +454,11 @@
private boolean mScrollWheelAndFadingEdgesInitialized;
/**
+ * The time of the last up event.
+ */
+ private long mLastUpEventTimeMillis;
+
+ /**
* Interface to listen for changes of the current value.
*/
public interface OnValueChangeListener {
@@ -628,10 +634,6 @@
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
mInputText.selectAll();
- InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
- if (inputMethodManager != null) {
- inputMethodManager.showSoftInput(mInputText, 0);
- }
} else {
mInputText.setSelection(0, 0);
validateInputTextView(v);
@@ -643,6 +645,7 @@
});
mInputText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
+ mInputText.setImeOptions(EditorInfo.IME_ACTION_DONE);
// initialize constants
mTouchSlop = ViewConfiguration.getTapTimeout();
@@ -777,7 +780,7 @@
removeAllCallbacks();
mShowInputControlsAnimator.cancel();
mDimSelectorWheelAnimator.cancel();
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
mAdjustScrollerOnUpEvent = true;
if (mSelectorWheelState == SELECTOR_WHEEL_STATE_LARGE) {
mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
@@ -788,7 +791,7 @@
mAdjustScroller.forceFinished(true);
onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
}
- mBeginEditOnUpEvent = scrollersFinished;
+ mCheckBeginEditOnUpEvent = scrollersFinished;
mAdjustScrollerOnUpEvent = true;
hideSoftInput();
hideInputControls();
@@ -807,7 +810,7 @@
float currentMoveY = event.getY();
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
setSelectorWheelState(SELECTOR_WHEEL_STATE_LARGE);
hideSoftInput();
@@ -832,11 +835,11 @@
switch (action) {
case MotionEvent.ACTION_MOVE:
float currentMoveY = ev.getY();
- if (mBeginEditOnUpEvent
+ if (mCheckBeginEditOnUpEvent
|| mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
}
}
@@ -846,11 +849,20 @@
mLastMotionEventY = currentMoveY;
break;
case MotionEvent.ACTION_UP:
- if (mBeginEditOnUpEvent) {
- setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
- showInputControls(mShowInputControlsAnimimationDuration);
- mInputText.requestFocus();
- return true;
+ if (mCheckBeginEditOnUpEvent) {
+ mCheckBeginEditOnUpEvent = false;
+ final long deltaTapTimeMillis = ev.getEventTime() - mLastUpEventTimeMillis;
+ if (deltaTapTimeMillis < ViewConfiguration.getDoubleTapTimeout()) {
+ setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
+ showInputControls(mShowInputControlsAnimimationDuration);
+ mInputText.requestFocus();
+ InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
+ if (inputMethodManager != null) {
+ inputMethodManager.showSoftInput(mInputText, 0);
+ }
+ mLastUpEventTimeMillis = ev.getEventTime();
+ return true;
+ }
}
VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
@@ -869,6 +881,7 @@
}
mVelocityTracker.recycle();
mVelocityTracker = null;
+ mLastUpEventTimeMillis = ev.getEventTime();
break;
}
return true;
@@ -2017,4 +2030,22 @@
postDelayed(this, mLongPressUpdateInterval);
}
}
+
+ /**
+ * @hide
+ */
+ public static class CustomEditText extends EditText {
+
+ public CustomEditText(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void onEditorAction(int actionCode) {
+ super.onEditorAction(actionCode);
+ if (actionCode == EditorInfo.IME_ACTION_DONE) {
+ clearFocus();
+ }
+ }
+ }
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f384dc1..29e9e91 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -243,10 +243,6 @@
private static final int SIGNED = 2;
private static final int DECIMAL = 4;
- private static enum TEXT_ALIGN {
- INHERIT, GRAVITY, TEXT_START, TEXT_END, CENTER, VIEW_START, VIEW_END;
- }
-
/**
* Draw marquee text with fading edges as usual
*/
@@ -329,9 +325,6 @@
// The alignment to pass to Layout, or null if not resolved.
private Layout.Alignment mLayoutAlignment;
- // The default value for mTextAlign.
- private TEXT_ALIGN mTextAlign = TEXT_ALIGN.INHERIT;
-
private boolean mResolvedDrawables;
/**
@@ -5667,69 +5660,28 @@
physicalWidth, false);
}
- @Override
- protected void resetResolvedLayoutDirection() {
- super.resetResolvedLayoutDirection();
-
- if (mLayoutAlignment != null &&
- (mTextAlign == TEXT_ALIGN.VIEW_START ||
- mTextAlign == TEXT_ALIGN.VIEW_END)) {
- mLayoutAlignment = null;
- }
- }
-
private Layout.Alignment getLayoutAlignment() {
if (mLayoutAlignment == null) {
- Layout.Alignment alignment;
- TEXT_ALIGN textAlign = mTextAlign;
- switch (textAlign) {
- case INHERIT:
- // fall through to gravity temporarily
- // intention is to inherit value through view hierarchy.
- case GRAVITY:
- switch (mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) {
- case Gravity.START:
- alignment = Layout.Alignment.ALIGN_NORMAL;
- break;
- case Gravity.END:
- alignment = Layout.Alignment.ALIGN_OPPOSITE;
- break;
- case Gravity.LEFT:
- alignment = Layout.Alignment.ALIGN_LEFT;
- break;
- case Gravity.RIGHT:
- alignment = Layout.Alignment.ALIGN_RIGHT;
- break;
- case Gravity.CENTER_HORIZONTAL:
- alignment = Layout.Alignment.ALIGN_CENTER;
- break;
- default:
- alignment = Layout.Alignment.ALIGN_NORMAL;
- break;
- }
+ switch (mGravity & Gravity.RELATIVE_HORIZONTAL_GRAVITY_MASK) {
+ case Gravity.START:
+ mLayoutAlignment = Layout.Alignment.ALIGN_NORMAL;
break;
- case TEXT_START:
- alignment = Layout.Alignment.ALIGN_NORMAL;
+ case Gravity.END:
+ mLayoutAlignment = Layout.Alignment.ALIGN_OPPOSITE;
break;
- case TEXT_END:
- alignment = Layout.Alignment.ALIGN_OPPOSITE;
+ case Gravity.LEFT:
+ mLayoutAlignment = Layout.Alignment.ALIGN_LEFT;
break;
- case CENTER:
- alignment = Layout.Alignment.ALIGN_CENTER;
+ case Gravity.RIGHT:
+ mLayoutAlignment = Layout.Alignment.ALIGN_RIGHT;
break;
- case VIEW_START:
- alignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
- Layout.Alignment.ALIGN_RIGHT : Layout.Alignment.ALIGN_LEFT;
- break;
- case VIEW_END:
- alignment = (getResolvedLayoutDirection() == LAYOUT_DIRECTION_RTL) ?
- Layout.Alignment.ALIGN_LEFT : Layout.Alignment.ALIGN_RIGHT;
+ case Gravity.CENTER_HORIZONTAL:
+ mLayoutAlignment = Layout.Alignment.ALIGN_CENTER;
break;
default:
- alignment = Layout.Alignment.ALIGN_NORMAL;
+ mLayoutAlignment = Layout.Alignment.ALIGN_NORMAL;
break;
}
- mLayoutAlignment = alignment;
}
return mLayoutAlignment;
}
@@ -8189,24 +8141,26 @@
@Override
public boolean performLongClick() {
boolean handled = false;
- boolean vibrate = true;
if (super.performLongClick()) {
handled = true;
}
+ if (mEditor == null) {
+ return handled;
+ }
+
// Long press in empty space moves cursor and shows the Paste affordance if available.
- if (!handled && mEditor != null && !isPositionOnText(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY) &&
+ if (!handled && !isPositionOnText(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY) &&
getEditor().mInsertionControllerEnabled) {
final int offset = getOffsetForPosition(getEditor().mLastDownPositionX, getEditor().mLastDownPositionY);
stopSelectionActionMode();
Selection.setSelection((Spannable) mText, offset);
getInsertionController().showWithActionPopup();
handled = true;
- vibrate = false;
}
- if (!handled && mEditor != null && getEditor().mSelectionActionMode != null) {
+ if (!handled && getEditor().mSelectionActionMode != null) {
if (touchPositionIsInSelection()) {
// Start a drag
final int start = getSelectionStart();
@@ -8225,15 +8179,12 @@
}
// Start a new selection
- if (!handled && mEditor != null) {
- vibrate = handled = startSelectionActionMode();
+ if (!handled) {
+ handled = startSelectionActionMode();
}
- if (vibrate) {
+ if (handled) {
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
- }
-
- if (handled && mEditor != null) {
getEditor().mDiscardNextActionUp = true;
}
diff --git a/core/java/com/android/internal/util/FileRotator.java b/core/java/com/android/internal/util/FileRotator.java
index 8a8f315..6cfb97d 100644
--- a/core/java/com/android/internal/util/FileRotator.java
+++ b/core/java/com/android/internal/util/FileRotator.java
@@ -48,7 +48,7 @@
*/
public class FileRotator {
private static final String TAG = "FileRotator";
- private static final boolean LOGD = true;
+ private static final boolean LOGD = false;
private final File mBasePath;
private final String mPrefix;
diff --git a/core/java/com/android/internal/widget/EditableInputConnection.java b/core/java/com/android/internal/widget/EditableInputConnection.java
index 9579bce..4cbdf78 100644
--- a/core/java/com/android/internal/widget/EditableInputConnection.java
+++ b/core/java/com/android/internal/widget/EditableInputConnection.java
@@ -70,7 +70,7 @@
public boolean endBatchEdit() {
synchronized(this) {
if (mBatchEditNesting > 0) {
- // When the connection is reset by the InputMethodManager and finishComposingText
+ // When the connection is reset by the InputMethodManager and reportFinish
// is called, some endBatchEdit calls may still be asynchronously received from the
// IME. Do not take these into account, thus ensuring that this IC's final
// contribution to mTextView's nested batch edit count is zero.
@@ -83,6 +83,19 @@
}
@Override
+ protected void reportFinish() {
+ super.reportFinish();
+
+ synchronized(this) {
+ while (mBatchEditNesting > 0) {
+ endBatchEdit();
+ }
+ // Will prevent any further calls to begin or endBatchEdit
+ mBatchEditNesting = -1;
+ }
+ }
+
+ @Override
public boolean clearMetaKeyStates(int states) {
final Editable content = getEditable();
if (content == null) return false;
@@ -99,23 +112,6 @@
}
@Override
- public boolean finishComposingText() {
- final boolean superResult = super.finishComposingText();
- synchronized(this) {
- if (mBatchEditNesting < 0) {
- // The connection was already finished
- return false;
- }
- while (mBatchEditNesting > 0) {
- endBatchEdit();
- }
- // Will prevent any further calls to begin or endBatchEdit
- mBatchEditNesting = -1;
- }
- return superResult;
- }
-
- @Override
public boolean commitCompletion(CompletionInfo text) {
if (DEBUG) Log.v(TAG, "commitCompletion " + text);
mTextView.beginBatchEdit();
diff --git a/core/res/res/layout/number_picker.xml b/core/res/res/layout/number_picker.xml
index 807daf2..2967696 100644
--- a/core/res/res/layout/number_picker.xml
+++ b/core/res/res/layout/number_picker.xml
@@ -25,7 +25,8 @@
style="?android:attr/numberPickerUpButtonStyle"
android:contentDescription="@string/number_picker_increment_button" />
- <EditText android:id="@+id/numberpicker_input"
+ <view class="android.widget.NumberPicker$CustomEditText"
+ android:id="@+id/numberpicker_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/numberPickerInputTextStyle" />
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 5cd17b3..262a102 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"የመተግበሪያ ምንዝሮችን አንቃ ወይም አቦዝን"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"የሌላ መተግበሪያ ክፍለ አካል እንደነቃ ወይም እንዳልነቃ መተግበሪያው እንዲለውጥ ይፈቅዳል፡፡ አስፈላጊ የጡባዊ ተኮ አቅሞችን ለማስወገድ ጎጂ መተግበሪያዎች ይሄንን ሊጠቀሙበት ይችላሉ፡፡ ከፍቃድ ጋር ጥንቃቄ መወሰድ ይገባል፤ ልክ የማያገለግል፣ ወጥ ያልሆነ፣ ወይም ያልተረጋጋ ሁኔታ ወደ የመተግበሪያ ክፍለ አካል ማግኘት እንደሚቻል ሁሉ፡፡"</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"የሌላ መተግበሪያ ክፍለ አካል እንደነቃ ወይም እንዳልነቃ መተግበሪያው እንዲለውጥ ይፈቅዳል፡፡ አስፈላጊ የስልክ አቅሞችን ለማስወገድ ተንኮል አዘል መተግበሪያዎች ይሄንን ሊጠቀሙበት ይችላሉ፡፡ ከፍቃድ ጋር ጥንቃቄ መወሰድ ይገባል፤ ልክ የማያገለግል፣ ወጥ ያልሆነ፣ ወይም ያልተረጋጋ ሁኔታ ወደ የመተግበሪያ ክፍለ አካል ማግኘት እንደሚቻል ሁሉ፡፡"</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"ፍቃዶች ስጥ ወይም ከልክል"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"የተወሰነ ፍቃዶች እንዲሰጥ ወይም እንዲከለክል ለመተግበሪያ ይፈቅዳል ወይም ሌላ መተግበሪያዎች፡፡ ተንኮል አዘል መተግበሪያዎች ያልፈቀድክላቸውን ባህሪያት ላይ ለመድረስ ይሄንን ሊጠቀሙት ይችላሉ፡፡"</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"ተመራጭ መተግበሪያዎች አዘጋጅ"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"ተመራጭ መተግበሪያዎችህን ለመቀየር ለመተግበሪያው ይፈቅዳሉ፡፡ ካንተ የግል ውሂብ ለመሰብሰብ ያሉትን መተግበሪያዎች በመላክ፤ በመሄድ ላይ ያሉ መተግበሪያዎችን ተንኮል አዘል መተግበሪያዎች በዝምታ ሊለውጡ ይችላሉ፡፡"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"የሁሉንም ስርዓት ቅንብሮች ቀይር"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"ውሂብ አዘጋጅ"</string>
<string name="date_time_set" msgid="5777075614321087758">"አዘጋጅ"</string>
<string name="default_permission_group" msgid="2690160991405646128">"ነባሪ"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"አዲስ፦ "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"ምንም ፍቃዶች አይጠየቁም"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"ደብቅ "</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"ሁሉንም አሳይ"</b></string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 61503ebf..114cac2 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"aktivere eller deaktivere appkomponenter"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Tillader, at appen kan ændre, om en komponent i en anden app er aktiveret eller ej. Ondsindede apps kan bruge dette til at deaktivere vigtige tabletfunktioner. Man skal være forsigtig med denne tilladelse, da det er muligt at bringe appkomponenter ind i en ubrugelig, inkonsekvent eller ustabil tilstand."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Tillader, at appen kan ændre, om en komponent i en anden app er aktiveret eller ej. Ondsindede apps kan bruge dette til at deaktivere vigtige funktioner på telefonen. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige eller ustabile appkomponenter."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"udsted eller tilbagekald tilladelser"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Tillader, at en applikation udsteder eller tilbagekalder særlige tilladelser til den selv eller andre applikationer. Ondsindede applikationer kan bruge dette til at få adgang til funktioner uden din tilladelse."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"angive foretrukne apps"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Tillader, at appen kan ændre dine foretrukne apps. Ondsindede apps kan ubemærket ændre kørende apps derved udgive sig for at være dine eksisterende apps og på den måde indsamle private data fra dig."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"rediger globale systemindstillinger"</string>
@@ -368,7 +366,7 @@
<string name="permdesc_readFrameBuffer" msgid="4937405521809454680">"Tillader, at appen kan læse indholdet fra rammebufferen."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"skift dine lydindstillinger"</string>
<string name="permdesc_modifyAudioSettings" msgid="7343951185408396919">"Tillader, at appen kan ændre globale lydindstillinger, f.eks. lydstyrke og kanalisering."</string>
- <string name="permlab_recordAudio" msgid="3876049771427466323">"optag lyd"</string>
+ <string name="permlab_recordAudio" msgid="3876049771427466323">"optage lyd"</string>
<string name="permdesc_recordAudio" msgid="2387462233976248635">"Tillader, at appen får adgang til stien til lydoptagelse."</string>
<string name="permlab_camera" msgid="3616391919559751192">"tag billeder og optag video"</string>
<string name="permdesc_camera" msgid="1507407407002492176">"Tillader, at appen kan tage billeder og optage video med kameraet. Dette tillader, at appen når som helst kan indsamle billeder, som kameraet kan se."</string>
@@ -394,7 +392,7 @@
<string name="permdesc_asec_mount_unmount" msgid="3451360114902490929">"Tillader, at appen kan montere/demontere det interne lager."</string>
<string name="permlab_asec_rename" msgid="7496633954080472417">"omdøbe internt lager"</string>
<string name="permdesc_asec_rename" msgid="1794757588472127675">"Tillader, at appen kan omdøbe det interne lager."</string>
- <string name="permlab_vibrate" msgid="7768356019980849603">"kontroller vibrator"</string>
+ <string name="permlab_vibrate" msgid="7768356019980849603">"kontrollere vibrator"</string>
<string name="permdesc_vibrate" msgid="6284989245902300945">"Tillader, at appen kan kontrollere vibratoren."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontroller lommelygte"</string>
<string name="permdesc_flashlight" msgid="6522284794568368310">"Tillader, at appen kan kontrollere lommelygten."</string>
@@ -422,7 +420,7 @@
<string name="permlab_readPhoneState" msgid="2326172951448691631">"læs telefontilstand og identitet"</string>
<string name="permdesc_readPhoneState" msgid="5127767618743602782">"Tillader, at appen kan få adgang til enhedens telefonfunktioner. En app med denne tilladelse kan fastlægge telefonens telefon- og serienummer, om et opkald er aktivt, det nummer, som opkaldet er tilknyttet osv."</string>
<string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"afhold tabletcomputeren fra at gå i dvale"</string>
- <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"afhold telefonen fra at gå i dvale"</string>
+ <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"afholde telefonen fra at gå i dvale"</string>
<string name="permdesc_wakeLock" product="tablet" msgid="7311319824400447868">"Tillader, at appen kan forhindre tabletten i at gå i dvale."</string>
<string name="permdesc_wakeLock" product="default" msgid="8559100677372928754">"Tillader, at appen kan forhindre, at telefonen går i dvale."</string>
<string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"tænd eller sluk for tabletcomputeren"</string>
@@ -451,11 +449,11 @@
<string name="permdesc_getAccounts" product="default" msgid="2735689364629830348">"Tillader, at appen kan hente listen over konti, der er kendt af telefonen."</string>
<string name="permlab_authenticateAccounts" msgid="3940505577982882450">"fungerer som en kontogodkender"</string>
<string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"Tillader, at en app kan bruge kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og angivelse af deres adgangskoder."</string>
- <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrer kontolisten"</string>
+ <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrere kontolisten"</string>
<string name="permdesc_manageAccounts" msgid="8698295625488292506">"Tillader, at appen kan foretage handlinger såsom at tilføje og fjerne konti og slette adgangskoden."</string>
- <string name="permlab_useCredentials" msgid="6401886092818819856">"brug en kontos godkendelsesoplysninger"</string>
+ <string name="permlab_useCredentials" msgid="6401886092818819856">"bruge en kontos godkendelsesoplysninger"</string>
<string name="permdesc_useCredentials" msgid="7984227147403346422">"Tillader, at appen kan anmode om godkendelsestokens."</string>
- <string name="permlab_accessNetworkState" msgid="6865575199464405769">"vis netværkstilstand"</string>
+ <string name="permlab_accessNetworkState" msgid="6865575199464405769">"vise netværkstilstand"</string>
<string name="permdesc_accessNetworkState" msgid="479772796952547198">"Tillader, at appen kan vise tilstanden for alle netværk."</string>
<string name="permlab_createNetworkSockets" msgid="9121633680349549585">"fuld internetadgang"</string>
<string name="permdesc_createNetworkSockets" msgid="5963922297444265950">"Tillader, at appen kan skabe netværkssockets."</string>
@@ -487,11 +485,11 @@
<string name="permdesc_nfc" msgid="7120611819401789907">"Tillader, at appen kan kommunikere med NFC-tags (Near Field Communication), -kort og -læsere."</string>
<string name="permlab_disableKeyguard" msgid="4977406164311535092">"deaktiver tastaturlås"</string>
<string name="permdesc_disableKeyguard" msgid="6231611286892232626">"Tillader, at appen kan deaktivere tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen ved indgående telefonopkald, og aktiverer tastaturlåsen igen, når opkaldet er afsluttet."</string>
- <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læs indstillinger for synkronisering"</string>
+ <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læse indstillinger for synkronisering"</string>
<string name="permdesc_readSyncSettings" msgid="5464056785274229278">"Tillader, at appen kan læse synkroniseringsindstillingerne, f.eks. om synkronisering er aktiveret for appen Personer."</string>
- <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skriv indstillinger for synkronisering"</string>
+ <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skrive indstillinger for synkronisering"</string>
<string name="permdesc_writeSyncSettings" msgid="1466056564502117130">"Tillader, at appen kan ændre indstillingerne for synkronisering, f.eks. om appen Personer skal synkroniseres."</string>
- <string name="permlab_readSyncStats" msgid="7396577451360202448">"læs synkroniseringsstatistikker"</string>
+ <string name="permlab_readSyncStats" msgid="7396577451360202448">"læse synkroniseringsstatistikker"</string>
<string name="permdesc_readSyncStats" msgid="3801971839939951678">"Tillader, at appen kan læse synkroniseringsstatistikker, f.eks. synkroniseringshistorikken."</string>
<string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"læs abonnerede feeds"</string>
<string name="permdesc_subscribedFeedsRead" msgid="5557058907906144505">"Tillader, at appen kan hente oplysninger om de feeds, der synkroniseres."</string>
@@ -751,9 +749,9 @@
<string name="autofill_parish" msgid="8202206105468820057">"Sogn"</string>
<string name="autofill_area" msgid="3547409050889952423">"Område"</string>
<string name="autofill_emirate" msgid="2893880978835698818">"Emirat"</string>
- <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læs browserens oversigt og bogmærker"</string>
+ <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læse browserens oversigt og bogmærker"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4577476392604595921">"Tillader, at appen kan læse alle de webadresser, som Browser har besøgt, og alle bogmærker i Browser."</string>
- <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriv browserens oversigt og bogmærker"</string>
+ <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skrive i browserens oversigt og bogmærker"</string>
<string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="1757103804824209530">"Tillader, at appen kan ændre historik eller bogmærker i Browser, som er gemt på din tablet. Ondsindede apps kan bruge dette til at slette eller ændre dine browserdata."</string>
<string name="permdesc_writeHistoryBookmarks" product="default" msgid="6693764355720719197">"Tillader, at appen kan ændre browserhistorikken eller bogmærker, der er gemt på din telefon. Ondsindede apps kan bruge dette til at slette eller ændre dine browserdata."</string>
<string name="permlab_setAlarm" msgid="5924401328803615165">"angiv alarm i alarmprogram"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Angiv dato"</string>
<string name="date_time_set" msgid="5777075614321087758">"Angiv"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NYHED! "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Der kræves ingen tilladelser"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skjul"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Vis alle"</b></string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 1d1748b..426a8c8 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"App-Komponenten aktivieren oder deaktivieren"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Ermöglicht der App, Komponenten einer anderen App zu aktivieren oder zu deaktivieren. Schädliche Apps können so wichtige Tabletfunktionen deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die App-Komponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Ermöglicht der App, Komponenten einer anderen App zu aktivieren oder zu deaktivieren. Schädliche Apps können so wichtige Telefonfunktionen deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die App-Komponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"Berechtigungen erteilen oder entziehen"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Hiermit kann eine App sich selbst oder anderen Apps bestimmte Berechtigungen erteilen oder entziehen. Schädliche Apps können hierdurch Zugriff auf Funktionen erlangen, den Sie nicht gewährt haben."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"Bevorzugte Apps festlegen"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Ermöglicht der App, Änderungen an Ihren bevorzugten Apps vorzunehmen. Schädliche Apps können so aktive Apps ohne Ihr Wissen ändern, damit die vorhandenen Apps private Daten von Ihnen erfassen."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"allgemeine Systemeinstellungen ändern"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Datum festlegen"</string>
<string name="date_time_set" msgid="5777075614321087758">"Speichern"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"Neu: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Keine Berechtigungen erforderlich"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ausblenden"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alle anzeigen"</b></string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 8d2a836..d0c0cb9 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"habilitar o inhabilitar componentes de la aplicación"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o inhabilitado. Las aplicaciones malintencionadas pueden usar este permiso para inhabilitar funciones importantes del tablet. Este permiso se debe usar con precaución, ya que los componentes de las aplicaciones se pueden volver inestables, incoherentes o inservibles."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que la aplicación determine si un componente de otra aplicación está habilitado o inhabilitado. Las aplicaciones malintencionadas pueden usar este permiso para inhabilitar funciones importantes del teléfono. Este permiso se debe usar con precaución, ya que los componentes de las aplicaciones se pueden volver inestables, incoherentes o inservibles."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"conceder o revocar permisos"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite que una aplicación conceda o revoque permisos específicos para sí misma o para otras aplicaciones. Las aplicaciones malintencionadas pueden aprovechar este permiso para acceder a funciones sin tu autorización."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"establecer aplicaciones preferidas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite que la aplicación modifique las aplicaciones preferidas del usuario. De esta forma, las aplicaciones malintencionadas pueden cambiar sin aviso las aplicaciones que se están ejecutando y falsificarlas para obtener datos privados del usuario."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar la configuración global del sistema"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Establecer fecha"</string>
<string name="date_time_set" msgid="5777075614321087758">"Establecer"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predeterminado"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUEVO:"</font></string>
<string name="no_permissions" msgid="7283357728219338112">"No es necesario ningún permiso"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todos"</b></string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 7b1d280..2a4352d 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"Rakenduse komponentide lubamine või keelamine"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Võimaldab rakendusel määrata, kas teise rakenduse komponent on lubatud või mitte. Pahatahtlikud rakendused võivad kasutada seda oluliste tahvelarvutirakenduste keelamiseks. Nende õiguste puhul peab olema ettevaatlik, kuna need võimaldavad muuta rakenduse komponente kasutuks, ebaühtlaseks või ebastabiilseks."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Võimaldab rakendusel määrata, kas teise rakenduse komponent on lubatud või mitte. Pahatahtlikud rakendused võivad kasutada seda oluliste telefonirakenduste keelamiseks. Nende õiguste puhul peab olema ettevaatlik, kuna need võimaldavad muuta rakenduse komponente kasutuks, ebaühtlaseks või ebastabiilseks."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"lubade andmine või tühistamine"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Võimaldab rakendusel anda või tühistada teatud lubasid endale või teistele rakendustele. Pahatahtlikud rakendused võivad kasutada seda juurdepääsu hankimiseks sellistele funktsioonidele, mille jaoks te pole luba andnud."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"Eelistatud rakenduste määramine"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Võimaldab rakendusel muuta teie eelistatud rakendusi. Pahatahtlikud rakendused võivad salaja muuta töötavaid rakendusi, pettes teie olemasolevad rakendused koguma teilt privaatseid andmeid."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"muuda üldisi süsteemiseadeid"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Kuupäeva määramine"</string>
<string name="date_time_set" msgid="5777075614321087758">"Määra"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Vaikimisi"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"UUS: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Lube pole vaja"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Peida"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Näita kõiki"</b></string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 3fcb3b7..e9b3b28 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"activer ou désactiver les composants de l\'application"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permet à l\'application d\'activer ou de désactiver un composant d\'une autre application. Des applications malveillantes peuvent exploiter cette fonctionnalité pour désactiver les fonctionnalités principales de votre tablette. Cette autorisation doit être utilisée avec prudence, car elle peut rendre les composants d\'une application instables, voire inutilisables."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permet à l\'application d\'activer ou de désactiver un composant d\'une autre application. Des applications malveillantes peuvent exploiter cette fonctionnalité pour désactiver les fonctionnalités principales de votre téléphone. Cette autorisation doit être utilisée avec prudence, car elle peut rendre les composants d\'une application instables, voire inutilisables."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"accorder ou révoquer des autorisations"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permet à une application d\'accorder ou de révoquer des autorisations spécifiques pour celle-ci ou pour d\'autres applications. Des applications malveillantes peuvent exploiter cette autorisation pour accéder à des fonctionnalités auxquelles vous ne leur avez pas donné l\'accès."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"définir les applications préférées"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permet à l\'application de modifier vos applications préférées. Des applications malveillantes peuvent exploiter cette fonctionnalité pour modifier les applications exécutées en usurpant l\'identité de vos applications existantes dans le but de recueillir des données privées."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"Modification des paramètres généraux du système"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Définir la date"</string>
<string name="date_time_set" msgid="5777075614321087758">"Définir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Par défaut"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOUVEAU"</font>" :"</string>
<string name="no_permissions" msgid="7283357728219338112">"Aucune autorisation requise"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Masquer"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tout afficher"</b></string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 408b346..21855eb 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"attivazione/disattivazione componenti applicazioni"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Consente all\'applicazione di cambiare lo stato di attivazione o disattivazione del componente di un\'altra applicazione. Le applicazioni dannose potrebbero farne uso per disattivare importanti funzionalità del tablet. È necessario prestare attenzione con questa autorizzazione perché è possibile rendere inutilizzabili, incoerenti o instabili i componenti delle applicazioni."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Consente all\'applicazione di cambiare lo stato di attivazione o disattivazione del componente di un\'altra applicazione. Le applicazioni dannose potrebbero farne uso per disattivare importanti funzionalità del telefono. È necessario prestare attenzione con questa autorizzazione perché è possibile rendere inutilizzabili, incoerenti o instabili i componenti delle applicazioni."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"concessione o revoca di autorizzazioni"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Consente a un\'applicazione di concedere o revocare autorizzazioni specifiche per essa o per altre applicazioni. Le applicazioni dannose potrebbero utilizzare questa autorizzazione per accedere a funzioni che non hai concesso loro."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"impostazione applicazioni preferite"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Consente all\'applicazione di modificare le tue applicazioni preferite. Le applicazioni dannose potrebbero cambiare di nascosto le applicazioni che vengono eseguite, facendo in modo che le applicazioni esistenti raccolgano dati riservati su di te."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modifica impostazioni di sistema globali"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Imposta data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Imposta"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predefinito"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NUOVA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Nessuna autorizzazione richiesta"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Nascondi"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostra tutto"</b></string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 3cef8bb..b009ea1 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"הפעלה או השבתה של רכיבי יישומים"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"מאפשר ליישום לשנות את מצב ההפעלה של רכיב ביישום אחר. יישומים זדוניים עלולים להשתמש בכך כדי להשבית יכולות חשובות של הטבלט. יש לנהוג בהרשאה זו בזהירות, מכיוון שהיא יכולה להביא רכיבי יישומים למצב לא שמיש, לא עקבי או לא יציב."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"מאפשר ליישום לשנות את מצב ההפעלה של רכיב ביישום אחר. יישומים זדוניים עלולים להשתמש בכך כדי להשבית יכולות חשובות של הטלפון. יש לנהוג בהרשאה זו בזהירות, מכיוון שהיא יכולה להביא רכיבי יישומים למצב לא שמיש, לא עקבי או לא יציב."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"הענק או בטל הרשאות"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"מאפשר ליישום להעניק או לבטל הרשאות ספציפיות ביחס לעצמו או ליישומים אחרים. יישומים זדוניים עלולים להשתמש באפשרות זו על מנת לקבל גישה לתכונות שלא אישרת להם."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"הגדרת יישומים מועדפים"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"מאפשר ליישום לשנות את היישומים המועדפים עליך. יישומים זדוניים עלולים לשנות בחשאי את היישומים שמופעלים, תוך שידול במרמה של היישומים הקיימים שלך לאסוף ממך נתונים פרטיים."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"שנה את הגדרות המערכת הכלליות"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"הגדר תאריך"</string>
<string name="date_time_set" msgid="5777075614321087758">"הגדר"</string>
<string name="default_permission_group" msgid="2690160991405646128">"ברירת מחדל"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"חדש: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"לא דרושים אישורים"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"הסתר"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"הצג הכל"</b></string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 3941a3d..584a7d1 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"componenten van apps in- of uitschakelen"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Hiermee kan de app wijzigen of een component van een andere app wel of niet is ingeschakeld. Schadelijke apps kunnen dit gebruiken om belangrijke tabletfuncties uit te schakelen. U moet voorzichtig omgaan met deze rechten, aangezien het mogelijk is dat onderdelen van apps onbruikbaar, inconsistent of instabiel worden."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Hiermee kan de app wijzigen of een component van een andere app wel of niet is ingeschakeld. Schadelijke apps kunnen dit gebruiken om belangrijke telefoonfuncties uit te schakelen. U moet voorzichtig omgaan met deze rechten, aangezien het mogelijk is dat onderdelen van apps onbruikbaar, inconsistent of instabiel worden."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"rechten verlenen of intrekken"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Toestaan dat een app specifieke rechten aan zichzelf of andere apps verleent of intrekt. Schadelijke apps kunnen dit gebruiken om toegang te krijgen tot functies waartoe u de apps geen toegang heeft gegeven."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"voorkeursapps instellen"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Hiermee kan de app uw voorkeursapps aanpassen. Schadelijke apps kunnen de apps die worden uitgevoerd zonder uw medeweten wijzigen om uw bestaande apps te imiteren en privégegevens van u te verzamelen."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"algemene systeeminstellingen wijzigen"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Datum instellen"</string>
<string name="date_time_set" msgid="5777075614321087758">"Instellen"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standaard"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NIEUW: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Geen machtigingen vereist"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Verbergen"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alles weergeven"</b></string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 705cfcc..25833aa 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1240,7 +1240,7 @@
<string name="sha1_fingerprint" msgid="7930330235269404581">"Odcisk cyfrowy SHA-1:"</string>
<string name="activity_chooser_view_see_all" msgid="4292569383976636200">"Zobacz wszystkie"</string>
<string name="activity_chooser_view_dialog_title_default" msgid="4710013864974040615">"Wybierz działanie"</string>
- <string name="share_action_provider_share_with" msgid="5247684435979149216">"Udostępnij"</string>
+ <string name="share_action_provider_share_with" msgid="5247684435979149216">"Udostępnij przez"</string>
<string name="status_bar_device_locked" msgid="3092703448690669768">"Urządzenie zablokowane."</string>
<string name="list_delimeter" msgid="3975117572185494152">", "</string>
<string name="sending" msgid="3245653681008218030">"Wysyłanie..."</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 4865537..9f1e053 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"ativar ou desativar componentes da aplicação"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Permite que a aplicação mude a opção de ativar ou não um componente de outra aplicação. As aplicações maliciosas podem utilizar isto para desativar funcionalidades importantes do tablet. É necessário ter cuidado com esta autorização, uma vez que é possível colocar alguns componentes de aplicações num estado inutilizável, inconsistente ou instável."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Permite que a aplicação mude a opção de ativar ou não um componente de outra aplicação. As aplicações maliciosas podem utilizar isto para desativar funcionalidades importantes do telemóvel. É necessário ter cuidado com esta autorização, uma vez que é possível colocar alguns componentes de aplicações num estado inutilizável, inconsistente ou instável."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"conceder ou revogar permissões"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Permite que uma aplicação conceda ou revogue permissões específicas para si própria ou para outras aplicações. As aplicações maliciosas podem utilizar isto para aceder a funcionalidades para as quais não têm permissão."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"definir aplicações preferidas"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Permite ao aplicativo modificar as suas aplicações preferidas. As aplicações maliciosas podem alterar sem aviso as aplicações que são executadas, espiando as aplicações existentes para recolher os seus dados privados."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"modificar definições globais do sistema"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Definir data"</string>
<string name="date_time_set" msgid="5777075614321087758">"Definir"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Predefinido"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"NOVA: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Não são necessárias permissões"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar tudo"</b></string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 6882d7a..c2d59e9 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -769,7 +769,7 @@
<string name="permlab_serialPort" msgid="546083327654631076">"访问串行端口"</string>
<string name="permdesc_serialPort" msgid="2991639985224598193">"允许持有人使用 SerialManager API 访问串行端口。"</string>
<string name="permlab_accessContentProvidersExternally" msgid="5077774297943409285">"从外部访问内容提供程序"</string>
- <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"允许持有者通过界面访问内容提供程序。普通应用程序绝不需要此权限。"</string>
+ <string name="permdesc_accessContentProvidersExternally" msgid="4544346486697853685">"允许持有者通过界面访问内容提供程序。普通应用绝不需要此权限。"</string>
<string name="save_password_message" msgid="767344687139195790">"是否希望浏览器记住此密码?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"暂不保存"</string>
<string name="save_password_remember" msgid="6491879678996749466">"记住"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 096aba7..6d61260 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -313,10 +313,8 @@
<string name="permlab_changeComponentState" msgid="6335576775711095931">"vumela noma vimbela izingxenye zensiza"</string>
<string name="permdesc_changeComponentState" product="tablet" msgid="8887435740982237294">"Ivumela ukuthi insiza iguqule ukuthi okuqukethwe kwenye insiza kuyasebenza noma cha. Izinsiza ezinobungozi zingasebenzisa lokhu ukwenza ukuthi izinto ezisemqoka ekhompyutheni yepeni zingasebenzi. Kufanele kuqashelwe uma kukhishwa lemvume njengoba kungenzeka kwenze izinto zensiza zibe sesimweni esingazinzile, nesiguquguqukayo."</string>
<string name="permdesc_changeComponentState" product="default" msgid="1827232484416505615">"Ivumela ukuthi insiza iguqule ukuthi okuqukethwe kwenye insiza kuyasebenza noma cha. Izinsiza ezinobungozi zingasebenzisa lokhu ukwenza ukuthi izinto ezisemqoka ocingweni zingasebenzi. Kufanele kuqashelwe uma kukhishwa lemvume njengoba kungenzeka kwenze izinto zensiza zibe sesmweni esingazinzile, nesiguquguqukayo."</string>
- <!-- no translation found for permlab_grantRevokePermissions (4627315351093508795) -->
- <skip />
- <!-- no translation found for permdesc_grantRevokePermissions (4088642654085850662) -->
- <skip />
+ <string name="permlab_grantRevokePermissions" msgid="4627315351093508795">"nika noma buyisa izimvume"</string>
+ <string name="permdesc_grantRevokePermissions" msgid="4088642654085850662">"Ivumela izinhlelo zokusebenza ukunika noma ukubuyisa izimvume ezithile zayo noma ezinye izinhlelo lokusebenza. Izinhlelo zokusebenza ezingalungile zingasebenzisa lokhu ukufinyelela izici ongazinikanga zona."</string>
<string name="permlab_setPreferredApplications" msgid="8463181628695396391">"setha izinsiza ezincamelwayo"</string>
<string name="permdesc_setPreferredApplications" msgid="4973986762241783712">"Ivuela insiza ukuthi iguqule izinsiza ezincanyelwayo. Izinsiza ezinobungozi zingashintsha izinsiz buthule ezisebenzyo okwenza ukuthi izinsiza zakho ezikhona zingasebenzi ukuthola ze zithole imininingwane yakho eyimfihlo."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"guqula izilungiselelo zohlelo jikelele"</string>
@@ -1008,8 +1006,7 @@
<string name="date_picker_dialog_title" msgid="5879450659453782278">"Setha idethi"</string>
<string name="date_time_set" msgid="5777075614321087758">"Hlela"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Okuzenzakalelayo"</string>
- <!-- no translation found for perms_new_perm_prefix (8257740710754301407) -->
- <skip />
+ <string name="perms_new_perm_prefix" msgid="8257740710754301407"><font size="12" fgcolor="#ffffa3a3">"Okusha: "</font></string>
<string name="no_permissions" msgid="7283357728219338112">"Ayikho imvume edingekayo"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Fihla "</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Bonisa konke"</b></string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 1eab01a..806406d 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -505,6 +505,7 @@
0 - Nothing
1 - Recent apps dialog
2 - Recent apps view in SystemUI
+ 3 - Voice search
This needs to match the constants in
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
-->
diff --git a/data/fonts/AndroidEmoji.ttf b/data/fonts/AndroidEmoji.ttf
index d543f75..4c017d5 100644
--- a/data/fonts/AndroidEmoji.ttf
+++ b/data/fonts/AndroidEmoji.ttf
Binary files differ
diff --git a/drm/drmserver/main_drmserver.cpp b/drm/drmserver/main_drmserver.cpp
index e61b269..434d561 100644
--- a/drm/drmserver/main_drmserver.cpp
+++ b/drm/drmserver/main_drmserver.cpp
@@ -17,15 +17,10 @@
#define LOG_TAG "drmserver"
//#define LOG_NDEBUG 0
-#include <sys/types.h>
-#include <unistd.h>
-#include <grp.h>
-
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <utils/Log.h>
-#include <private/android_filesystem_config.h>
#include <DrmManagerService.h>
diff --git a/drm/java/android/drm/DrmRights.java b/drm/java/android/drm/DrmRights.java
index d4afed1..a9b4f05 100755
--- a/drm/java/android/drm/DrmRights.java
+++ b/drm/java/android/drm/DrmRights.java
@@ -30,19 +30,24 @@
* A caller can also instantiate a {@link DrmRights} object by using the
* {@link DrmRights#DrmRights(String, String)} constructor, which takes a path to a file
* containing rights information instead of a <code>ProcessedData</code>.
+ *<p>
+ * Please note that the account id and subscription id is not mandatory by all DRM agents
+ * or plugins. When account id or subscription id is not required by the specific DRM
+ * agent or plugin, they can be either null, or an empty string, or any other don't-care
+ * string value.
*
*/
public class DrmRights {
private byte[] mData;
private String mMimeType;
- private String mAccountId = "_NO_USER";
- private String mSubscriptionId = "";
+ private String mAccountId;
+ private String mSubscriptionId;
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
*/
public DrmRights(String rightsFilePath, String mimeType) {
File file = new File(rightsFilePath);
@@ -53,22 +58,20 @@
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
* @param accountId Account ID of the user.
*/
public DrmRights(String rightsFilePath, String mimeType, String accountId) {
this(rightsFilePath, mimeType);
- if (null != accountId && !accountId.equals("")) {
- mAccountId = accountId;
- }
+ mAccountId = accountId;
}
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFilePath Path to the file containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
* @param accountId Account ID of the user.
* @param subscriptionId Subscription ID of the user.
*/
@@ -76,20 +79,15 @@
String rightsFilePath, String mimeType, String accountId, String subscriptionId) {
this(rightsFilePath, mimeType);
- if (null != accountId && !accountId.equals("")) {
- mAccountId = accountId;
- }
-
- if (null != subscriptionId && !subscriptionId.equals("")) {
- mSubscriptionId = subscriptionId;
- }
+ mAccountId = accountId;
+ mSubscriptionId = subscriptionId;
}
/**
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param rightsFile File containing rights information.
- * @param mimeType MIME type.
+ * @param mimeType MIME type. Must not be null or an empty string.
*/
public DrmRights(File rightsFile, String mimeType) {
instantiate(rightsFile, mimeType);
@@ -114,28 +112,19 @@
* Creates a <code>DrmRights</code> object with the given parameters.
*
* @param data A {@link ProcessedData} object containing rights information.
- * data could be null because it's optional for some DRM schemes.
- * @param mimeType The MIME type.
+ * Must not be null.
+ * @param mimeType The MIME type. It must not be null or an empty string.
*/
public DrmRights(ProcessedData data, String mimeType) {
- if (data != null) {
- mData = data.getData();
-
- String accountId = data.getAccountId();
- if (null == accountId || !accountId.equals("")) {
- throw new IllegalArgumentException("accountId: " + accountId);
- }
- mAccountId = accountId;
-
- String subscriptionId = data.getSubscriptionId();
- if (null == subscriptionId || !subscriptionId.equals("")) {
- throw new IllegalArgumentException(
- "subscriptionId: " + subscriptionId);
- }
- mSubscriptionId = subscriptionId;
+ if (data == null) {
+ throw new IllegalArgumentException("data is null");
}
+ mData = data.getData();
+ mAccountId = data.getAccountId();
+ mSubscriptionId = data.getSubscriptionId();
mMimeType = mimeType;
+
if (!isValid()) {
final String msg = "mimeType: " + mMimeType + "," +
"data: " + mData;
diff --git a/drm/java/android/drm/DrmStore.java b/drm/java/android/drm/DrmStore.java
index 2f004cf..3a77ea1 100755
--- a/drm/java/android/drm/DrmStore.java
+++ b/drm/java/android/drm/DrmStore.java
@@ -108,6 +108,12 @@
* A trigger information object type.
*/
public static final int TRIGGER_OBJECT = 0x03;
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public DrmObjectType() {}
}
/**
@@ -143,6 +149,12 @@
}
return isValid;
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public Playback() {}
}
/**
@@ -198,6 +210,12 @@
}
return isValid;
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public Action() {}
}
/**
@@ -220,6 +238,18 @@
* The digital rights have not been acquired for the rights-protected content.
*/
public static final int RIGHTS_NOT_ACQUIRED = 0x03;
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public RightsStatus() {}
}
+
+ /**
+ * @deprecated This class should have been an interface instead.
+ * The default constuctor should have not been exposed.
+ */
+ public DrmStore() {}
}
diff --git a/drm/java/android/drm/DrmSupportInfo.java b/drm/java/android/drm/DrmSupportInfo.java
index 720c545..6484fa7 100755
--- a/drm/java/android/drm/DrmSupportInfo.java
+++ b/drm/java/android/drm/DrmSupportInfo.java
@@ -85,12 +85,23 @@
* Retrieves the DRM plug-in (agent) description.
*
* @return The plug-in description.
+ * @deprecated The method name is mis-spelled, and it is replaced by
+ * {@link #getDescription()}.
*/
public String getDescriprition() {
return mDescription;
}
/**
+ * Retrieves the DRM plug-in (agent) description.
+ *
+ * @return The plug-in description.
+ */
+ public String getDescription() {
+ return mDescription;
+ }
+
+ /**
* Overridden hash code implementation.
*
* @return The hash code value.
diff --git a/drm/java/android/drm/DrmUtils.java b/drm/java/android/drm/DrmUtils.java
index dc5f1fa..4f7cb22 100755
--- a/drm/java/android/drm/DrmUtils.java
+++ b/drm/java/android/drm/DrmUtils.java
@@ -55,8 +55,8 @@
bufferedStream.read(data);
}
} finally {
- quiteDispose(bufferedStream);
- quiteDispose(inputStream);
+ quietlyDispose(bufferedStream);
+ quietlyDispose(inputStream);
}
return data;
}
@@ -70,7 +70,7 @@
outputStream = new FileOutputStream(path);
outputStream.write(data);
} finally {
- quiteDispose(outputStream);
+ quietlyDispose(outputStream);
}
}
}
@@ -80,7 +80,7 @@
file.delete();
}
- private static void quiteDispose(InputStream stream) {
+ private static void quietlyDispose(InputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -90,7 +90,7 @@
}
}
- private static void quiteDispose(OutputStream stream) {
+ private static void quietlyDispose(OutputStream stream) {
try {
if (null != stream) {
stream.close();
@@ -175,14 +175,34 @@
}
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all values of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> iterator() {
return mMap.values().iterator();
}
+ /**
+ * This method returns an iterator object that can be used to iterate over
+ * all keys of the metadata.
+ *
+ * @return The iterator object.
+ */
public Iterator<String> keyIterator() {
return mMap.keySet().iterator();
}
+ /**
+ * This method retrieves the metadata value associated with a given key.
+ *
+ * @param key The key whose value is being retrieved.
+ *
+ * @return The metadata value associated with the given key. Returns null
+ * if the key is not found.
+ */
public String get(String key) {
return mMap.get(key);
}
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index 70799a6..6735aff 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -49,7 +49,7 @@
void initiateSetup(const sp<AMessage> &msg);
void signalFlush();
void signalResume();
- void initiateShutdown();
+ void initiateShutdown(bool keepComponentAllocated = false);
void initiateAllocateComponent(const sp<AMessage> &msg);
void initiateConfigureComponent(const sp<AMessage> &msg);
@@ -61,6 +61,7 @@
private:
struct BaseState;
struct UninitializedState;
+ struct LoadedState;
struct LoadedToIdleState;
struct IdleToExecutingState;
struct ExecutingState;
@@ -107,6 +108,7 @@
sp<AMessage> mNotify;
sp<UninitializedState> mUninitializedState;
+ sp<LoadedState> mLoadedState;
sp<LoadedToIdleState> mLoadedToIdleState;
sp<IdleToExecutingState> mIdleToExecutingState;
sp<ExecutingState> mExecutingState;
@@ -131,6 +133,12 @@
bool mSentFormat;
bool mIsEncoder;
+ bool mShutdownInProgress;
+
+ // If "mKeepComponentAllocated" we only transition back to Loaded state
+ // and do not release the component instance.
+ bool mKeepComponentAllocated;
+
status_t allocateBuffersOnPort(OMX_U32 portIndex);
status_t freeBuffersOnPort(OMX_U32 portIndex);
status_t freeBuffer(OMX_U32 portIndex, size_t i);
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index 8c11c9c..72ac56a 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -53,8 +53,15 @@
uint32_t flags);
status_t start();
+
+ // Returns to a state in which the component remains allocated but
+ // unconfigured.
status_t stop();
+ // Client MUST call release before releasing final reference to this
+ // object.
+ status_t release();
+
status_t flush();
status_t queueInputBuffer(
@@ -97,6 +104,7 @@
STARTED,
FLUSHING,
STOPPING,
+ RELEASING,
};
enum {
@@ -109,6 +117,7 @@
kWhatConfigure = 'conf',
kWhatStart = 'strt',
kWhatStop = 'stop',
+ kWhatRelease = 'rele',
kWhatDequeueInputBuffer = 'deqI',
kWhatQueueInputBuffer = 'queI',
kWhatDequeueOutputBuffer = 'deqO',
diff --git a/media/libstagefright/timedtext/TimedTextDriver.h b/include/media/stagefright/timedtext/TimedTextDriver.h
similarity index 100%
rename from media/libstagefright/timedtext/TimedTextDriver.h
rename to include/media/stagefright/timedtext/TimedTextDriver.h
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index 675339e..71e698f 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -84,7 +84,7 @@
}
JMediaCodec::~JMediaCodec() {
- mCodec->stop();
+ mCodec->release();
JNIEnv *env = AndroidRuntime::getJNIEnv();
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 85bd7ba..9a9d094 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -165,18 +165,36 @@
protected:
virtual bool onMessageReceived(const sp<AMessage> &msg);
+ virtual void stateEntered();
private:
void onSetup(const sp<AMessage> &msg);
- void onAllocateComponent(const sp<AMessage> &msg);
- void onConfigureComponent(const sp<AMessage> &msg);
- void onStart();
+ bool onAllocateComponent(const sp<AMessage> &msg);
DISALLOW_EVIL_CONSTRUCTORS(UninitializedState);
};
////////////////////////////////////////////////////////////////////////////////
+struct ACodec::LoadedState : public ACodec::BaseState {
+ LoadedState(ACodec *codec);
+
+protected:
+ virtual bool onMessageReceived(const sp<AMessage> &msg);
+ virtual void stateEntered();
+
+private:
+ friend struct ACodec::UninitializedState;
+
+ bool onConfigureComponent(const sp<AMessage> &msg);
+ void onStart();
+ void onShutdown(bool keepComponentAllocated);
+
+ DISALLOW_EVIL_CONSTRUCTORS(LoadedState);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
struct ACodec::LoadedToIdleState : public ACodec::BaseState {
LoadedToIdleState(ACodec *codec);
@@ -312,8 +330,10 @@
ACodec::ACodec()
: mNode(NULL),
mSentFormat(false),
- mIsEncoder(false) {
+ mIsEncoder(false),
+ mShutdownInProgress(false) {
mUninitializedState = new UninitializedState(this);
+ mLoadedState = new LoadedState(this);
mLoadedToIdleState = new LoadedToIdleState(this);
mIdleToExecutingState = new IdleToExecutingState(this);
mExecutingState = new ExecutingState(this);
@@ -369,8 +389,10 @@
(new AMessage(kWhatResume, id()))->post();
}
-void ACodec::initiateShutdown() {
- (new AMessage(kWhatShutdown, id()))->post();
+void ACodec::initiateShutdown(bool keepComponentAllocated) {
+ sp<AMessage> msg = new AMessage(kWhatShutdown, id());
+ msg->setInt32("keepComponentAllocated", keepComponentAllocated);
+ msg->post();
}
status_t ACodec::allocateBuffersOnPort(OMX_U32 portIndex) {
@@ -2492,6 +2514,10 @@
: BaseState(codec) {
}
+void ACodec::UninitializedState::stateEntered() {
+ ALOGV("Now uninitialized");
+}
+
bool ACodec::UninitializedState::onMessageReceived(const sp<AMessage> &msg) {
bool handled = false;
@@ -2511,22 +2537,13 @@
break;
}
- case ACodec::kWhatConfigureComponent:
- {
- onConfigureComponent(msg);
- handled = true;
- break;
- }
-
- case ACodec::kWhatStart:
- {
- onStart();
- handled = true;
- break;
- }
-
case ACodec::kWhatShutdown:
{
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+ CHECK(!keepComponentAllocated);
+
sp<AMessage> notify = mCodec->mNotify->dup();
notify->setInt32("what", ACodec::kWhatShutdownCompleted);
notify->post();
@@ -2554,22 +2571,16 @@
void ACodec::UninitializedState::onSetup(
const sp<AMessage> &msg) {
- onAllocateComponent(msg);
- onConfigureComponent(msg);
- onStart();
+ if (onAllocateComponent(msg)
+ && mCodec->mLoadedState->onConfigureComponent(msg)) {
+ mCodec->mLoadedState->onStart();
+ }
}
-void ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
+bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
ALOGV("onAllocateComponent");
- if (mCodec->mNode != NULL) {
- CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
-
- mCodec->mNativeWindow.clear();
- mCodec->mNode = NULL;
- mCodec->mOMX.clear();
- mCodec->mComponentName.clear();
- }
+ CHECK(mCodec->mNode == NULL);
OMXClient client;
CHECK_EQ(client.connect(), (status_t)OK);
@@ -2628,7 +2639,7 @@
}
mCodec->signalError(OMX_ErrorComponentNotFound);
- return;
+ return false;
}
sp<AMessage> notify = new AMessage(kWhatOMXMessage, mCodec->id());
@@ -2649,9 +2660,96 @@
notify->setString("componentName", mCodec->mComponentName.c_str());
notify->post();
}
+
+ mCodec->changeState(mCodec->mLoadedState);
+
+ return true;
}
-void ACodec::UninitializedState::onConfigureComponent(
+////////////////////////////////////////////////////////////////////////////////
+
+ACodec::LoadedState::LoadedState(ACodec *codec)
+ : BaseState(codec) {
+}
+
+void ACodec::LoadedState::stateEntered() {
+ ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str());
+
+ if (mCodec->mShutdownInProgress) {
+ bool keepComponentAllocated = mCodec->mKeepComponentAllocated;
+
+ mCodec->mShutdownInProgress = false;
+ mCodec->mKeepComponentAllocated = false;
+
+ onShutdown(keepComponentAllocated);
+ }
+}
+
+void ACodec::LoadedState::onShutdown(bool keepComponentAllocated) {
+ if (!keepComponentAllocated) {
+ CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
+
+ mCodec->mNativeWindow.clear();
+ mCodec->mNode = NULL;
+ mCodec->mOMX.clear();
+ mCodec->mComponentName.clear();
+
+ mCodec->changeState(mCodec->mUninitializedState);
+ }
+
+ sp<AMessage> notify = mCodec->mNotify->dup();
+ notify->setInt32("what", ACodec::kWhatShutdownCompleted);
+ notify->post();
+}
+
+bool ACodec::LoadedState::onMessageReceived(const sp<AMessage> &msg) {
+ bool handled = false;
+
+ switch (msg->what()) {
+ case ACodec::kWhatConfigureComponent:
+ {
+ onConfigureComponent(msg);
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatStart:
+ {
+ onStart();
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatShutdown:
+ {
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+
+ onShutdown(keepComponentAllocated);
+
+ handled = true;
+ break;
+ }
+
+ case ACodec::kWhatFlush:
+ {
+ sp<AMessage> notify = mCodec->mNotify->dup();
+ notify->setInt32("what", ACodec::kWhatFlushCompleted);
+ notify->post();
+
+ handled = true;
+ break;
+ }
+
+ default:
+ return BaseState::onMessageReceived(msg);
+ }
+
+ return handled;
+}
+
+bool ACodec::LoadedState::onConfigureComponent(
const sp<AMessage> &msg) {
ALOGV("onConfigureComponent");
@@ -2664,7 +2762,7 @@
if (err != OK) {
mCodec->signalError(OMX_ErrorUndefined, err);
- return;
+ return false;
}
sp<RefBase> obj;
@@ -2682,9 +2780,11 @@
notify->setInt32("what", ACodec::kWhatComponentConfigured);
notify->post();
}
+
+ return true;
}
-void ACodec::UninitializedState::onStart() {
+void ACodec::LoadedState::onStart() {
ALOGV("onStart");
CHECK_EQ(mCodec->mOMX->sendCommand(
@@ -2873,6 +2973,13 @@
switch (msg->what()) {
case kWhatShutdown:
{
+ int32_t keepComponentAllocated;
+ CHECK(msg->findInt32(
+ "keepComponentAllocated", &keepComponentAllocated));
+
+ mCodec->mShutdownInProgress = true;
+ mCodec->mKeepComponentAllocated = keepComponentAllocated;
+
mActive = false;
CHECK_EQ(mCodec->mOMX->sendCommand(
@@ -3210,20 +3317,7 @@
CHECK_EQ(data1, (OMX_U32)OMX_CommandStateSet);
CHECK_EQ(data2, (OMX_U32)OMX_StateLoaded);
- ALOGV("[%s] Now Loaded", mCodec->mComponentName.c_str());
-
- CHECK_EQ(mCodec->mOMX->freeNode(mCodec->mNode), (status_t)OK);
-
- mCodec->mNativeWindow.clear();
- mCodec->mNode = NULL;
- mCodec->mOMX.clear();
- mCodec->mComponentName.clear();
-
- mCodec->changeState(mCodec->mUninitializedState);
-
- sp<AMessage> notify = mCodec->mNotify->dup();
- notify->setInt32("what", ACodec::kWhatShutdownCompleted);
- notify->post();
+ mCodec->changeState(mCodec->mLoadedState);
return true;
}
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index cfb1e29..95bcada 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -58,6 +58,7 @@
LOCAL_C_INCLUDES:= \
$(JNI_H_INCLUDE) \
$(TOP)/frameworks/base/include/media/stagefright/openmax \
+ $(TOP)/frameworks/base/include/media/stagefright/timedtext \
$(TOP)/external/flac/include \
$(TOP)/external/tremolo \
$(TOP)/external/openssl/include \
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 8cfb8d3..b21e86a 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -30,13 +30,12 @@
#include "include/MPEG2TSExtractor.h"
#include "include/WVMExtractor.h"
-#include "timedtext/TimedTextDriver.h"
-
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <media/IMediaPlayerService.h>
#include <media/stagefright/foundation/hexdump.h>
#include <media/stagefright/foundation/ADebug.h>
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include <media/stagefright/AudioPlayer.h>
#include <media/stagefright/DataSource.h>
#include <media/stagefright/FileSource.h>
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index e14b1c4..a9e7f360 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -164,6 +164,13 @@
return PostAndAwaitResponse(msg, &response);
}
+status_t MediaCodec::release() {
+ sp<AMessage> msg = new AMessage(kWhatRelease, id());
+
+ sp<AMessage> response;
+ return PostAndAwaitResponse(msg, &response);
+}
+
status_t MediaCodec::queueInputBuffer(
size_t index,
size_t offset,
@@ -422,6 +429,7 @@
}
case STOPPING:
+ case RELEASING:
{
// Ignore the error, assuming we'll still get
// the shutdown complete notification.
@@ -577,7 +585,9 @@
{
/* size_t index = */updateBuffers(kPortIndexInput, msg);
- if (mState == FLUSHING || mState == STOPPING) {
+ if (mState == FLUSHING
+ || mState == STOPPING
+ || mState == RELEASING) {
returnBuffersToCodecOnPort(kPortIndexInput);
break;
}
@@ -596,7 +606,9 @@
{
/* size_t index = */updateBuffers(kPortIndexOutput, msg);
- if (mState == FLUSHING || mState == STOPPING) {
+ if (mState == FLUSHING
+ || mState == STOPPING
+ || mState == RELEASING) {
returnBuffersToCodecOnPort(kPortIndexOutput);
break;
}
@@ -628,8 +640,12 @@
case ACodec::kWhatShutdownCompleted:
{
- CHECK_EQ(mState, STOPPING);
- setState(UNINITIALIZED);
+ if (mState == STOPPING) {
+ setState(INITIALIZED);
+ } else {
+ CHECK_EQ(mState, RELEASING);
+ setState(UNINITIALIZED);
+ }
(new AMessage)->postReply(mReplyID);
break;
@@ -767,6 +783,28 @@
mReplyID = replyID;
setState(STOPPING);
+ mCodec->initiateShutdown(true /* keepComponentAllocated */);
+ returnBuffersToCodec();
+ break;
+ }
+
+ case kWhatRelease:
+ {
+ uint32_t replyID;
+ CHECK(msg->senderAwaitsResponse(&replyID));
+
+ if (mState != INITIALIZED
+ && mState != CONFIGURED && mState != STARTED) {
+ sp<AMessage> response = new AMessage;
+ response->setInt32("err", INVALID_OPERATION);
+
+ response->postReply(replyID);
+ break;
+ }
+
+ mReplyID = replyID;
+ setState(RELEASING);
+
mCodec->initiateShutdown();
returnBuffersToCodec();
break;
diff --git a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
index 3c4494d..455a510 100644
--- a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp
@@ -791,7 +791,8 @@
)
{
OSCL_UNUSED_ARG(pOverflow);
- for (int i = 0; i < N_FRAME - 1; i++)
+ int i;
+ for (i = 0; i < N_FRAME - 1; i++)
{
st->gp[i] = st->gp[i+1];
}
diff --git a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
index d7287f3..b325e8f 100644
--- a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
+++ b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp
@@ -119,8 +119,9 @@
)
{
int16 value = 0;
+ int16 i;
- for (int16 i = no_of_bits >> 1; i != 0; i--)
+ for (i = no_of_bits >> 1; i != 0; i--)
{
value <<= 2;
diff --git a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
index f2ad333..806851e 100644
--- a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
+++ b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp
@@ -240,11 +240,11 @@
{
int32 i;
- int16 frac;
+ int16 frac, j;
int16 * pt_sig_u = sig_u;
frac = 1;
- for (int16 j = 0; j < L_frame; j++)
+ for (j = 0; j < L_frame; j++)
{
i = ((int32)j * INV_FAC5) >> 13; /* integer part = pos * 1/5 */
diff --git a/media/libstagefright/timedtext/Android.mk b/media/libstagefright/timedtext/Android.mk
index dde2066..d2d5f7b 100644
--- a/media/libstagefright/timedtext/Android.mk
+++ b/media/libstagefright/timedtext/Android.mk
@@ -12,6 +12,7 @@
LOCAL_CFLAGS += -Wno-multichar
LOCAL_C_INCLUDES:= \
$(JNI_H_INCLUDE) \
+ $(TOP)/frameworks/base/include/media/stagefright/timedtext \
$(TOP)/frameworks/base/media/libstagefright
LOCAL_MODULE:= libstagefright_timedtext
diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp
index 9ec9415..c70870e 100644
--- a/media/libstagefright/timedtext/TimedTextDriver.cpp
+++ b/media/libstagefright/timedtext/TimedTextDriver.cpp
@@ -27,8 +27,7 @@
#include <media/stagefright/Utils.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/ALooper.h>
-
-#include "TimedTextDriver.h"
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include "TextDescriptions.h"
#include "TimedTextPlayer.h"
diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp
index bf7cbf6..bda7b46 100644
--- a/media/libstagefright/timedtext/TimedTextPlayer.cpp
+++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp
@@ -20,12 +20,12 @@
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
+#include <media/stagefright/timedtext/TimedTextDriver.h>
#include <media/stagefright/MediaErrors.h>
#include <media/MediaPlayerInterface.h>
#include "TimedTextPlayer.h"
-#include "TimedTextDriver.h"
#include "TimedTextSource.h"
namespace android {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
index e5ecd5c..95e7b5e 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
@@ -44,7 +44,9 @@
public static int mVideoHeight = profile.videoFrameHeight;
public static int mBitRate = profile.videoBitRate;
public static boolean mRemoveVideo = true;
- public static int mDuration = 10000;
+ public static int mDuration = 10 * 1000; // 10 seconds
+ public static int mTimeLapseDuration = 180 * 1000; // 3 minutes
+ public static double mCaptureRate = 0.5; // 2 sec timelapse interval
@Override
public TestSuite getAllTests() {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
index e6177ba..73ee4dd 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
@@ -22,11 +22,13 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
+import java.io.IOException;
import java.io.Writer;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import android.hardware.Camera;
+import android.media.CamcorderProfile;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.os.Handler;
@@ -39,21 +41,21 @@
/**
* Junit / Instrumentation test case for the media player api
-
- */
-public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
-
-
+ */
+public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
+
private String TAG = "MediaRecorderStressTest";
private MediaRecorder mRecorder;
private Camera mCamera;
-
+
private static final int NUMBER_OF_CAMERA_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDER_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDERANDPLAY_STRESS_LOOPS = 50;
private static final int NUMBER_OF_SWTICHING_LOOPS_BW_CAMERA_AND_RECORDER = 200;
- private static final long WAIT_TIME_CAMERA_TEST = 3000; // 3 second
- private static final long WAIT_TIME_RECORDER_TEST = 6000; // 6 second
+ private static final int NUMBER_OF_TIME_LAPSE_LOOPS = 25;
+ private static final int TIME_LAPSE_PLAYBACK_WAIT_TIME = 5* 1000; // 5 seconds
+ private static final long WAIT_TIME_CAMERA_TEST = 3 * 1000; // 3 seconds
+ private static final long WAIT_TIME_RECORDER_TEST = 6 * 1000; // 6 seconds
private static final String OUTPUT_FILE = "/sdcard/temp";
private static final String OUTPUT_FILE_EXT = ".3gp";
private static final String MEDIA_STRESS_OUTPUT =
@@ -61,7 +63,7 @@
private final CameraErrorCallback mCameraErrorCallback = new CameraErrorCallback();
private final RecorderErrorCallback mRecorderErrorCallback = new RecorderErrorCallback();
- private final static int WAIT_TIMEOUT = 10000;
+ private final static int WAIT_TIMEOUT = 10 * 1000; // 10 seconds
private Thread mLooperThread;
private Handler mHandler;
@@ -306,7 +308,7 @@
}
}
- public void removeRecodedVideo(String filename){
+ public void removeRecordedVideo(String filename){
File video = new File(filename);
Log.v(TAG, "remove recorded video " + filename);
video.delete();
@@ -381,7 +383,7 @@
mp.release();
validateRecordedVideo(filename);
if (remove_video) {
- removeRecodedVideo(filename);
+ removeRecordedVideo(filename);
}
output.write(", " + i);
}
@@ -392,4 +394,90 @@
output.write("\n\n");
output.close();
}
+
+ // Test case for stressing time lapse
+ @LargeTest
+ public void testStressTimeLapse() throws Exception {
+ SurfaceHolder mSurfaceHolder;
+ mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
+ int record_duration = MediaRecorderStressTestRunner.mTimeLapseDuration;
+ boolean remove_video = MediaRecorderStressTestRunner.mRemoveVideo;
+ double captureRate = MediaRecorderStressTestRunner.mCaptureRate;
+ String filename;
+ File stressOutFile = new File(MEDIA_STRESS_OUTPUT);
+ Writer output = new BufferedWriter(new FileWriter(stressOutFile, true));
+ output.write("Start camera time lapse stress:\n");
+ output.write("Total number of loops: " + NUMBER_OF_TIME_LAPSE_LOOPS + "\n");
+
+ try {
+ output.write("No of loop: ");
+ for (int i = 0; i < NUMBER_OF_TIME_LAPSE_LOOPS; i++) {
+ filename = OUTPUT_FILE + i + OUTPUT_FILE_EXT;
+ Log.v(TAG, filename);
+ runOnLooper(new Runnable() {
+ @Override
+ public void run() {
+ mRecorder = new MediaRecorder();
+ }
+ });
+
+ // Set callback
+ mRecorder.setOnErrorListener(mRecorderErrorCallback);
+
+ // Set video source
+ mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
+
+ // Set camcorder profile for time lapse
+ CamcorderProfile profile =
+ CamcorderProfile.get(CamcorderProfile.QUALITY_TIME_LAPSE_HIGH);
+ mRecorder.setProfile(profile);
+
+ // Set the timelapse setting; 0.1 = 10 sec timelapse, 0.5 = 2 sec timelapse, etc.
+ // http://developer.android.com/guide/topics/media/camera.html#time-lapse-video
+ mRecorder.setCaptureRate(captureRate);
+
+ // Set output file
+ mRecorder.setOutputFile(filename);
+
+ // Set the preview display
+ Log.v(TAG, "mediaRecorder setPreviewDisplay");
+ mRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
+
+ mRecorder.prepare();
+ mRecorder.start();
+ Thread.sleep(record_duration);
+ Log.v(TAG, "Before stop");
+ mRecorder.stop();
+ mRecorder.release();
+
+ // Start the playback
+ MediaPlayer mp = new MediaPlayer();
+ mp.setDataSource(filename);
+ mp.setDisplay(mSurfaceHolder);
+ mp.prepare();
+ mp.start();
+ Thread.sleep(TIME_LAPSE_PLAYBACK_WAIT_TIME);
+ mp.release();
+ validateRecordedVideo(filename);
+ if(remove_video) {
+ removeRecordedVideo(filename);
+ }
+ output.write(", " + i);
+ }
+ }
+ catch (IllegalStateException e) {
+ assertTrue("Camera time lapse stress test IllegalStateException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (IOException e) {
+ assertTrue("Camera time lapse stress test IOException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (Exception e) {
+ assertTrue("Camera time lapse stress test Exception", false);
+ Log.v(TAG, e.toString());
+ }
+ output.write("\n\n");
+ output.close();
+ }
}
diff --git a/packages/FakeOemFeatures/Android.mk b/packages/FakeOemFeatures/Android.mk
new file mode 100644
index 0000000..b0b0eeb
--- /dev/null
+++ b/packages/FakeOemFeatures/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := FakeOemFeatures
+LOCAL_CERTIFICATE := platform
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/FakeOemFeatures/AndroidManifest.xml b/packages/FakeOemFeatures/AndroidManifest.xml
new file mode 100644
index 0000000..57938ac
--- /dev/null
+++ b/packages/FakeOemFeatures/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.fakeoemfeatures"
+ coreApp="true"
+ >
+
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
+
+ <application
+ android:persistent="true"
+ android:name=".FakeApp"
+ android:allowClearUserData="false"
+ android:allowBackup="false"
+ android:hardwareAccelerated="true"
+ android:label="Fake OEM Features">
+
+ <service android:name=".FakeCoreService" android:process=":core"
+ android:label="Fake OEM Core Service" />
+ <service android:name=".FakeCoreService2" android:process=":core"
+ android:label="Fake OEM Core Service Also" />
+ <service android:name=".FakeCoreService3" android:process=":core"
+ android:label="Fake OEM Core Service Me Too" />
+ <service android:name=".FakeBackgroundService" android:process=":background"
+ android:label="Fake OEM Bg Service" />
+ </application>
+</manifest>
diff --git a/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2 b/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/FakeOemFeatures/MODULE_LICENSE_APACHE2
diff --git a/packages/FakeOemFeatures/NOTICE b/packages/FakeOemFeatures/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/packages/FakeOemFeatures/NOTICE
@@ -0,0 +1,190 @@
+
+ Copyright (c) 2005-2008, The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
new file mode 100644
index 0000000..436e579
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeApp.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.fakeoemfeatures;
+
+import android.app.ActivityManager;
+import android.app.ActivityThread;
+import android.app.AlertDialog;
+import android.app.Application;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.util.Slog;
+import android.view.Display;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+public class FakeApp extends Application {
+ // Stuffing of 20MB
+ static final int STUFFING_SIZE_BYTES = 20*1024*1024;
+ static final int STUFFING_SIZE_INTS = STUFFING_SIZE_BYTES/4;
+ int[] mStuffing;
+
+ // Assume 4k pages.
+ static final int PAGE_SIZE = 4*1024;
+
+ static final long TICK_DELAY = 4*60*60*1000; // One hour
+ static final int MSG_TICK = 1;
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ // Our service is IMPORTANT. We know, we wrote it.
+ // We need to keep that thing running. Because WE KNOW.
+ // Damn you users, STOP MESSING WITH US.
+ startService(new Intent(FakeApp.this, FakeBackgroundService.class));
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ // Always run another process for more per-process overhead.
+ ServiceConnection mServiceConnection = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+ ServiceConnection mServiceConnection2 = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+ ServiceConnection mServiceConnection3 = new ServiceConnection() {
+ @Override public void onServiceConnected(ComponentName name, IBinder service) {
+ }
+
+ @Override public void onServiceDisconnected(ComponentName name) {
+ }
+ };
+
+ @Override
+ public void onCreate() {
+ String processName = ActivityThread.currentPackageName();
+ Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
+ if (!getApplicationInfo().packageName.equals(processName)) {
+ // If we are not in the main process of the app, then don't do
+ // our extra overhead stuff.
+ return;
+ }
+
+ final WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
+ final Display display = wm.getDefaultDisplay();
+
+ // Check to make sure we are not running on a user build. If this
+ // is a user build, WARN! Do not want!
+ if ("user".equals(android.os.Build.TYPE)) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Should not be on user build");
+ builder.setMessage("The app Fake OEM Features should not be installed on a "
+ + "user build. Please remove this .apk before shipping this build to "
+ + " your customers!");
+ builder.setCancelable(false);
+ builder.setPositiveButton("I understand", null);
+ Dialog dialog = builder.create();
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ dialog.show();
+ }
+
+ // Make a fake window that is always around eating graphics resources.
+ FakeView view = new FakeView(this);
+ WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
+ if (ActivityManager.isHighEndGfx(display)) {
+ lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+ }
+ lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
+ lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
+ int maxSize = display.getMaximumSizeDimension();
+ maxSize *= 2;
+ lp.x = maxSize;
+ lp.y = maxSize;
+ lp.setTitle(getPackageName());
+ wm.addView(view, lp);
+
+ // Bind to a fake service we want to keep running in another process.
+ bindService(new Intent(this, FakeCoreService.class), mServiceConnection,
+ Context.BIND_AUTO_CREATE);
+ bindService(new Intent(this, FakeCoreService2.class), mServiceConnection2,
+ Context.BIND_AUTO_CREATE);
+ bindService(new Intent(this, FakeCoreService3.class), mServiceConnection3,
+ Context.BIND_AUTO_CREATE);
+
+ // Start to a fake service that should run in the background of
+ // another process.
+ mHandler.sendEmptyMessage(MSG_TICK);
+
+ // Make a fake allocation to consume some RAM.
+ mStuffing = new int[STUFFING_SIZE_INTS];
+ for (int i=0; i<STUFFING_SIZE_BYTES/PAGE_SIZE; i++) {
+ // Fill each page with a unique value.
+ final int VAL = i*2 + 100;
+ final int OFF = (i*PAGE_SIZE)/4;
+ for (int j=0; j<(PAGE_SIZE/4); j++) {
+ mStuffing[OFF+j] = VAL;
+ }
+ }
+ }
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
new file mode 100644
index 0000000..5d1a398
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeBackgroundService.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.fakeoemfeatures;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import android.app.Dialog;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.view.Display;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+public class FakeBackgroundService extends Service {
+ final ArrayList<int[]> mAllocs = new ArrayList<int[]>();
+
+ final Random mRandom = new Random();
+
+ static final long TICK_DELAY = 30*1000; // 30 seconds
+ static final int MSG_TICK = 1;
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ // We are awesome! To prove we are doing awesome stuff,
+ // we must use some memory! It wouldn't be awesome if
+ // we didn't use memory!
+ for (int i=0; i<5; i++) {
+ try {
+ int[] alloc = new int[FakeApp.PAGE_SIZE/4];
+ mAllocs.add(alloc);
+ final int VAL = mRandom.nextInt();
+ for (int j=0; j<FakeApp.PAGE_SIZE/4; j++) {
+ alloc[j] = VAL;
+ }
+ } catch (OutOfMemoryError e) {
+ }
+ }
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ @Override public void onCreate() {
+ super.onCreate();
+ mHandler.sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+
+ final WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
+ final Display display = wm.getDefaultDisplay();
+
+ // Make a fake window that is always around eating graphics resources.
+ FakeView view = new FakeView(this);
+ Dialog dialog = new Dialog(this, android.R.style.Theme_Holo_Dialog);
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ dialog.getWindow().setFlags(
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
+ | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+ | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
+ | WindowManager.LayoutParams.FLAG_DIM_BEHIND);
+ dialog.getWindow().setDimAmount(0);
+ dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT);
+ WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
+ int maxSize = display.getMaximumSizeDimension();
+ maxSize *= 2;
+ lp.x = maxSize;
+ lp.y = maxSize;
+ lp.setTitle(getPackageName() + ":background");
+ dialog.getWindow().setAttributes(lp);
+ dialog.getWindow().setContentView(view);
+ dialog.show();
+ }
+
+ @Override public void onDestroy() {
+ super.onDestroy();
+ mHandler.removeMessages(MSG_TICK);
+ }
+
+ @Override public IBinder onBind(Intent intent) {
+ return null;
+ }
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java
new file mode 100644
index 0000000..86bc506
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.fakeoemfeatures;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+
+public class FakeCoreService extends Service {
+ final Binder mBinder = new Binder();
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return mBinder;
+ }
+}
diff --git a/services/audioflinger/AudioBufferProvider.cpp b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java
similarity index 65%
rename from services/audioflinger/AudioBufferProvider.cpp
rename to packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java
index 678fd58..f06988d 100644
--- a/services/audioflinger/AudioBufferProvider.cpp
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService2.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,7 @@
* limitations under the License.
*/
-#undef __STRICT_ANSI__
-#define __STDINT_LIMITS
-#define __STDC_LIMIT_MACROS
-#include <stdint.h>
+package com.android.fakeoemfeatures;
-#include "AudioBufferProvider.h"
-
-namespace android {
-
-const int64_t AudioBufferProvider::kInvalidPTS = INT64_MAX;
-
-}; // namespace android
+public class FakeCoreService2 extends FakeCoreService {
+}
diff --git a/services/audioflinger/AudioBufferProvider.cpp b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java
similarity index 65%
copy from services/audioflinger/AudioBufferProvider.cpp
copy to packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java
index 678fd58..a35adb2 100644
--- a/services/audioflinger/AudioBufferProvider.cpp
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeCoreService3.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,7 @@
* limitations under the License.
*/
-#undef __STRICT_ANSI__
-#define __STDINT_LIMITS
-#define __STDC_LIMIT_MACROS
-#include <stdint.h>
+package com.android.fakeoemfeatures;
-#include "AudioBufferProvider.h"
-
-namespace android {
-
-const int64_t AudioBufferProvider::kInvalidPTS = INT64_MAX;
-
-}; // namespace android
+public class FakeCoreService3 extends FakeCoreService {
+}
diff --git a/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java
new file mode 100644
index 0000000..276d55ee
--- /dev/null
+++ b/packages/FakeOemFeatures/src/com/android/fakeoemfeatures/FakeView.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.fakeoemfeatures;
+
+import java.util.Random;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.os.Handler;
+import android.os.Message;
+import android.view.View;
+
+/**
+ * Dummy view to emulate stuff an OEM may want to do.
+ */
+public class FakeView extends View {
+ static final long TICK_DELAY = 30*1000; // 30 seconds
+ static final int MSG_TICK = 1;
+
+ final Handler mHandler = new Handler() {
+ @Override public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MSG_TICK:
+ invalidate();
+ sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ break;
+ default:
+ super.handleMessage(msg);
+ break;
+ }
+ }
+ };
+
+ final Paint mPaint = new Paint();
+ final Random mRandom = new Random();
+
+ public FakeView(Context context) {
+ super(context);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mHandler.sendEmptyMessageDelayed(MSG_TICK, TICK_DELAY);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mHandler.removeMessages(MSG_TICK);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ canvas.drawColor(0xff000000);
+ mPaint.setTextSize(mRandom.nextInt(40) + 10);
+ mPaint.setColor(0xff000000 + mRandom.nextInt(0x1000000));
+ int x = mRandom.nextInt(getWidth()) - (getWidth()/2);
+ int y = mRandom.nextInt(getHeight());
+ canvas.drawText("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ x, y, mPaint);
+ }
+}
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index d19fd81..82fcc88 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -68,7 +68,7 @@
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_home"
systemui:keyCode="3"
- systemui:keyRepeat="false"
+ systemui:keyRepeat="true"
android:layout_weight="0"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_home"
diff --git a/packages/VpnDialogs/res/values-af/strings.xml b/packages/VpnDialogs/res/values-af/strings.xml
index 6f9ac18..2c23fa3 100644
--- a/packages/VpnDialogs/res/values-af/strings.xml
+++ b/packages/VpnDialogs/res/values-af/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tydsduur:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gestuur:"</string>
<string name="data_received" msgid="4062776929376067820">"Ontvang:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> grepe/<xliff:g id="NUMBER_1">%2$s</xliff:g> pakkies"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-am/strings.xml b/packages/VpnDialogs/res/values-am/strings.xml
index c13c56b..7fc9897 100644
--- a/packages/VpnDialogs/res/values-am/strings.xml
+++ b/packages/VpnDialogs/res/values-am/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"ጊዜ"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ተልኳል ለ:"</string>
<string name="data_received" msgid="4062776929376067820">"ተቀብሏል፡"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> ባይትስ / <xliff:g id="NUMBER_1">%2$s</xliff:g> ፓኬቶች"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ar/strings.xml b/packages/VpnDialogs/res/values-ar/strings.xml
index 337b2ce..2380fa2 100644
--- a/packages/VpnDialogs/res/values-ar/strings.xml
+++ b/packages/VpnDialogs/res/values-ar/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"المدة:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"مرسل:"</string>
<string name="data_received" msgid="4062776929376067820">"تم الاستلام:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> بايت / <xliff:g id="NUMBER_1">%2$s</xliff:g> من الحزم"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-be/strings.xml b/packages/VpnDialogs/res/values-be/strings.xml
index 45baff5..af43aef 100644
--- a/packages/VpnDialogs/res/values-be/strings.xml
+++ b/packages/VpnDialogs/res/values-be/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Працягласць:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Адпраўлена:"</string>
<string name="data_received" msgid="4062776929376067820">"Атрымана:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> байт / <xliff:g id="NUMBER_1">%2$s</xliff:g> пакеты"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-bg/strings.xml b/packages/VpnDialogs/res/values-bg/strings.xml
index 5d186a3..7ecfac7 100644
--- a/packages/VpnDialogs/res/values-bg/strings.xml
+++ b/packages/VpnDialogs/res/values-bg/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Продължителност:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Изпратено:"</string>
<string name="data_received" msgid="4062776929376067820">"Получено:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> байта/ <xliff:g id="NUMBER_1">%2$s</xliff:g> пакета"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ca/strings.xml b/packages/VpnDialogs/res/values-ca/strings.xml
index 91236aa..e5332e0 100644
--- a/packages/VpnDialogs/res/values-ca/strings.xml
+++ b/packages/VpnDialogs/res/values-ca/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durada:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviat:"</string>
<string name="data_received" msgid="4062776929376067820">"Rebut:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> paquets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-cs/strings.xml b/packages/VpnDialogs/res/values-cs/strings.xml
index ee737a1..28e861f 100644
--- a/packages/VpnDialogs/res/values-cs/strings.xml
+++ b/packages/VpnDialogs/res/values-cs/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Doba trvání:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Odesláno:"</string>
<string name="data_received" msgid="4062776929376067820">"Přijato:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bajtů / <xliff:g id="NUMBER_1">%2$s</xliff:g> paketů"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-da/strings.xml b/packages/VpnDialogs/res/values-da/strings.xml
index 2a48a90..a226d0e 100644
--- a/packages/VpnDialogs/res/values-da/strings.xml
+++ b/packages/VpnDialogs/res/values-da/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Varighed:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sendt:"</string>
<string name="data_received" msgid="4062776929376067820">"Modtaget:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakker"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-de/strings.xml b/packages/VpnDialogs/res/values-de/strings.xml
index 0d2ee85..124a985 100644
--- a/packages/VpnDialogs/res/values-de/strings.xml
+++ b/packages/VpnDialogs/res/values-de/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Dauer:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gesendet:"</string>
<string name="data_received" msgid="4062776929376067820">"Empfangen:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> Byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> Pakete"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-el/strings.xml b/packages/VpnDialogs/res/values-el/strings.xml
index b82272a..5aefde4 100644
--- a/packages/VpnDialogs/res/values-el/strings.xml
+++ b/packages/VpnDialogs/res/values-el/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Διάρκεια:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Στάλθηκε:"</string>
<string name="data_received" msgid="4062776929376067820">"Λήφθηκε:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> πακέτα"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-en-rGB/strings.xml b/packages/VpnDialogs/res/values-en-rGB/strings.xml
index d7c411a..afc46d8 100644
--- a/packages/VpnDialogs/res/values-en-rGB/strings.xml
+++ b/packages/VpnDialogs/res/values-en-rGB/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duration:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sent:"</string>
<string name="data_received" msgid="4062776929376067820">"Received:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> packets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-es-rUS/strings.xml b/packages/VpnDialogs/res/values-es-rUS/strings.xml
index 58e72d1..4276065 100644
--- a/packages/VpnDialogs/res/values-es-rUS/strings.xml
+++ b/packages/VpnDialogs/res/values-es-rUS/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duración:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviados:"</string>
<string name="data_received" msgid="4062776929376067820">"Recibidos:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquetes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-es/strings.xml b/packages/VpnDialogs/res/values-es/strings.xml
index 79ad80c..272042a 100644
--- a/packages/VpnDialogs/res/values-es/strings.xml
+++ b/packages/VpnDialogs/res/values-es/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duración:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviado:"</string>
<string name="data_received" msgid="4062776929376067820">"Recibido:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquetes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-et/strings.xml b/packages/VpnDialogs/res/values-et/strings.xml
index 3a1ac5a..c016eb0 100644
--- a/packages/VpnDialogs/res/values-et/strings.xml
+++ b/packages/VpnDialogs/res/values-et/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Kestus:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Saadetud:"</string>
<string name="data_received" msgid="4062776929376067820">"Vastu on võetud:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> baiti / <xliff:g id="NUMBER_1">%2$s</xliff:g> paketti"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fa/strings.xml b/packages/VpnDialogs/res/values-fa/strings.xml
index 9a76594..7bd5590 100644
--- a/packages/VpnDialogs/res/values-fa/strings.xml
+++ b/packages/VpnDialogs/res/values-fa/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"مدت زمان:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ارسال شده:"</string>
<string name="data_received" msgid="4062776929376067820">"دریافتی:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> بایت / <xliff:g id="NUMBER_1">%2$s</xliff:g> بسته"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fi/strings.xml b/packages/VpnDialogs/res/values-fi/strings.xml
index c8d830c..2ca550d 100644
--- a/packages/VpnDialogs/res/values-fi/strings.xml
+++ b/packages/VpnDialogs/res/values-fi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Kesto:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Lähetetty:"</string>
<string name="data_received" msgid="4062776929376067820">"Vastaanotettu:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> tavua / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakettia"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-fr/strings.xml b/packages/VpnDialogs/res/values-fr/strings.xml
index e38c1a2..64334fd 100644
--- a/packages/VpnDialogs/res/values-fr/strings.xml
+++ b/packages/VpnDialogs/res/values-fr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durée :"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Envoyé :"</string>
<string name="data_received" msgid="4062776929376067820">"Reçu :"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> octets / <xliff:g id="NUMBER_1">%2$s</xliff:g> paquets"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hi/strings.xml b/packages/VpnDialogs/res/values-hi/strings.xml
index 7166877..e2cb51a 100644
--- a/packages/VpnDialogs/res/values-hi/strings.xml
+++ b/packages/VpnDialogs/res/values-hi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"अवधि:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"भेजे गए:"</string>
<string name="data_received" msgid="4062776929376067820">"प्राप्त:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> बाइट / <xliff:g id="NUMBER_1">%2$s</xliff:g> पैकेट"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hr/strings.xml b/packages/VpnDialogs/res/values-hr/strings.xml
index cdbffbc..f825bef 100644
--- a/packages/VpnDialogs/res/values-hr/strings.xml
+++ b/packages/VpnDialogs/res/values-hr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trajanje:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Poslano:"</string>
<string name="data_received" msgid="4062776929376067820">"Primljeno:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"Bajtova: <xliff:g id="NUMBER_0">%1$s</xliff:g>/paketa: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-hu/strings.xml b/packages/VpnDialogs/res/values-hu/strings.xml
index a268402..cb12f27 100644
--- a/packages/VpnDialogs/res/values-hu/strings.xml
+++ b/packages/VpnDialogs/res/values-hu/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Időtartam:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Elküldve:"</string>
<string name="data_received" msgid="4062776929376067820">"Érkezett:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bájt/<xliff:g id="NUMBER_1">%2$s</xliff:g> adatcsomag"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-in/strings.xml b/packages/VpnDialogs/res/values-in/strings.xml
index 1721d68..c9710e5 100644
--- a/packages/VpnDialogs/res/values-in/strings.xml
+++ b/packages/VpnDialogs/res/values-in/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durasi:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Terkirim:"</string>
<string name="data_received" msgid="4062776929376067820">"Diterima:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-it/strings.xml b/packages/VpnDialogs/res/values-it/strings.xml
index 98e5cc9..224f083 100644
--- a/packages/VpnDialogs/res/values-it/strings.xml
+++ b/packages/VpnDialogs/res/values-it/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durata:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Inviati:"</string>
<string name="data_received" msgid="4062776929376067820">"Ricevuti:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> pacchetti"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-iw/strings.xml b/packages/VpnDialogs/res/values-iw/strings.xml
index 4b8d125..bb845ee 100644
--- a/packages/VpnDialogs/res/values-iw/strings.xml
+++ b/packages/VpnDialogs/res/values-iw/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"משך:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"נשלח:"</string>
<string name="data_received" msgid="4062776929376067820">"התקבל:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> בתים / <xliff:g id="NUMBER_1">%2$s</xliff:g> מנות"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ja/strings.xml b/packages/VpnDialogs/res/values-ja/strings.xml
index 751162f..a88c388 100644
--- a/packages/VpnDialogs/res/values-ja/strings.xml
+++ b/packages/VpnDialogs/res/values-ja/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"期間:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"送信:"</string>
<string name="data_received" msgid="4062776929376067820">"受信:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g>バイト/<xliff:g id="NUMBER_1">%2$s</xliff:g>パケット"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ko/strings.xml b/packages/VpnDialogs/res/values-ko/strings.xml
index cfc4ffc..38a5e2e 100644
--- a/packages/VpnDialogs/res/values-ko/strings.xml
+++ b/packages/VpnDialogs/res/values-ko/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"기간:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"보냄:"</string>
<string name="data_received" msgid="4062776929376067820">"수신됨:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g>바이트/<xliff:g id="NUMBER_1">%2$s</xliff:g>패킷"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-lt/strings.xml b/packages/VpnDialogs/res/values-lt/strings.xml
index e70c5e8..8ed3045 100644
--- a/packages/VpnDialogs/res/values-lt/strings.xml
+++ b/packages/VpnDialogs/res/values-lt/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trukmė:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Išsiųsta"</string>
<string name="data_received" msgid="4062776929376067820">"Gauta"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"Baitų: <xliff:g id="NUMBER_0">%1$s</xliff:g> baitų / paketų: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-lv/strings.xml b/packages/VpnDialogs/res/values-lv/strings.xml
index 2e1a9f7c..2f41747 100644
--- a/packages/VpnDialogs/res/values-lv/strings.xml
+++ b/packages/VpnDialogs/res/values-lv/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Ilgums:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Nosūtīts:"</string>
<string name="data_received" msgid="4062776929376067820">"Saņemts:"</string>
- <string name="blank_value" msgid="6278484582661984635">"—"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> baiti/<xliff:g id="NUMBER_1">%2$s</xliff:g> paketes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ms/strings.xml b/packages/VpnDialogs/res/values-ms/strings.xml
index f17d851..417fbae 100644
--- a/packages/VpnDialogs/res/values-ms/strings.xml
+++ b/packages/VpnDialogs/res/values-ms/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tempoh:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Dihantar:"</string>
<string name="data_received" msgid="4062776929376067820">"Diterima:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bait / <xliff:g id="NUMBER_1">%2$s</xliff:g> bingkisan"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-nb/strings.xml b/packages/VpnDialogs/res/values-nb/strings.xml
index fbd9185..f716422 100644
--- a/packages/VpnDialogs/res/values-nb/strings.xml
+++ b/packages/VpnDialogs/res/values-nb/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Varighet:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Sendt:"</string>
<string name="data_received" msgid="4062776929376067820">"Mottatt:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> pakker"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-nl/strings.xml b/packages/VpnDialogs/res/values-nl/strings.xml
index 7f6e0b1..795071e 100644
--- a/packages/VpnDialogs/res/values-nl/strings.xml
+++ b/packages/VpnDialogs/res/values-nl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duur:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Verzonden:"</string>
<string name="data_received" msgid="4062776929376067820">"Ontvangen:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> pakketten"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pl/strings.xml b/packages/VpnDialogs/res/values-pl/strings.xml
index 80c5a7c..a918162 100644
--- a/packages/VpnDialogs/res/values-pl/strings.xml
+++ b/packages/VpnDialogs/res/values-pl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Czas trwania:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Wysłano:"</string>
<string name="data_received" msgid="4062776929376067820">"Odebrano:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"Bajty: <xliff:g id="NUMBER_0">%1$s</xliff:g> / pakiety: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pt-rPT/strings.xml b/packages/VpnDialogs/res/values-pt-rPT/strings.xml
index e25ef66..007cd51 100644
--- a/packages/VpnDialogs/res/values-pt-rPT/strings.xml
+++ b/packages/VpnDialogs/res/values-pt-rPT/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duração:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviados:"</string>
<string name="data_received" msgid="4062776929376067820">"Recebidos:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes / <xliff:g id="NUMBER_1">%2$s</xliff:g> pacotes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-pt/strings.xml b/packages/VpnDialogs/res/values-pt/strings.xml
index 8a16e87..07c8482 100644
--- a/packages/VpnDialogs/res/values-pt/strings.xml
+++ b/packages/VpnDialogs/res/values-pt/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Duração:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Enviado:"</string>
<string name="data_received" msgid="4062776929376067820">"Recebido:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bytes/<xliff:g id="NUMBER_1">%2$s</xliff:g> pacotes"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ro/strings.xml b/packages/VpnDialogs/res/values-ro/strings.xml
index 5b71cfa..fbc0d808 100644
--- a/packages/VpnDialogs/res/values-ro/strings.xml
+++ b/packages/VpnDialogs/res/values-ro/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Durată:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Trimise:"</string>
<string name="data_received" msgid="4062776929376067820">"Primite:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> (de) octeţi/<xliff:g id="NUMBER_1">%2$s</xliff:g> (de) pachete"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-ru/strings.xml b/packages/VpnDialogs/res/values-ru/strings.xml
index 411c51a..b65e9d3 100644
--- a/packages/VpnDialogs/res/values-ru/strings.xml
+++ b/packages/VpnDialogs/res/values-ru/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Продолжительность:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Отправлено:"</string>
<string name="data_received" msgid="4062776929376067820">"Получено:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> Б; пакетов: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sk/strings.xml b/packages/VpnDialogs/res/values-sk/strings.xml
index 733efd4..6321bc2 100644
--- a/packages/VpnDialogs/res/values-sk/strings.xml
+++ b/packages/VpnDialogs/res/values-sk/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trvanie:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Odoslané:"</string>
<string name="data_received" msgid="4062776929376067820">"Prijaté:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> B/<xliff:g id="NUMBER_1">%2$s</xliff:g> paketov"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sl/strings.xml b/packages/VpnDialogs/res/values-sl/strings.xml
index 92806fc..a93b08a 100644
--- a/packages/VpnDialogs/res/values-sl/strings.xml
+++ b/packages/VpnDialogs/res/values-sl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Trajanje:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Poslano:"</string>
<string name="data_received" msgid="4062776929376067820">"Prejeto:"</string>
- <string name="blank_value" msgid="6278484582661984635">"-"</string>
<string name="data_value_format" msgid="2192466557826897580">"Št. bajtov: <xliff:g id="NUMBER_0">%1$s</xliff:g>/št. paketov: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sr/strings.xml b/packages/VpnDialogs/res/values-sr/strings.xml
index 425ee89..10a25ef 100644
--- a/packages/VpnDialogs/res/values-sr/strings.xml
+++ b/packages/VpnDialogs/res/values-sr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Трајање:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Послато:"</string>
<string name="data_received" msgid="4062776929376067820">"Примљенo:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> бајт(ов)а / <xliff:g id="NUMBER_1">%2$s</xliff:g> пакета"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sv/strings.xml b/packages/VpnDialogs/res/values-sv/strings.xml
index 7cec26c..fdfc13f 100644
--- a/packages/VpnDialogs/res/values-sv/strings.xml
+++ b/packages/VpnDialogs/res/values-sv/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Längd:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Skickat:"</string>
<string name="data_received" msgid="4062776929376067820">"Mottaget:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte/<xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-sw/strings.xml b/packages/VpnDialogs/res/values-sw/strings.xml
index 4607728..f987aed 100644
--- a/packages/VpnDialogs/res/values-sw/strings.xml
+++ b/packages/VpnDialogs/res/values-sw/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Muda:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Zilizotumwa:"</string>
<string name="data_received" msgid="4062776929376067820">"Imepokelewa:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"baiti <xliff:g id="NUMBER_0">%1$s</xliff:g> / pakiti <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-th/strings.xml b/packages/VpnDialogs/res/values-th/strings.xml
index 2e9f6f9..0b4a31c 100644
--- a/packages/VpnDialogs/res/values-th/strings.xml
+++ b/packages/VpnDialogs/res/values-th/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"ระยะเวลา:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"ส่งแล้ว:"</string>
<string name="data_received" msgid="4062776929376067820">"รับแล้ว:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> ไบต์/<xliff:g id="NUMBER_1">%2$s</xliff:g> แพ็คเก็ต"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-tl/strings.xml b/packages/VpnDialogs/res/values-tl/strings.xml
index 4826d8f..725a512 100644
--- a/packages/VpnDialogs/res/values-tl/strings.xml
+++ b/packages/VpnDialogs/res/values-tl/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Tagal:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Ipinadala:"</string>
<string name="data_received" msgid="4062776929376067820">"Natanggap:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> (na) byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> (na) packet"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-tr/strings.xml b/packages/VpnDialogs/res/values-tr/strings.xml
index f4fd967..704a8cd 100644
--- a/packages/VpnDialogs/res/values-tr/strings.xml
+++ b/packages/VpnDialogs/res/values-tr/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Süre:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Gönderilen:"</string>
<string name="data_received" msgid="4062776929376067820">"Alınan:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> bayt / <xliff:g id="NUMBER_1">%2$s</xliff:g> paket"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-uk/strings.xml b/packages/VpnDialogs/res/values-uk/strings.xml
index a12bfea..b0db053 100644
--- a/packages/VpnDialogs/res/values-uk/strings.xml
+++ b/packages/VpnDialogs/res/values-uk/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Тривалість:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Надіслано:"</string>
<string name="data_received" msgid="4062776929376067820">"Отримано:"</string>
- <string name="blank_value" msgid="6278484582661984635">"–"</string>
<string name="data_value_format" msgid="2192466557826897580">"Байтів: <xliff:g id="NUMBER_0">%1$s</xliff:g> / пакетів: <xliff:g id="NUMBER_1">%2$s</xliff:g>"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-vi/strings.xml b/packages/VpnDialogs/res/values-vi/strings.xml
index eab3812..8cc8e71 100644
--- a/packages/VpnDialogs/res/values-vi/strings.xml
+++ b/packages/VpnDialogs/res/values-vi/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Thời lượng:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Đã gửi:"</string>
<string name="data_received" msgid="4062776929376067820">"Đã nhận:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> byte / <xliff:g id="NUMBER_1">%2$s</xliff:g> gói"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zh-rCN/strings.xml b/packages/VpnDialogs/res/values-zh-rCN/strings.xml
index 24774eb..7fdb368 100644
--- a/packages/VpnDialogs/res/values-zh-rCN/strings.xml
+++ b/packages/VpnDialogs/res/values-zh-rCN/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"时长:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"已发送:"</string>
<string name="data_received" msgid="4062776929376067820">"已接收:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> 字节/<xliff:g id="NUMBER_1">%2$s</xliff:g> 个数据包"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zh-rTW/strings.xml b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
index f7663c2..080330f 100644
--- a/packages/VpnDialogs/res/values-zh-rTW/strings.xml
+++ b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"持續時間:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"已傳送:"</string>
<string name="data_received" msgid="4062776929376067820">"已接收:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> 位元組 / <xliff:g id="NUMBER_1">%2$s</xliff:g> 個封包"</string>
</resources>
diff --git a/packages/VpnDialogs/res/values-zu/strings.xml b/packages/VpnDialogs/res/values-zu/strings.xml
index 67eeeb9..4594748 100644
--- a/packages/VpnDialogs/res/values-zu/strings.xml
+++ b/packages/VpnDialogs/res/values-zu/strings.xml
@@ -26,6 +26,5 @@
<string name="duration" msgid="3584782459928719435">"Ubude besikhathi:"</string>
<string name="data_transmitted" msgid="7988167672982199061">"Thunyelwe:"</string>
<string name="data_received" msgid="4062776929376067820">"Okwamukelwe:"</string>
- <string name="blank_value" msgid="6278484582661984635">"--"</string>
<string name="data_value_format" msgid="2192466557826897580">"<xliff:g id="NUMBER_0">%1$s</xliff:g> amaphakethe/ <xliff:g id="NUMBER_1">%2$s</xliff:g> amabhayithi"</string>
</resources>
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 8f35afb..1763674 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -39,6 +39,8 @@
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.RectF;
+import android.media.AudioManager;
+import android.media.IAudioService;
import android.os.BatteryManager;
import android.os.Bundle;
import android.os.Handler;
@@ -64,6 +66,7 @@
import com.android.internal.telephony.ITelephony;
import com.android.internal.widget.PointerLocationView;
+import android.speech.RecognizerIntent;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
@@ -133,8 +136,6 @@
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
-import android.media.IAudioService;
-import android.media.AudioManager;
import java.io.File;
import java.io.FileDescriptor;
@@ -176,6 +177,7 @@
static final int LONG_PRESS_HOME_NOTHING = 0;
static final int LONG_PRESS_HOME_RECENT_DIALOG = 1;
static final int LONG_PRESS_HOME_RECENT_SYSTEM_UI = 2;
+ static final int LONG_PRESS_HOME_VOICE_SEARCH = 3;
// wallpaper is at the bottom, though the window manager may move it.
static final int WALLPAPER_LAYER = 2;
@@ -710,6 +712,9 @@
mLongPressOnHomeBehavior > LONG_PRESS_HOME_RECENT_SYSTEM_UI) {
mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING;
}
+ if (hasNavigationBar()) {
+ mLongPressOnHomeBehavior = LONG_PRESS_HOME_VOICE_SEARCH;
+ }
}
if (mLongPressOnHomeBehavior != LONG_PRESS_HOME_NOTHING) {
@@ -729,6 +734,18 @@
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
}
+ } else if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_VOICE_SEARCH) {
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ try {
+ intent.setFlags(
+ Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ mContext.startActivity(intent);
+ } catch (ActivityNotFoundException e) {
+ Log.e(TAG, "Unable to launch. tag=" + TAG + " intent=" + intent, e);
+ } catch (SecurityException e) {
+ Log.e(TAG, "PhoneWindowManager does not have the permission to launch " +
+ "tag=" + TAG + " intent=" + intent, e);
+ }
}
}
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 22fa752..86692e7 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -7,7 +7,6 @@
AudioMixer.cpp.arm \
AudioResampler.cpp.arm \
AudioPolicyService.cpp \
- AudioBufferProvider.cpp \
ServiceUtilities.cpp
# AudioResamplerSinc.cpp.arm
# AudioResamplerCubic.cpp.arm
diff --git a/services/audioflinger/AudioBufferProvider.h b/services/audioflinger/AudioBufferProvider.h
index 62ad6bd..43e4de7 100644
--- a/services/audioflinger/AudioBufferProvider.h
+++ b/services/audioflinger/AudioBufferProvider.h
@@ -17,8 +17,6 @@
#ifndef ANDROID_AUDIO_BUFFER_PROVIDER_H
#define ANDROID_AUDIO_BUFFER_PROVIDER_H
-#include <stdint.h>
-#include <sys/types.h>
#include <utils/Errors.h>
namespace android {
@@ -29,6 +27,7 @@
public:
struct Buffer {
+ Buffer() : raw(NULL), frameCount(0) { }
union {
void* raw;
short* i16;
@@ -40,12 +39,12 @@
virtual ~AudioBufferProvider() {}
// value representing an invalid presentation timestamp
- static const int64_t kInvalidPTS;
+ static const int64_t kInvalidPTS = 0x7FFFFFFFFFFFFFFFLL; // <stdint.h> is too painful
// pts is the local time when the next sample yielded by getNextBuffer
// will be rendered.
// Pass kInvalidPTS if the PTS is unknown or not applicable.
- virtual status_t getNextBuffer(Buffer* buffer, int64_t pts) = 0;
+ virtual status_t getNextBuffer(Buffer* buffer, int64_t pts = kInvalidPTS) = 0;
virtual void releaseBuffer(Buffer* buffer) = 0;
};
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 30ed41da..aea002b 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1029,12 +1029,7 @@
{
Mutex::Autolock _l(mLock);
- ssize_t index = mNotificationClients.indexOfKey(pid);
- if (index >= 0) {
- sp <NotificationClient> client = mNotificationClients.valueFor(pid);
- ALOGV("removeNotificationClient() %p, pid %d", client.get(), pid);
- mNotificationClients.removeItem(pid);
- }
+ mNotificationClients.removeItem(pid);
ALOGV("%d died, releasing its sessions", pid);
size_t num = mAudioSessionRefs.size();
@@ -1998,9 +1993,12 @@
bool AudioFlinger::MixerThread::threadLoop()
{
+ // DirectOutputThread has single trackToRemove instead of Vector
Vector< sp<Track> > tracksToRemove;
+ // DirectOutputThread has activeTrack here
nsecs_t standbyTime = systemTime();
size_t mixBufferSize = mFrameCount * mFrameSize;
+
// FIXME: Relaxed timing because of a certain device that can't meet latency
// Should be reduced to 2x after the vendor fixes the driver issue
// increase threshold again due to low power audio mode. The way this warning threshold is
@@ -2008,18 +2006,25 @@
nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
nsecs_t lastWarning = 0;
bool longStandbyExit = false;
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
+
uint32_t sleepTimeShift = 0;
Vector< sp<EffectChain> > effectChains;
CpuStats cpuStats;
+ // DirectOutputThread has shorter standbyDelay
+
acquireWakeLock();
while (!exitPending())
{
cpuStats.sample();
+
+ // DirectOutputThread has rampVolume, leftVol, rightVol
+
processConfigEvents();
mixer_state mixerStatus = MIXER_IDLE;
@@ -2029,22 +2034,25 @@
if (checkForNewParameters_l()) {
mixBufferSize = mFrameCount * mFrameSize;
+
// FIXME: Relaxed timing because of a certain device that can't meet latency
// Should be reduced to 2x after the vendor fixes the driver issue
// increase threshold again due to low power audio mode. The way this warning
// threshold is calculated and its usefulness should be reconsidered anyway.
maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
+ // DirectOutputThread updates standbyDelay also
}
const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
// put audio hardware into standby after short delay
if (CC_UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
+ mSuspended > 0)) {
if (!mStandby) {
- ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d", this, mSuspended);
+ ALOGV("Audio hardware entering standby, mixer %p, suspend count %u", this, mSuspended);
mOutput->stream->common.standby(&mOutput->stream->common);
mStandby = true;
mBytesWritten = 0;
@@ -2135,24 +2143,35 @@
// TODO add standby time extension fct of effect tail
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
+
+ // DirectOutputThread adds applyVolume here
+
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- // enable changes in effect chain
- unlockEffectChains(effectChains);
+ }
+
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
+ // FIXME Only in MixerThread, and rewrite to reduce number of system calls
mLastWriteTime = systemTime();
mInWrite = true;
mBytesWritten += mixBufferSize;
-
int bytesWritten = (int)mOutput->stream->write(mOutput->stream, mMixBuffer, mixBufferSize);
if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
mNumWrites++;
mInWrite = false;
+
+ // Only in MixerThread: start of write blocked detection
nsecs_t now = systemTime();
nsecs_t delta = now - mLastWriteTime;
if (!mStandby && delta > maxPeriod) {
@@ -2166,14 +2185,14 @@
longStandbyExit = true;
}
}
+ // end of write blocked detection
+
mStandby = false;
} else {
- // enable changes in effect chain
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of all our tracks, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
tracksToRemove.clear();
@@ -2183,6 +2202,7 @@
effectChains.clear();
}
+ // put output stream into standby mode
if (!mStandby) {
mOutput->stream->common.standby(&mOutput->stream->common);
}
@@ -2707,13 +2727,21 @@
bool AudioFlinger::DirectOutputThread::threadLoop()
{
+ // MixerThread has Vector instead of single trackToRemove
sp<Track> trackToRemove;
+ // MixerThread does not have activeTrack here
sp<Track> activeTrack;
nsecs_t standbyTime = systemTime();
- size_t mixBufferSize = mFrameCount*mFrameSize;
+ size_t mixBufferSize = mFrameCount * mFrameSize;
+
+ // MixerThread has relaxed timing: maxPeriod, lastWarning, longStandbyExit
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
+
+ // MixerThread has sleepTimeShift and cpuStats
+
// use shorter standby delay as on normal output to release
// hardware resources as soon as possible
nsecs_t standbyDelay = microseconds(activeSleepTime*2);
@@ -2722,9 +2750,12 @@
while (!exitPending())
{
+ // MixerThread has cpuStats.sample()
+
bool rampVolume;
uint16_t leftVol;
uint16_t rightVol;
+
Vector< sp<EffectChain> > effectChains;
processConfigEvents();
@@ -2735,7 +2766,11 @@
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
- mixBufferSize = mFrameCount*mFrameSize;
+ mixBufferSize = mFrameCount * mFrameSize;
+
+ // different calculations here
+ standbyDelay = microseconds(activeSleepTime*2);
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
standbyDelay = microseconds(activeSleepTime*2);
@@ -2743,10 +2778,9 @@
// put audio hardware into standby after short delay
if (CC_UNLIKELY((!mActiveTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
- // wait until we have something to do...
+ mSuspended > 0)) {
if (!mStandby) {
- ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d", this, mSuspended);
+ ALOGV("Audio hardware entering standby, mixer %p, suspend count %u", this, mSuspended);
mOutput->stream->common.standby(&mOutput->stream->common);
mStandby = true;
mBytesWritten = 0;
@@ -2759,19 +2793,27 @@
if (exitPending()) break;
releaseWakeLock_l();
+ // wait until we have something to do...
ALOGV("Thread %p type %d TID %d going to sleep", this, mType, gettid());
mWaitWorkCV.wait(mLock);
ALOGV("Thread %p type %d TID %d waking up", this, mType, gettid());
acquireWakeLock_l();
+ // MixerThread has "mPrevMixerStatus = MIXER_IDLE"
checkSilentMode_l();
+ // MixerThread has different standbyDelay
standbyTime = systemTime() + standbyDelay;
sleepTime = idleSleepTime;
+ // MixerThread has "sleepTimeShift = 0"
continue;
}
}
+ // MixerThread has "mixerStatus = prepareTracks_l(...)"
+
+ // equivalent to MixerThread's lockEffectChains_l, but without the lock
+ // FIXME - is it OK to omit the lock here?
effectChains = mEffectChains;
// find out which tracks need to be processed
@@ -2909,8 +2951,7 @@
// output audio to hardware
while (frameCount) {
buffer.frameCount = frameCount;
- activeTrack->getNextBuffer(&buffer,
- AudioBufferProvider::kInvalidPTS);
+ activeTrack->getNextBuffer(&buffer);
if (CC_UNLIKELY(buffer.raw == NULL)) {
memset(curBuf, 0, frameCount * mFrameSize);
break;
@@ -2935,19 +2976,28 @@
}
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
+
+ // MixerThread does not have applyVolume
if (mixerStatus == MIXER_TRACKS_READY) {
applyVolume(leftVol, rightVol, rampVolume);
}
+
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- unlockEffectChains(effectChains);
+ }
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
mLastWriteTime = systemTime();
mInWrite = true;
mBytesWritten += mixBufferSize;
@@ -2955,13 +3005,15 @@
if (bytesWritten < 0) mBytesWritten -= mixBufferSize;
mNumWrites++;
mInWrite = false;
+
+ // MixerThread has write blocked detection here
+
mStandby = false;
} else {
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of removed track, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
trackToRemove.clear();
@@ -2972,6 +3024,7 @@
effectChains.clear();
}
+ // put output stream into standby mode
if (!mStandby) {
mOutput->stream->common.standby(&mOutput->stream->common);
}
@@ -3096,9 +3149,12 @@
{
Vector< sp<Track> > tracksToRemove;
nsecs_t standbyTime = systemTime();
- size_t mixBufferSize = mFrameCount*mFrameSize;
+ size_t mixBufferSize = mFrameCount * mFrameSize;
+
+ // Only in DuplicatingThread
SortedVector< sp<OutputTrack> > outputTracks;
uint32_t writeFrames = 0;
+
uint32_t activeSleepTime = activeSleepTimeUs();
uint32_t idleSleepTime = idleSleepTimeUs();
uint32_t sleepTime = idleSleepTime;
@@ -3108,6 +3164,8 @@
while (!exitPending())
{
+ // MixerThread has cpuStats.sample
+
processConfigEvents();
mixer_state mixerStatus = MIXER_IDLE;
@@ -3116,22 +3174,27 @@
Mutex::Autolock _l(mLock);
if (checkForNewParameters_l()) {
- mixBufferSize = mFrameCount*mFrameSize;
+ mixBufferSize = mFrameCount * mFrameSize;
+
+ // Only in DuplicatingThread
updateWaitTime();
+
activeSleepTime = activeSleepTimeUs();
idleSleepTime = idleSleepTimeUs();
}
const SortedVector< wp<Track> >& activeTracks = mActiveTracks;
+ // Only in DuplicatingThread
for (size_t i = 0; i < mOutputTracks.size(); i++) {
outputTracks.add(mOutputTracks[i]);
}
// put audio hardware into standby after short delay
if (CC_UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) ||
- mSuspended)) {
+ mSuspended > 0)) {
if (!mStandby) {
+ // DuplicatingThread implements standby by stopping all tracks
for (size_t i = 0; i < outputTracks.size(); i++) {
outputTracks[i]->stop();
}
@@ -3153,10 +3216,12 @@
ALOGV("Thread %p type %d TID %d waking up", this, mType, gettid());
acquireWakeLock_l();
+ // MixerThread has "mPrevMixerStatus = MIXER_IDLE"
checkSilentMode_l();
standbyTime = systemTime() + mStandbyTimeInNsecs;
sleepTime = idleSleepTime;
+ // MixerThread has sleepTimeShift
continue;
}
}
@@ -3169,6 +3234,7 @@
lockEffectChains_l(effectChains);
}
+ // Duplicating Thread is completely different here
if (CC_LIKELY(mixerStatus == MIXER_TRACKS_READY)) {
// mix buffers...
if (outputsReady(outputTracks)) {
@@ -3198,30 +3264,36 @@
}
}
- if (mSuspended) {
+ if (mSuspended > 0) {
sleepTime = suspendSleepTimeUs();
}
- // sleepTime == 0 means we must write to audio hardware
+
+ // only process effects if we're going to write
if (sleepTime == 0) {
for (size_t i = 0; i < effectChains.size(); i ++) {
effectChains[i]->process_l();
}
- // enable changes in effect chain
- unlockEffectChains(effectChains);
+ }
+ // enable changes in effect chain
+ unlockEffectChains(effectChains);
+
+ // sleepTime == 0 means we must write to audio hardware
+ if (sleepTime == 0) {
standbyTime = systemTime() + mStandbyTimeInNsecs;
for (size_t i = 0; i < outputTracks.size(); i++) {
outputTracks[i]->write(mMixBuffer, writeFrames);
}
mStandby = false;
mBytesWritten += mixBufferSize;
+
+ // MixerThread has write blocked detection here
+
} else {
- // enable changes in effect chain
- unlockEffectChains(effectChains);
usleep(sleepTime);
}
- // finally let go of all our tracks, without the lock held
+ // finally let go of removed track(s), without the lock held
// since we can't guarantee the destructors won't acquire that
// same lock.
tracksToRemove.clear();
@@ -3232,6 +3304,9 @@
effectChains.clear();
}
+ // MixerThread and DirectOutpuThread have standby here,
+ // but for DuplicatingThread this is handled by the outputTracks
+
releaseWakeLock();
ALOGV("Thread %p type %d exiting", this, mType);
@@ -3240,6 +3315,7 @@
void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
{
+ Mutex::Autolock _l(mLock);
// FIXME explain this formula
int frameCount = (3 * mFrameCount * mSampleRate) / thread->sampleRate();
OutputTrack *outputTrack = new OutputTrack(thread,
@@ -3285,7 +3361,7 @@
}
-bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> > &outputTracks)
+bool AudioFlinger::DuplicatingThread::outputsReady(const SortedVector< sp<OutputTrack> > &outputTracks)
{
for (size_t i = 0; i < outputTracks.size(); i++) {
sp <ThreadBase> thread = outputTracks[i]->thread().promote();
@@ -3408,11 +3484,14 @@
}
}
+// AudioBufferProvider interface
+// getNextBuffer() = 0;
+// This implementation of releaseBuffer() is used by Track and RecordTrack, but not TimedTrack
void AudioFlinger::ThreadBase::TrackBase::releaseBuffer(AudioBufferProvider::Buffer* buffer)
{
buffer->raw = NULL;
mFrameCount = buffer->frameCount;
- step();
+ (void) step(); // ignore return value of step()
buffer->frameCount = 0;
}
@@ -3558,6 +3637,7 @@
(int)mAuxBuffer);
}
+// AudioBufferProvider interface
status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(
AudioBufferProvider::Buffer* buffer, int64_t pts)
{
@@ -4106,6 +4186,7 @@
mTimedAudioOutputOnTime = false;
}
+// AudioBufferProvider interface
void AudioFlinger::PlaybackThread::TimedTrack::releaseBuffer(
AudioBufferProvider::Buffer* buffer) {
@@ -4190,6 +4271,7 @@
}
}
+// AudioBufferProvider interface
status_t AudioFlinger::RecordThread::RecordTrack::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
{
audio_track_cblk_t* cblk = this->cblk();
@@ -4877,8 +4959,7 @@
}
buffer.frameCount = mFrameCount;
- if (CC_LIKELY(mActiveTrack->getNextBuffer(
- &buffer, AudioBufferProvider::kInvalidPTS) == NO_ERROR)) {
+ if (CC_LIKELY(mActiveTrack->getNextBuffer(&buffer) == NO_ERROR)) {
size_t framesOut = buffer.frameCount;
if (mResampler == NULL) {
// no resampling
@@ -5155,6 +5236,7 @@
return NO_ERROR;
}
+// AudioBufferProvider interface
status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
{
size_t framesReq = buffer->frameCount;
@@ -5193,6 +5275,7 @@
return NO_ERROR;
}
+// AudioBufferProvider interface
void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
{
mRsmpInIndex += buffer->frameCount;
@@ -5863,7 +5946,7 @@
return android_atomic_inc(&mNextUniqueId);
}
-AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l()
+AudioFlinger::PlaybackThread *AudioFlinger::primaryPlaybackThread_l() const
{
for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
PlaybackThread *thread = mPlaybackThreads.valueAt(i).get();
@@ -5875,7 +5958,7 @@
return NULL;
}
-uint32_t AudioFlinger::primaryOutputDevice_l()
+uint32_t AudioFlinger::primaryOutputDevice_l() const
{
PlaybackThread *thread = primaryPlaybackThread_l();
@@ -6370,7 +6453,7 @@
}
void AudioFlinger::ThreadBase::unlockEffectChains(
- Vector<sp <AudioFlinger::EffectChain> >& effectChains)
+ const Vector<sp <AudioFlinger::EffectChain> >& effectChains)
{
for (size_t i = 0; i < effectChains.size(); i++) {
effectChains[i]->unlock();
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 6665bd7..dbd2597 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -339,9 +339,8 @@
TrackBase(const TrackBase&);
TrackBase& operator = (const TrackBase&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts) = 0;
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts) = 0;
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
audio_format_t format() const {
@@ -424,8 +423,8 @@
void sendConfigEvent_l(int event, int param = 0);
void processConfigEvents();
audio_io_handle_t id() const { return mId;}
- bool standby() { return mStandby; }
- uint32_t device() { return mDevice; }
+ bool standby() const { return mStandby; }
+ uint32_t device() const { return mDevice; }
virtual audio_stream_t* stream() = 0;
sp<EffectHandle> createEffect_l(
@@ -461,7 +460,7 @@
// integrity of the chains during the process.
void lockEffectChains_l(Vector<sp <EffectChain> >& effectChains);
// unlock effect chains after process
- void unlockEffectChains(Vector<sp <EffectChain> >& effectChains);
+ void unlockEffectChains(const Vector<sp<EffectChain> >& effectChains);
// set audio mode to all effect chains
void setMode(audio_mode_t mode);
// get effect module with corresponding ID on specified audio session
@@ -627,9 +626,10 @@
Track(const Track&);
Track& operator = (const Track&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts = kInvalidPTS);
+ // releaseBuffer() not overridden
+
virtual uint32_t framesReady() const;
bool isMuted() const { return mMute; }
@@ -696,9 +696,10 @@
virtual uint32_t framesReady() const;
- virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts);
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
+
void timedYieldSamples(AudioBufferProvider::Buffer* buffer);
void timedYieldSilence(uint32_t numFrames,
AudioBufferProvider::Buffer* buffer);
@@ -820,8 +821,8 @@
virtual audio_stream_t* stream();
void suspend() { mSuspended++; }
- void restore() { if (mSuspended) mSuspended--; }
- bool isSuspended() const { return (mSuspended != 0); }
+ void restore() { if (mSuspended > 0) mSuspended--; }
+ bool isSuspended() const { return (mSuspended > 0); }
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
@@ -842,7 +843,7 @@
protected:
int16_t* mMixBuffer;
- int mSuspended;
+ uint32_t mSuspended; // suspend count, > 0 means suspended
int mBytesWritten;
private:
// mMasterMute is in both PlaybackThread and in AudioFlinger. When a
@@ -968,7 +969,7 @@
virtual uint32_t activeSleepTimeUs();
private:
- bool outputsReady(SortedVector< sp<OutputTrack> > &outputTracks);
+ bool outputsReady(const SortedVector<sp<OutputTrack> > &outputTracks);
void updateWaitTime();
SortedVector < sp<OutputTrack> > mOutputTracks;
@@ -993,8 +994,9 @@
PlaybackThread *srcThread,
PlaybackThread *dstThread,
bool reRegister);
- PlaybackThread *primaryPlaybackThread_l();
- uint32_t primaryOutputDevice_l();
+ // return thread associated with primary hardware device, or NULL
+ PlaybackThread *primaryPlaybackThread_l() const;
+ uint32_t primaryOutputDevice_l() const;
friend class AudioBuffer;
@@ -1062,9 +1064,9 @@
RecordTrack(const RecordTrack&);
RecordTrack& operator = (const RecordTrack&);
- virtual status_t getNextBuffer(
- AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts = kInvalidPTS);
+ // releaseBuffer() not overridden
bool mOverflow;
};
@@ -1100,9 +1102,10 @@
AudioStreamIn* clearInput();
virtual audio_stream_t* stream();
- virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer,
- int64_t pts);
+ // AudioBufferProvider interface
+ virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts);
virtual void releaseBuffer(AudioBufferProvider::Buffer* buffer);
+
virtual bool checkForNewParameters_l();
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 020d62a..2cec525 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -332,11 +332,11 @@
return 0;
}
-void AudioMixer::setBufferProvider(int name, AudioBufferProvider* buffer)
+void AudioMixer::setBufferProvider(int name, AudioBufferProvider* bufferProvider)
{
name -= TRACK0;
assert(uint32_t(name) < MAX_NUM_TRACKS);
- mState.tracks[name].bufferProvider = buffer;
+ mState.tracks[name].bufferProvider = bufferProvider;
}
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
index 8384ebc..106bb3e 100644
--- a/services/java/com/android/server/TextServicesManagerService.java
+++ b/services/java/com/android/server/TextServicesManagerService.java
@@ -52,6 +52,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
public class TextServicesManagerService extends ITextServicesManager.Stub {
private static final String TAG = TextServicesManagerService.class.getSimpleName();
@@ -582,8 +583,8 @@
private class SpellCheckerBindGroup {
private final String TAG = SpellCheckerBindGroup.class.getSimpleName();
private final InternalServiceConnection mInternalConnection;
- private final ArrayList<InternalDeathRecipient> mListeners =
- new ArrayList<InternalDeathRecipient>();
+ private final CopyOnWriteArrayList<InternalDeathRecipient> mListeners =
+ new CopyOnWriteArrayList<InternalDeathRecipient>();
public boolean mBound;
public ISpellCheckerService mSpellChecker;
public boolean mConnected;
@@ -601,19 +602,24 @@
if (DBG) {
Slog.d(TAG, "onServiceConnected");
}
- synchronized(mSpellCheckerMap) {
- for (InternalDeathRecipient listener : mListeners) {
- try {
- final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
- listener.mScLocale, listener.mScListener, listener.mBundle);
- listener.mTsListener.onServiceConnected(session);
- } catch (RemoteException e) {
- Slog.e(TAG, "Exception in getting the spell checker session."
- + "Reconnect to the spellchecker. ", e);
- removeAll();
- return;
+
+ for (InternalDeathRecipient listener : mListeners) {
+ try {
+ final ISpellCheckerSession session = spellChecker.getISpellCheckerSession(
+ listener.mScLocale, listener.mScListener, listener.mBundle);
+ synchronized(mSpellCheckerMap) {
+ if (mListeners.contains(listener)) {
+ listener.mTsListener.onServiceConnected(session);
+ }
}
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Exception in getting the spell checker session."
+ + "Reconnect to the spellchecker. ", e);
+ removeAll();
+ return;
}
+ }
+ synchronized(mSpellCheckerMap) {
mSpellChecker = spellChecker;
mConnected = true;
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 8a5e7fc..3ac446c 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2792,14 +2792,7 @@
r.task.taskId, r.shortComponentName,
"proc died without state saved");
}
- r.makeFinishing();
- mMainStack.mHistory.remove(i);
- r.takeFromHistory();
- mWindowManager.removeAppToken(r.appToken);
- if (VALIDATE_TOKENS) {
- mMainStack.validateAppTokensLocked();
- }
- r.removeUriPermissionsLocked();
+ mMainStack.removeActivityFromHistoryLocked(r);
} else {
// We have the current state for this activity, so
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 7b8bc26..f9641eb 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3414,6 +3414,33 @@
return true;
}
+ final void finishActivityResultsLocked(ActivityRecord r, int resultCode, Intent resultData) {
+ // send the result
+ ActivityRecord resultTo = r.resultTo;
+ if (resultTo != null) {
+ if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
+ + " who=" + r.resultWho + " req=" + r.requestCode
+ + " res=" + resultCode + " data=" + resultData);
+ if (r.info.applicationInfo.uid > 0) {
+ mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
+ resultTo.packageName, resultData,
+ resultTo.getUriPermissionsLocked());
+ }
+ resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
+ resultData);
+ r.resultTo = null;
+ }
+ else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
+
+ // Make sure this HistoryRecord is not holding on to other resources,
+ // because clients have remote IPC references to this object so we
+ // can't assume that will go away and want to avoid circular IPC refs.
+ r.results = null;
+ r.pendingResults = null;
+ r.newIntents = null;
+ r.icicle = null;
+ }
+
/**
* @return Returns true if this activity has been removed from the history
* list, or false if it is still in the list and will be removed later.
@@ -3452,30 +3479,7 @@
}
}
- // send the result
- ActivityRecord resultTo = r.resultTo;
- if (resultTo != null) {
- if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
- + " who=" + r.resultWho + " req=" + r.requestCode
- + " res=" + resultCode + " data=" + resultData);
- if (r.info.applicationInfo.uid > 0) {
- mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
- resultTo.packageName, resultData,
- resultTo.getUriPermissionsLocked());
- }
- resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
- resultData);
- r.resultTo = null;
- }
- else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
-
- // Make sure this HistoryRecord is not holding on to other resources,
- // because clients have remote IPC references to this object so we
- // can't assume that will go away and want to avoid circular IPC refs.
- r.results = null;
- r.pendingResults = null;
- r.newIntents = null;
- r.icicle = null;
+ finishActivityResultsLocked(r, resultCode, resultData);
if (mService.mPendingThumbnails.size() > 0) {
// There are clients waiting to receive thumbnails so, in case
@@ -3638,8 +3642,9 @@
mHandler.removeMessages(DESTROY_TIMEOUT_MSG, r);
}
- private final void removeActivityFromHistoryLocked(ActivityRecord r) {
+ final void removeActivityFromHistoryLocked(ActivityRecord r) {
if (r.state != ActivityState.DESTROYED) {
+ finishActivityResultsLocked(r, Activity.RESULT_CANCELED, null);
r.makeFinishing();
if (DEBUG_ADD_REMOVE) {
RuntimeException here = new RuntimeException("here");
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index 0ce5499..65b9627 100755
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -1082,6 +1082,7 @@
} else {
mLocation.removeAccuracy();
}
+ mLocation.setExtras(mLocationExtras);
try {
mLocationManager.reportLocation(mLocation, false);
diff --git a/services/java/com/android/server/net/NetworkStatsRecorder.java b/services/java/com/android/server/net/NetworkStatsRecorder.java
index 240cc1c..290bd2c 100644
--- a/services/java/com/android/server/net/NetworkStatsRecorder.java
+++ b/services/java/com/android/server/net/NetworkStatsRecorder.java
@@ -50,7 +50,7 @@
*/
public class NetworkStatsRecorder {
private static final String TAG = "NetworkStatsRecorder";
- private static final boolean LOGD = true;
+ private static final boolean LOGD = false;
private static final boolean LOGV = false;
private final FileRotator mRotator;
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 96142a1..008793c 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -7685,8 +7685,6 @@
}
}
- final boolean wasAnimating = w.mWasAnimating;
-
// If the window has moved due to its containing
// content frame changing, then we'd like to animate
// it. The checks here are ordered by what is least
@@ -7705,8 +7703,13 @@
w.mAnimDh = innerDh;
}
- // Execute animation.
- final boolean nowAnimating = w.isAnimating();
+ final boolean wasAnimating = w.mWasAnimating;
+ final boolean nowAnimating = w.mLocalAnimating;
+
+ if (DEBUG_WALLPAPER) {
+ Slog.v(TAG, w + ": wasAnimating=" + wasAnimating +
+ ", nowAnimating=" + nowAnimating);
+ }
// If this window is animating, make a note that we have
// an animating window and take care of a request to run
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index fc435f7..eeecad1 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -982,7 +982,7 @@
boolean stepAnimationLocked(long currentTime) {
// Save the animation state as it was before this step so WindowManagerService can tell if
// we just started or just stopped animating by comparing mWasAnimating with isAnimating().
- mWasAnimating = isAnimating();
+ mWasAnimating = mAnimating;
if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) {
// We will run animations as long as the display isn't frozen.
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
index 6f56223..22e1bff 100644
--- a/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/RSTestCore.java
@@ -68,6 +68,7 @@
unitTests.add(new UT_constant(this, mRes, mCtx));
unitTests.add(new UT_vector(this, mRes, mCtx));
unitTests.add(new UT_array_init(this, mRes, mCtx));
+ unitTests.add(new UT_convert(this, mRes, mCtx));
unitTests.add(new UT_rsdebug(this, mRes, mCtx));
unitTests.add(new UT_rstime(this, mRes, mCtx));
unitTests.add(new UT_rstypes(this, mRes, mCtx));
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java
new file mode 100644
index 0000000..4fc6c55
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/UT_convert.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.rs.test;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.renderscript.*;
+
+public class UT_convert extends UnitTest {
+ private Resources mRes;
+
+ protected UT_convert(RSTestCore rstc, Resources res, Context ctx) {
+ super(rstc, "Convert", ctx);
+ mRes = res;
+ }
+
+ public void run() {
+ RenderScript pRS = RenderScript.create(mCtx);
+ ScriptC_convert s = new ScriptC_convert(pRS, mRes, R.raw.convert);
+ pRS.setMessageHandler(mRsMessage);
+ s.invoke_convert_test();
+ pRS.finish();
+ waitForMessage();
+ pRS.destroy();
+ }
+}
diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs
new file mode 100644
index 0000000..e314f2b
--- /dev/null
+++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/convert.rs
@@ -0,0 +1,37 @@
+#include "shared.rsh"
+
+float4 f4 = { 2.0f, 4.0f, 6.0f, 8.0f };
+
+char4 i8_4 = { -1, -2, -3, 4 };
+
+static bool test_convert() {
+ bool failed = false;
+
+ f4 = convert_float4(i8_4);
+ _RS_ASSERT(f4.x == -1.0f);
+ _RS_ASSERT(f4.y == -2.0f);
+ _RS_ASSERT(f4.z == -3.0f);
+ _RS_ASSERT(f4.w == 4.0f);
+
+ if (failed) {
+ rsDebug("test_convert FAILED", 0);
+ }
+ else {
+ rsDebug("test_convert PASSED", 0);
+ }
+
+ return failed;
+}
+
+void convert_test() {
+ bool failed = false;
+ failed |= test_convert();
+
+ if (failed) {
+ rsSendToClientBlocking(RS_MSG_TEST_FAILED);
+ }
+ else {
+ rsSendToClientBlocking(RS_MSG_TEST_PASSED);
+ }
+}
+