framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \
frameworks/base/docs/knowntags.txt
-sample_dir := development/samples/browseable
-new_sample_dir := developers/samples/android
+samples_dir := development/samples/browseable
# Whitelist of valid groups, used for default TOC grouping. Each sample must
# belong to one (and only one) group. Assign samples to groups by setting
-samplegroup UI \
-samplegroup Views
-# the list here should match the list of samples included in the sdk samples package
-# (see development/build/sdk.atree)
-# remove htmlified samples for now -- samples are still available through the SDK
-web_docs_sample_code_flags := \
- -hdf android.hasSamples 1 \
- -samplecode $(sample_dir)/BasicAccessibility \
- samples/BasicAccessibility "" \
- -samplecode $(sample_dir)/HorizontalPaging \
- samples/HorizontalPaging "" \
- -samplecode $(sample_dir)/ShareActionProvider \
- samples/ShareActionProvider "" \
- -samplecode $(sample_dir)/Styled \
- samples/Styled "" \
- -samplecode $(sample_dir)/BasicAndroidKeyStore \
- samples/BasicAndroidKeyStore "" \
- -samplecode $(sample_dir)/Basic \
- samples/Basic "" \
- -samplecode $(sample_dir)/ImmersiveMode \
- samples/ImmersiveMode "" \
- -samplecode $(sample_dir)/repeatingAlarm \
- samples/repeatingAlarm "" \
- -samplecode $(sample_dir)/TextLinkify \
- samples/TextLinkify "" \
- -samplecode $(sample_dir)/BasicMediaRouter \
- samples/BasicMediaRouter "" \
- -samplecode $(sample_dir)/BasicMultitouch \
- samples/BasicMultitouch "" \
- -samplecode $(sample_dir)/TextSwitcher \
- samples/TextSwitcher "" \
- -samplecode $(sample_dir)/ActivityInstrumentation \
- samples/ActivityInstrumentation "" \
- -samplecode $(sample_dir)/BorderlessButtons \
- samples/BorderlessButtons "" \
- -samplecode $(sample_dir)/BasicNotifications \
- samples/BasicNotifications "" \
- -samplecode $(sample_dir)/AdvancedImmersiveMode \
- samples/AdvancedImmersiveMode "" \
- -samplecode $(sample_dir)/BluetoothLeGatt \
- samples/BluetoothLeGatt "" \
- -samplecode $(sample_dir)/NetworkConnect \
- samples/NetworkConnect "" \
- -samplecode $(sample_dir)/BasicNetworking \
- samples/BasicNetworking "" \
- -samplecode $(sample_dir)/BasicMediaDecoder \
- samples/BasicMediaDecoder "" \
- -samplecode $(sample_dir)/BasicImmersiveMode \
- samples/BasicImmersiveMode "" \
- -samplecode $(sample_dir)/CustomChoiceList \
- samples/CustomChoiceList "" \
- -samplecode $(sample_dir)/BasicContactables \
- samples/BasicContactables "" \
- -samplecode $(sample_dir)/BasicGestureDetect \
- samples/BasicGestureDetect "" \
- -samplecode $(sample_dir)/DoneBar \
- samples/DoneBar "" \
- -samplecode $(sample_dir)/ListPopupMenu \
- samples/ListPopupMenu "" \
- -samplecode $(sample_dir)/AppRestrictions \
- samples/AppRestrictions "" \
- -samplecode $(sample_dir)/CustomNotifications \
- samples/CustomNotifications "" \
- -samplecode $(sample_dir)/BasicSyncAdapter \
- samples/BasicSyncAdapter "" \
- -samplecode $(sample_dir)/StorageClient \
- samples/StorageClient "" \
- -samplecode $(sample_dir)/StorageProvider \
- samples/StorageProvider ""
-# -samplecode $(sample_dir)/AndroidBeamDemo \
-# samples/AndroidBeamDemo "Android Beam Demo" \
-# -samplecode $(sample_dir)/ApiDemos \
-# samples/ApiDemos "API Demos" \
-# -samplecode $(sample_dir)/Support4Demos \
-# samples/Support4Demos "API 4+ Support Demos" \
-# -samplecode $(sample_dir)/Support13Demos \
-# samples/Support13Demos "API 13+ Support Demos" \
-# -samplecode $(sample_dir)/BackupRestore \
-# samples/BackupRestore "Backup and Restore" \
-# -samplecode $(sample_dir)/BluetoothChat \
-# samples/BluetoothChat "Bluetooth Chat" \
-# -samplecode $(sample_dir)/BusinessCard \
-# samples/BusinessCard "Business Card" \
-# -samplecode $(sample_dir)/ContactManager \
-# samples/ContactManager "Contact Manager" \
-# -samplecode $(sample_dir)/CubeLiveWallpaper \
-# samples/CubeLiveWallpaper "Cube Live Wallpaper" \
-# -samplecode $(sample_dir)/Home \
-# samples/Home "Home" \
-# -samplecode $(sample_dir)/HoneycombGallery \
-# samples/HoneycombGallery "Honeycomb Gallery" \
-# -samplecode $(sample_dir)/JetBoy \
-# samples/JetBoy "JetBoy" \
-# -samplecode $(sample_dir)/KeyChainDemo \
-# samples/KeyChainDemo "KeyChain Demo" \
-# -samplecode $(sample_dir)/LunarLander \
-# samples/LunarLander "Lunar Lander" \
-# -samplecode $(sample_dir)/training/ads-and-ux \
-# samples/training/ads-and-ux "Mobile Advertisement Integration" \
-# -samplecode $(sample_dir)/MultiResolution \
-# samples/MultiResolution "Multiple Resolutions" \
-# -samplecode $(sample_dir)/training/multiscreen/newsreader \
-# samples/newsreader "News Reader" \
-# -samplecode $(sample_dir)/NotePad \
-# samples/NotePad "Note Pad" \
-# -samplecode $(sample_dir)/SpellChecker/SampleSpellCheckerService \
-# samples/SpellChecker/SampleSpellCheckerService "Spell Checker Service" \
-# -samplecode $(sample_dir)/SpellChecker/HelloSpellChecker \
-# samples/SpellChecker/HelloSpellChecker "Spell Checker Client" \
-# -samplecode $(sample_dir)/SampleSyncAdapter \
-# samples/SampleSyncAdapter "Sample Sync Adapter" \
-# -samplecode $(sample_dir)/RandomMusicPlayer \
-# samples/RandomMusicPlayer "Random Music Player" \
-# -samplecode $(sample_dir)/RenderScript \
-# samples/RenderScript "RenderScript" \
-# -samplecode $(sample_dir)/SearchableDictionary \
-# samples/SearchableDictionary "Searchable Dictionary v2" \
-# -samplecode $(sample_dir)/SipDemo \
-# samples/SipDemo "SIP Demo" \
-# -samplecode $(sample_dir)/Snake \
-# samples/Snake "Snake" \
-# -samplecode $(sample_dir)/SoftKeyboard \
-# samples/SoftKeyboard "Soft Keyboard" \
-# -samplecode $(sample_dir)/Spinner \
-# samples/Spinner "Spinner" \
-# -samplecode $(sample_dir)/SpinnerTest \
-# samples/SpinnerTest "SpinnerTest" \
-# -samplecode $(sample_dir)/StackWidget \
-# samples/StackWidget "StackView Widget" \
-# -samplecode $(sample_dir)/TicTacToeLib \
-# samples/TicTacToeLib "TicTacToeLib" \
-# -samplecode $(sample_dir)/TicTacToeMain \
-# samples/TicTacToeMain "TicTacToeMain" \
-# -samplecode $(sample_dir)/ToyVpn \
-# samples/ToyVpn "Toy VPN Client" \
-# -samplecode $(sample_dir)/USB \
-# samples/USB "USB" \
-# -samplecode $(sample_dir)/WeatherListWidget \
-# samples/WeatherListWidget "Weather List Widget" \
-# -samplecode $(sample_dir)/WiFiDirectDemo \
-# samples/WiFiDirectDemo "Wi-Fi Direct Demo" \
-# -samplecode $(sample_dir)/Wiktionary \
-# samples/Wiktionary "Wiktionary" \
-# -samplecode $(sample_dir)/WiktionarySimple \
-# samples/WiktionarySimple "Wiktionary (Simplified)" \
-# -samplecode $(sample_dir)/VoiceRecognitionService \
-# samples/VoiceRecognitionService "Voice Recognition Service" \
-# -samplecode $(sample_dir)/VoicemailProviderDemo \
-# samples/VoicemailProviderDemo "Voicemail Provider Demo" \
-# -samplecode $(sample_dir)/XmlAdapters \
-# samples/XmlAdapters "XML Adapters" \
-# -samplecode $(sample_dir)/TtsEngine \
-# samples/TtsEngine "Text To Speech Engine" \
-# -samplecode $(sample_dir)/training/device-management-policy \
-# samples/training/device-management-policy "Device Management Policy"
-
-
## SDK version identifiers used in the published docs
# major[.minor] version for current SDK. (full releases only)
framework_docs_SDK_VERSION:=4.4
framework_docs_LOCAL_DROIDDOC_OPTIONS += \
-hdf sdk.version $(framework_docs_SDK_VERSION) \
-hdf sdk.rel.id $(framework_docs_SDK_REL_ID) \
- -hdf sdk.preview 0 \
+ -hdf sdk.preview 0
# ==== the api stubs and current.xml ===========================
include $(CLEAR_VARS)
-todo $(OUT_DOCS)/$(LOCAL_MODULE)-docs-todo.html \
-sdkvalues $(OUT_DOCS) \
-hdf android.whichdoc offline
-# $(web_docs_sample_code_flags)
-
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR)
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /intl/
+LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
LOCAL_MODULE := online-sdk
-toroot / \
-hdf android.whichdoc online \
$(sample_groups) \
- $(web_docs_sample_code_flags)
+ -hdf android.hasSamples true \
+ -samplesdir $(samples_dir)
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR)
LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES)
# specify a second html input dir and an output path relative to OUT_DIR)
-LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl /
+LOCAL_ADDITIONAL_HTML_DIR:=docs/html-intl/intl /
LOCAL_MODULE := ds
-toroot / \
-hdf android.whichdoc online \
-hdf devsite true
-# $(web_docs_sample_code_flags)
LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=build/tools/droiddoc/templates-sdk
method public static android.animation.ObjectAnimator ofArgb(java.lang.Object, java.lang.String, int...);
method public static android.animation.ObjectAnimator ofArgb(T, android.util.Property<T, java.lang.Integer>, int...);
method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, float...);
+ method public static android.animation.ObjectAnimator ofFloat(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
method public static android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, float...);
+ method public static android.animation.ObjectAnimator ofFloat(T, android.util.Property<T, java.lang.Float>, android.util.Property<T, java.lang.Float>, android.graphics.Path);
method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, int...);
+ method public static android.animation.ObjectAnimator ofInt(java.lang.Object, java.lang.String, java.lang.String, android.graphics.Path);
method public static android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, int...);
+ method public static android.animation.ObjectAnimator ofInt(T, android.util.Property<T, java.lang.Integer>, android.util.Property<T, java.lang.Integer>, android.graphics.Path);
method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, float[][]);
+ method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.graphics.Path);
method public static android.animation.ObjectAnimator ofMultiFloat(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, T...);
method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, int[][]);
+ method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.graphics.Path);
method public static android.animation.ObjectAnimator ofMultiInt(java.lang.Object, java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, T...);
method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
+ method public static android.animation.ObjectAnimator ofObject(java.lang.Object, java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeEvaluator<V>, V...);
method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, P>, android.animation.TypeConverter<V, P>, android.animation.TypeEvaluator<V>, V...);
+ method public static android.animation.ObjectAnimator ofObject(T, android.util.Property<T, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
method public static android.animation.ObjectAnimator ofPropertyValuesHolder(java.lang.Object, android.animation.PropertyValuesHolder...);
method public void setAutoCancel(boolean);
method public void setProperty(android.util.Property);
method public void setPropertyName(java.lang.String);
}
+ public class PointFEvaluator implements android.animation.TypeEvaluator {
+ ctor public PointFEvaluator();
+ ctor public PointFEvaluator(android.graphics.PointF);
+ method public android.graphics.PointF evaluate(float, android.graphics.PointF, android.graphics.PointF);
+ }
+
public class PropertyValuesHolder implements java.lang.Cloneable {
method public android.animation.PropertyValuesHolder clone();
method public java.lang.String getPropertyName();
method public static android.animation.PropertyValuesHolder ofKeyframe(java.lang.String, android.animation.Keyframe...);
method public static android.animation.PropertyValuesHolder ofKeyframe(android.util.Property, android.animation.Keyframe...);
method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, float[][]);
+ method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.graphics.Path);
method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<V, float[]>, android.animation.TypeEvaluator<V>, V...);
method public static android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String, android.animation.TypeConverter<T, float[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, int[][]);
+ method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.graphics.Path);
method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<V, int[]>, android.animation.TypeEvaluator<V>, V...);
method public static android.animation.PropertyValuesHolder ofMultiInt(java.lang.String, android.animation.TypeConverter<T, int[]>, android.animation.TypeEvaluator<T>, android.animation.Keyframe...);
method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeEvaluator, java.lang.Object...);
+ method public static android.animation.PropertyValuesHolder ofObject(java.lang.String, android.animation.TypeConverter<android.graphics.PointF, ?>, android.graphics.Path);
method public static android.animation.PropertyValuesHolder ofObject(android.util.Property, android.animation.TypeEvaluator<V>, V...);
method public static android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<T, V>, android.animation.TypeEvaluator<T>, T...);
+ method public static android.animation.PropertyValuesHolder ofObject(android.util.Property<?, V>, android.animation.TypeConverter<android.graphics.PointF, V>, android.graphics.Path);
method public void setConverter(android.animation.TypeConverter);
method public void setEvaluator(android.animation.TypeEvaluator);
method public void setFloatValues(float...);
method public final void setSecondaryProgress(int);
method public void setTitle(java.lang.CharSequence);
method public void setTitle(int);
- method public void setTitleColor(int);
+ method public deprecated void setTitleColor(int);
method public void setVisible(boolean);
method public final void setVolumeControlStream(int);
method public boolean shouldUpRecreateTask(android.content.Intent);
package android.renderscript {
public class Allocation extends android.renderscript.BaseObj {
+ method public void copy1DRangeFrom(int, int, java.lang.Object);
method public void copy1DRangeFrom(int, int, int[]);
method public void copy1DRangeFrom(int, int, short[]);
method public void copy1DRangeFrom(int, int, byte[]);
method public void copy1DRangeFrom(int, int, float[]);
method public void copy1DRangeFrom(int, int, android.renderscript.Allocation, int);
+ method public void copy1DRangeFromUnchecked(int, int, java.lang.Object);
method public void copy1DRangeFromUnchecked(int, int, int[]);
method public void copy1DRangeFromUnchecked(int, int, short[]);
method public void copy1DRangeFromUnchecked(int, int, byte[]);
method public void copy1DRangeFromUnchecked(int, int, float[]);
+ method public void copy2DRangeFrom(int, int, int, int, java.lang.Object);
method public void copy2DRangeFrom(int, int, int, int, byte[]);
method public void copy2DRangeFrom(int, int, int, int, short[]);
method public void copy2DRangeFrom(int, int, int, int, int[]);
method public void copy2DRangeFrom(int, int, int, int, android.renderscript.Allocation, int, int);
method public void copy2DRangeFrom(int, int, android.graphics.Bitmap);
method public void copyFrom(android.renderscript.BaseObj[]);
+ method public void copyFrom(java.lang.Object);
method public void copyFrom(int[]);
method public void copyFrom(short[]);
method public void copyFrom(byte[]);
method public void copyFrom(float[]);
method public void copyFrom(android.graphics.Bitmap);
method public void copyFrom(android.renderscript.Allocation);
+ method public void copyFromUnchecked(java.lang.Object);
method public void copyFromUnchecked(int[]);
method public void copyFromUnchecked(short[]);
method public void copyFromUnchecked(byte[]);
method public void copyFromUnchecked(float[]);
method public void copyTo(android.graphics.Bitmap);
+ method public void copyTo(java.lang.Object);
method public void copyTo(byte[]);
method public void copyTo(short[]);
method public void copyTo(int[]);
method public void setLogo(int);
method public void setSoftInputMode(int);
method public abstract void setTitle(java.lang.CharSequence);
- method public abstract void setTitleColor(int);
+ method public abstract deprecated void setTitleColor(int);
method public void setType(int);
method public void setUiOptions(int);
method public void setUiOptions(int, int);
}
private void doWipe() {
+ String transport = nextArg();
+ if (transport == null) {
+ showUsage();
+ return;
+ }
+
String pkg = nextArg();
if (pkg == null) {
showUsage();
}
try {
- mBmgr.clearBackupData(pkg);
- System.out.println("Wiped backup data for " + pkg);
+ mBmgr.clearBackupData(transport, pkg);
+ System.out.println("Wiped backup data for " + pkg + " on " + transport);
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(BMGR_NOT_RUNNING_ERR);
System.err.println(" bmgr restore TOKEN PACKAGE...");
System.err.println(" bmgr restore PACKAGE");
System.err.println(" bmgr run");
- System.err.println(" bmgr wipe PACKAGE");
+ System.err.println(" bmgr wipe TRANSPORT PACKAGE");
System.err.println("");
System.err.println("The 'backup' command schedules a backup pass for the named package.");
System.err.println("Note that the backup pass will effectively be a no-op if the package");
System.err.println("");
System.err.println("The 'list transports' command reports the names of the backup transports");
System.err.println("currently available on the device. These names can be passed as arguments");
- System.err.println("to the 'transport' command. The currently selected transport is indicated");
- System.err.println("with a '*' character.");
+ System.err.println("to the 'transport' and 'wipe' commands. The currently selected transport");
+ System.err.println("is indicated with a '*' character.");
System.err.println("");
System.err.println("The 'list sets' command reports the token and name of each restore set");
System.err.println("available to the device via the current transport.");
System.err.println("data changes.");
System.err.println("");
System.err.println("The 'wipe' command causes all backed-up data for the given package to be");
- System.err.println("erased from the current transport's storage. The next backup operation");
+ System.err.println("erased from the given transport's storage. The next backup operation");
System.err.println("that the given application performs will rewrite its entire data set.");
+ System.err.println("Transport names to use here are those reported by 'list transports'.");
}
}
package android.accounts;
import android.app.Activity;
-import android.content.Intent;
import android.os.Bundle;
/**
*/
package android.accounts;
-import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
import java.io.IOException;
/**
package android.accounts;
import android.app.Activity;
-import android.content.pm.RegisteredServicesCache;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TextView;
import com.android.internal.R;
import java.io.IOException;
-import java.net.Authenticator;
/**
* @hide
package android.animation;
+import android.graphics.Path;
+import android.graphics.PointF;
import android.util.Log;
import android.util.Property;
}
/**
+ * Constructs and returns an ObjectAnimator that animates coordinates along a <code>Path</code>
+ * using two properties. A <code>Path</code></> animation moves in two dimensions, animating
+ * coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are integers that are set to separate properties designated by
+ * <code>xPropertyName</code> and <code>yPropertyName</code>.
+ *
+ * @param target The object whose properties are to be animated. This object should
+ * have public methods on it called <code>setNameX()</code> and
+ * <code>setNameY</code>, where <code>nameX</code> and <code>nameY</code>
+ * are the value of <code>xPropertyName</code> and <code>yPropertyName</code>
+ * parameters, respectively.
+ * @param xPropertyName The name of the property for the x coordinate being animated.
+ * @param yPropertyName The name of the property for the y coordinate being animated.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static ObjectAnimator ofInt(Object target, String xPropertyName, String yPropertyName,
+ Path path) {
+ Keyframe[][] keyframes = PropertyValuesHolder.createKeyframes(path, true);
+ PropertyValuesHolder x = PropertyValuesHolder.ofKeyframe(xPropertyName, keyframes[0]);
+ PropertyValuesHolder y = PropertyValuesHolder.ofKeyframe(yPropertyName, keyframes[1]);
+ return ofPropertyValuesHolder(target, x, y);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates between int values. A single
* value implies that that value is the one being animated to. Two values imply starting
* and ending values. More than two values imply a starting value, values to animate through
}
/**
+ * Constructs and returns an ObjectAnimator that animates coordinates along a <code>Path</code>
+ * using two properties. A <code>Path</code></> animation moves in two dimensions, animating
+ * coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are integers that are set to separate properties, <code>xProperty</code> and
+ * <code>yProperty</code>.
+ *
+ * @param target The object whose properties are to be animated.
+ * @param xProperty The property for the x coordinate being animated.
+ * @param yProperty The property for the y coordinate being animated.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static <T> ObjectAnimator ofInt(T target, Property<T, Integer> xProperty,
+ Property<T, Integer> yProperty, Path path) {
+ Keyframe[][] keyframes = PropertyValuesHolder.createKeyframes(path, true);
+ PropertyValuesHolder x = PropertyValuesHolder.ofKeyframe(xProperty, keyframes[0]);
+ PropertyValuesHolder y = PropertyValuesHolder.ofKeyframe(yProperty, keyframes[1]);
+ return ofPropertyValuesHolder(target, x, y);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates over int values for a multiple
* parameters setter. Only public methods that take only int parameters are supported.
* Each <code>int[]</code> contains a complete set of parameters to the setter method.
}
/**
+ * Constructs and returns an ObjectAnimator that animates the target using a multi-int setter
+ * along the given <code>Path</code>. A <code>Path</code></> animation moves in two dimensions,
+ * animating coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are integer x and y coordinates used in the first and second parameter of the
+ * setter, respectively.
+ *
+ * @param target The object whose property is to be animated. This object may
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter. <code>propertyName</code> may also
+ * be the case-sensitive complete name of the public setter method.
+ * @param propertyName The name of the property being animated or the name of the setter method.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static ObjectAnimator ofMultiInt(Object target, String propertyName, Path path) {
+ PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiInt(propertyName, path);
+ return ofPropertyValuesHolder(target, pvh);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates over values for a multiple int
* parameters setter. Only public methods that take only int parameters are supported.
* <p>At least two values must be provided, a start and end. More than two
* @param target The object whose property is to be animated. This object may
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter. <code>propertyName</code> may also
- * be the complete name of the public method.
+ * be the case-sensitive complete name of the public setter method.
* @param propertyName The name of the property being animated or the name of the setter method.
* @param converter Converts T objects into int parameters for the multi-value setter.
* @param evaluator A TypeEvaluator that will be called on each animation frame to
}
/**
+ * Constructs and returns an ObjectAnimator that animates coordinates along a <code>Path</code>
+ * using two properties. A <code>Path</code></> animation moves in two dimensions, animating
+ * coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are floats that are set to separate properties designated by
+ * <code>xPropertyName</code> and <code>yPropertyName</code>.
+ *
+ * @param target The object whose properties are to be animated. This object should
+ * have public methods on it called <code>setNameX()</code> and
+ * <code>setNameY</code>, where <code>nameX</code> and <code>nameY</code>
+ * are the value of the <code>xPropertyName</code> and <code>yPropertyName</code>
+ * parameters, respectively.
+ * @param xPropertyName The name of the property for the x coordinate being animated.
+ * @param yPropertyName The name of the property for the y coordinate being animated.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static ObjectAnimator ofFloat(Object target, String xPropertyName, String yPropertyName,
+ Path path) {
+ Keyframe[][] keyframes = PropertyValuesHolder.createKeyframes(path, false);
+ PropertyValuesHolder x = PropertyValuesHolder.ofKeyframe(xPropertyName, keyframes[0]);
+ PropertyValuesHolder y = PropertyValuesHolder.ofKeyframe(yPropertyName, keyframes[1]);
+ return ofPropertyValuesHolder(target, x, y);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates between float values. A single
* value implies that that value is the one being animated to. Two values imply starting
* and ending values. More than two values imply a starting value, values to animate through
}
/**
+ * Constructs and returns an ObjectAnimator that animates coordinates along a <code>Path</code>
+ * using two properties. A <code>Path</code></> animation moves in two dimensions, animating
+ * coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are floats that are set to separate properties, <code>xProperty</code> and
+ * <code>yProperty</code>.
+ *
+ * @param target The object whose properties are to be animated.
+ * @param xProperty The property for the x coordinate being animated.
+ * @param yProperty The property for the y coordinate being animated.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> xProperty,
+ Property<T, Float> yProperty, Path path) {
+ return ofFloat(target, xProperty.getName(), yProperty.getName(), path);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates over float values for a multiple
* parameters setter. Only public methods that take only float parameters are supported.
* Each <code>float[]</code> contains a complete set of parameters to the setter method.
* @param target The object whose property is to be animated. This object may
* have a public method on it called <code>setName()</code>, where <code>name</code> is
* the value of the <code>propertyName</code> parameter. <code>propertyName</code> may also
- * be the complete name of the public method.
+ * be the case-sensitive complete name of the public setter method.
* @param propertyName The name of the property being animated or the name of the setter method.
* @param values A set of values that the animation will animate between over time.
* @return An ObjectAnimator object that is set up to animate between the given values.
}
/**
+ * Constructs and returns an ObjectAnimator that animates the target using a multi-float setter
+ * along the given <code>Path</code>. A <code>Path</code></> animation moves in two dimensions,
+ * animating coordinates <code>(x, y)</code> together to follow the line. In this variation, the
+ * coordinates are float x and y coordinates used in the first and second parameter of the
+ * setter, respectively.
+ *
+ * @param target The object whose property is to be animated. This object may
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter. <code>propertyName</code> may also
+ * be the case-sensitive complete name of the public setter method.
+ * @param propertyName The name of the property being animated or the name of the setter method.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static ObjectAnimator ofMultiFloat(Object target, String propertyName, Path path) {
+ PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiFloat(propertyName, path);
+ return ofPropertyValuesHolder(target, pvh);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates over values for a multiple float
* parameters setter. Only public methods that take only float parameters are supported.
* <p>At least two values must be provided, a start and end. More than two
}
/**
+ * Constructs and returns an ObjectAnimator that animates a property along a <code>Path</code>.
+ * A <code>Path</code></> animation moves in two dimensions, animating coordinates
+ * <code>(x, y)</code> together to follow the line. This variant animates the coordinates
+ * in a <code>PointF</code> to follow the <code>Path</code>. If the <code>Property</code>
+ * associated with <code>propertyName</code> uses a type other than <code>PointF</code>,
+ * <code>converter</code> can be used to change from <code>PointF</code> to the type
+ * associated with the <code>Property</code>.
+ *
+ * @param target The object whose property is to be animated. This object should
+ * have a public method on it called <code>setName()</code>, where <code>name</code> is
+ * the value of the <code>propertyName</code> parameter.
+ * @param propertyName The name of the property being animated.
+ * @param converter Converts a PointF to the type associated with the setter. May be
+ * null if conversion is unnecessary.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static ObjectAnimator ofObject(Object target, String propertyName,
+ TypeConverter<PointF, ?> converter, Path path) {
+ PropertyValuesHolder pvh = PropertyValuesHolder.ofObject(propertyName, converter, path);
+ return ofPropertyValuesHolder(target, pvh);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates between Object values. A single
* value implies that that value is the one being animated to. Two values imply starting
* and ending values. More than two values imply a starting value, values to animate through
}
/**
+ * Constructs and returns an ObjectAnimator that animates a property along a <code>Path</code>.
+ * A <code>Path</code></> animation moves in two dimensions, animating coordinates
+ * <code>(x, y)</code> together to follow the line. This variant animates the coordinates
+ * in a <code>PointF</code> to follow the <code>Path</code>. If <code>property</code>
+ * uses a type other than <code>PointF</code>, <code>converter</code> can be used to change
+ * from <code>PointF</code> to the type associated with the <code>Property</code>.
+ *
+ * @param target The object whose property is to be animated.
+ * @param property The property being animated. Should not be null.
+ * @param converter Converts a PointF to the type associated with the setter. May be
+ * null if conversion is unnecessary.
+ * @param path The <code>Path</code> to animate values along.
+ * @return An ObjectAnimator object that is set up to animate along <code>path</code>.
+ */
+ public static <T, V> ObjectAnimator ofObject(T target, Property<T, V> property,
+ TypeConverter<PointF, V> converter, Path path) {
+ PropertyValuesHolder pvh = PropertyValuesHolder.ofObject(property, converter, path);
+ return ofPropertyValuesHolder(target, pvh);
+ }
+
+ /**
* Constructs and returns an ObjectAnimator that animates between the sets of values specified
* in <code>PropertyValueHolder</code> objects. This variant should be used when animating
* several properties at once with the same ObjectAnimator, since PropertyValuesHolder allows
--- /dev/null
+/*
+ * Copyright (C) 2013 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 android.animation;
+
+import android.graphics.PointF;
+
+/**
+ * This evaluator can be used to perform type interpolation between <code>PointF</code> values.
+ */
+public class PointFEvaluator implements TypeEvaluator<PointF> {
+
+ /**
+ * When null, a new PointF is returned on every evaluate call. When non-null,
+ * mPoint will be modified and returned on every evaluate.
+ */
+ private PointF mPoint;
+
+ /**
+ * Construct a PointFEvaluator that returns a new PointF on every evaluate call.
+ * To avoid creating an object for each evaluate call,
+ * {@link PointFEvaluator#PointFEvaluator(android.graphics.PointF)} should be used
+ * whenever possible.
+ */
+ public PointFEvaluator() {
+ }
+
+ /**
+ * Constructs a PointFEvaluator that modifies and returns <code>reuse</code>
+ * in {@link #evaluate(float, android.graphics.PointF, android.graphics.PointF)} calls.
+ * The value returned from
+ * {@link #evaluate(float, android.graphics.PointF, android.graphics.PointF)} should
+ * not be cached because it will change over time as the object is reused on each
+ * call.
+ *
+ * @param reuse A PointF to be modified and returned by evaluate.
+ */
+ public PointFEvaluator(PointF reuse) {
+ mPoint = reuse;
+ }
+
+ /**
+ * This function returns the result of linearly interpolating the start and
+ * end PointF values, with <code>fraction</code> representing the proportion
+ * between the start and end values. The calculation is a simple parametric
+ * calculation on each of the separate components in the PointF objects
+ * (x, y).
+ *
+ * <p>If {@link #PointFEvaluator(android.graphics.PointF)} was used to construct
+ * this PointFEvaluator, the object returned will be the <code>reuse</code>
+ * passed into the constructor.</p>
+ *
+ * @param fraction The fraction from the starting to the ending values
+ * @param startValue The start PointF
+ * @param endValue The end PointF
+ * @return A linear interpolation between the start and end values, given the
+ * <code>fraction</code> parameter.
+ */
+ @Override
+ public PointF evaluate(float fraction, PointF startValue, PointF endValue) {
+ float x = startValue.x + (fraction * (endValue.x - startValue.x));
+ float y = startValue.y + (fraction * (endValue.y - startValue.y));
+
+ if (mPoint != null) {
+ mPoint.set(x, y);
+ return mPoint;
+ } else {
+ return new PointF(x, y);
+ }
+ }
+}
package android.animation;
+import android.graphics.Path;
+import android.graphics.PointF;
+import android.util.FloatMath;
import android.util.FloatProperty;
import android.util.IntProperty;
import android.util.Log;
* start, through all intermediate values to the end value. When used with ObjectAnimator,
* the elements of the array represent the parameters of the setter function.
*
- * @param propertyName The name of the property being animated. Can also be the name of the
- * entire setter method. Should not be null.
+ * @param propertyName The name of the property being animated. Can also be the
+ * case-sensitive name of the entire setter method. Should not be null.
* @param values The values that the property will animate between.
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
* @see IntArrayEvaluator#IntArrayEvaluator(int[])
}
/**
+ * Constructs and returns a PropertyValuesHolder with a given property name to use
+ * as a multi-int setter. The values are animated along the path, with the first
+ * parameter of the setter set to the x coordinate and the second set to the y coordinate.
+ *
+ * @param propertyName The name of the property being animated. Can also be the
+ * case-sensitive name of the entire setter method. Should not be null.
+ * The setter must take exactly two <code>int</code> parameters.
+ * @param path The Path along which the values should be animated.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ * @see ObjectAnimator#ofPropertyValuesHolder(Object, PropertyValuesHolder...)
+ */
+ public static PropertyValuesHolder ofMultiInt(String propertyName, Path path) {
+ Keyframe[] keyframes = createKeyframes(path);
+ KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(keyframes);
+ TypeEvaluator<PointF> evaluator = new PointFEvaluator(new PointF());
+ PointFToIntArray converter = new PointFToIntArray();
+ return new MultiIntValuesHolder(propertyName, converter, evaluator, keyframeSet);
+ }
+
+ /**
* Constructs and returns a PropertyValuesHolder with a given property and
* set of Object values for use with ObjectAnimator multi-value setters. The Object
* values are converted to <code>int[]</code> using the converter.
* start, through all intermediate values to the end value. When used with ObjectAnimator,
* the elements of the array represent the parameters of the setter function.
*
- * @param propertyName The name of the property being animated. Can also be the name of the
- * entire setter method. Should not be null.
+ * @param propertyName The name of the property being animated. Can also be the
+ * case-sensitive name of the entire setter method. Should not be null.
* @param values The values that the property will animate between.
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
* @see FloatArrayEvaluator#FloatArrayEvaluator(float[])
}
/**
+ * Constructs and returns a PropertyValuesHolder with a given property name to use
+ * as a multi-float setter. The values are animated along the path, with the first
+ * parameter of the setter set to the x coordinate and the second set to the y coordinate.
+ *
+ * @param propertyName The name of the property being animated. Can also be the
+ * case-sensitive name of the entire setter method. Should not be null.
+ * The setter must take exactly two <code>float</code> parameters.
+ * @param path The Path along which the values should be animated.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ * @see ObjectAnimator#ofPropertyValuesHolder(Object, PropertyValuesHolder...)
+ */
+ public static PropertyValuesHolder ofMultiFloat(String propertyName, Path path) {
+ Keyframe[] keyframes = createKeyframes(path);
+ KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(keyframes);
+ TypeEvaluator<PointF> evaluator = new PointFEvaluator(new PointF());
+ PointFToFloatArray converter = new PointFToFloatArray();
+ return new MultiFloatValuesHolder(propertyName, converter, evaluator, keyframeSet);
+ }
+
+ /**
* Constructs and returns a PropertyValuesHolder with a given property and
* set of Object values for use with ObjectAnimator multi-value setters. The Object
* values are converted to <code>float[]</code> using the converter.
}
/**
+ * Constructs and returns a PropertyValuesHolder with a given property name and
+ * a Path along which the values should be animated. This variant supports a
+ * <code>TypeConverter</code> to convert from <code>PointF</code> to the target
+ * type.
+ *
+ * @param propertyName The name of the property being animated.
+ * @param converter Converts a PointF to the type associated with the setter. May be
+ * null if conversion is unnecessary.
+ * @param path The Path along which the values should be animated.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ public static PropertyValuesHolder ofObject(String propertyName,
+ TypeConverter<PointF, ?> converter, Path path) {
+ Keyframe[] keyframes = createKeyframes(path);
+ PropertyValuesHolder pvh = ofKeyframe(propertyName, keyframes);
+ pvh.setEvaluator(new PointFEvaluator(new PointF()));
+ pvh.setConverter(converter);
+ return pvh;
+ }
+
+ /**
* Constructs and returns a PropertyValuesHolder with a given property and
* set of Object values. This variant also takes a TypeEvaluator because the system
* cannot automatically interpolate between objects of unknown type.
}
/**
+ * Constructs and returns a PropertyValuesHolder with a given property and
+ * a Path along which the values should be animated. This variant supports a
+ * <code>TypeConverter</code> to convert from <code>PointF</code> to the target
+ * type.
+ *
+ * @param property The property being animated. Should not be null.
+ * @param converter Converts a PointF to the type associated with the setter. May be
+ * null if conversion is unnecessary.
+ * @param path The Path along which the values should be animated.
+ * @return PropertyValuesHolder The constructed PropertyValuesHolder object.
+ */
+ public static <V> PropertyValuesHolder ofObject(Property<?, V> property,
+ TypeConverter<PointF, V> converter, Path path) {
+ Keyframe[] keyframes = createKeyframes(path);
+ PropertyValuesHolder pvh = ofKeyframe(property, keyframes);
+ pvh.setEvaluator(new PointFEvaluator(new PointF()));
+ pvh.setConverter(converter);
+ return pvh;
+ }
+
+ /**
* Constructs and returns a PropertyValuesHolder object with the specified property name and set
* of values. These values can be of any type, but the type should be consistent so that
* an appropriate {@link android.animation.TypeEvaluator} can be found that matches
}
}
+ /* Path interpolation relies on approximating the Path as a series of line segments.
+ The line segments are recursively divided until there is less than 1/2 pixel error
+ between the lines and the curve. Each point of the line segment is converted
+ to a Keyframe and a linear interpolation between Keyframes creates a good approximation
+ of the curve.
+
+ The fraction for each Keyframe is the length along the Path to the point, divided by
+ the total Path length. Two points may have the same fraction in the case of a move
+ command causing a disjoint Path.
+
+ The value for each Keyframe is either the point as a PointF or one of the x or y
+ coordinates as an int or float. In the latter case, two Keyframes are generated for
+ each point that have the same fraction. */
+
+ /**
+ * Returns separate Keyframes arrays for the x and y coordinates along a Path. If
+ * isInt is true, the Keyframes will be IntKeyframes, otherwise they will be FloatKeyframes.
+ * The element at index 0 are the x coordinate Keyframes and element at index 1 are the
+ * y coordinate Keyframes. The returned values can be linearly interpolated and get less
+ * than 1/2 pixel error.
+ */
+ static Keyframe[][] createKeyframes(Path path, boolean isInt) {
+ if (path == null || path.isEmpty()) {
+ throw new IllegalArgumentException("The path must not be null or empty");
+ }
+ float[] pointComponents = path.approximate(0.5f);
+
+ int numPoints = pointComponents.length / 3;
+
+ Keyframe[][] keyframes = new Keyframe[2][];
+ keyframes[0] = new Keyframe[numPoints];
+ keyframes[1] = new Keyframe[numPoints];
+ int componentIndex = 0;
+ for (int i = 0; i < numPoints; i++) {
+ float fraction = pointComponents[componentIndex++];
+ float x = pointComponents[componentIndex++];
+ float y = pointComponents[componentIndex++];
+ if (isInt) {
+ keyframes[0][i] = Keyframe.ofInt(fraction, Math.round(x));
+ keyframes[1][i] = Keyframe.ofInt(fraction, Math.round(y));
+ } else {
+ keyframes[0][i] = Keyframe.ofFloat(fraction, x);
+ keyframes[1][i] = Keyframe.ofFloat(fraction, y);
+ }
+ }
+ return keyframes;
+ }
+
+ /**
+ * Returns PointF Keyframes for a Path. The resulting points can be linearly interpolated
+ * with less than 1/2 pixel in error.
+ */
+ private static Keyframe[] createKeyframes(Path path) {
+ if (path == null || path.isEmpty()) {
+ throw new IllegalArgumentException("The path must not be null or empty");
+ }
+ float[] pointComponents = path.approximate(0.5f);
+
+ int numPoints = pointComponents.length / 3;
+
+ Keyframe[] keyframes = new Keyframe[numPoints];
+ int componentIndex = 0;
+ for (int i = 0; i < numPoints; i++) {
+ float fraction = pointComponents[componentIndex++];
+ float x = pointComponents[componentIndex++];
+ float y = pointComponents[componentIndex++];
+ keyframes[i] = Keyframe.ofObject(fraction, new PointF(x, y));
+ }
+ return keyframes;
+ }
+
+ /**
+ * Convert from PointF to float[] for multi-float setters along a Path.
+ */
+ private static class PointFToFloatArray extends TypeConverter<PointF, float[]> {
+ private float[] mCoordinates = new float[2];
+
+ public PointFToFloatArray() {
+ super(PointF.class, float[].class);
+ }
+
+ @Override
+ public float[] convert(PointF value) {
+ mCoordinates[0] = value.x;
+ mCoordinates[1] = value.y;
+ return mCoordinates;
+ }
+ };
+
+ /**
+ * Convert from PointF to int[] for multi-int setters along a Path.
+ */
+ private static class PointFToIntArray extends TypeConverter<PointF, int[]> {
+ private int[] mCoordinates = new int[2];
+
+ public PointFToIntArray() {
+ super(PointF.class, int[].class);
+ }
+
+ @Override
+ public int[] convert(PointF value) {
+ mCoordinates[0] = Math.round(value.x);
+ mCoordinates[1] = Math.round(value.y);
+ return mCoordinates;
+ }
+ };
+
native static private int nGetIntMethod(Class targetClass, String methodName);
native static private int nGetFloatMethod(Class targetClass, String methodName);
native static private int nGetMultipleIntMethod(Class targetClass, String methodName,
native static private void nCallFourFloatMethod(Object target, int methodID, float arg1,
float arg2, float arg3, float arg4);
native static private void nCallMultipleFloatMethod(Object target, int methodID, float[] args);
-}
\ No newline at end of file
+}
package android.annotation;
import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.CLASS;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
/**
* Denotes that the annotated element of integer type, represents
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.CLASS;
-import static java.lang.annotation.RetentionPolicy.SOURCE;
/**
* Denotes that the annotated String element, represents a logical
setTitle(getText(titleId));
}
+ /**
+ * Change the color of the title associated with this activity.
+ * <p>
+ * This method is deprecated starting in API Level 11 and replaced by action
+ * bar styles. For information on styling the Action Bar, read the <a
+ * href="{@docRoot} guide/topics/ui/actionbar.html">Action Bar</a> developer
+ * guide.
+ *
+ * @deprecated Use action bar styles instead.
+ */
+ @Deprecated
public void setTitleColor(int textColor) {
mTitleColor = textColor;
onTitleChanged(mTitle, textColor);
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.KeyEvent;
-import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.content.pm.ResolveInfo;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.SystemClock;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Printer;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
/*package*/
package android.app;
import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
import com.android.internal.app.ActionBarImpl;
import com.android.internal.policy.PolicyManager;
import android.widget.ExpandableListView;
import android.widget.SimpleCursorTreeAdapter;
import android.widget.SimpleExpandableListAdapter;
-import android.widget.AdapterView.AdapterContextMenuInfo;
import java.util.Map;
package android.app;
import android.content.Intent;
-import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.Bundle;
-
-import java.util.Map;
/**
* {@hide}
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.database.Cursor;
import android.graphics.Rect;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
-import android.util.Slog;
import android.view.KeyEvent;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
import libcore.io.ErrnoException;
import libcore.io.IoUtils;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
-import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.ServiceManager;
package android.app.backup;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
import android.os.ParcelFileDescriptor;
import android.util.Log;
void dataChanged(String packageName);
/**
- * Erase all backed-up data for the given package from the storage
+ * Erase all backed-up data for the given package from the given storage
* destination.
*
* Any application can invoke this method for its own package, but
* only callers who hold the android.permission.BACKUP permission
* may invoke it for arbitrary packages.
*/
- void clearBackupData(String packageName);
+ void clearBackupData(String transportName, String packageName);
/**
* Notifies the Backup Manager Service that an agent has become available. This
import android.app.QueuedWork;
import android.content.Context;
-import android.content.SharedPreferences;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import java.util.ArrayList;
import java.util.HashMap;
-import android.app.ActivityThread;
import android.content.Context;
import android.os.Binder;
import android.os.Handler;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.util.TypedValue;
import android.widget.RemoteViews;
import android.widget.RemoteViews.OnClickHandler;
package android.appwidget;
-import android.app.ActivityManagerNative;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
-import android.os.Binder;
import android.os.IBinder;
-import android.os.Message;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
import java.util.Collections;
import java.util.HashSet;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;
-import java.util.Random;
import java.util.Set;
import java.util.UUID;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
-import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.ParcelUuid;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.io.IOException;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothProfile.ServiceListener;
-import android.bluetooth.IBluetoothManager;
-import android.bluetooth.IBluetoothStateChangeCallback;
-
-import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.util.ArrayList;
package android.bluetooth;
import java.util.ArrayList;
-import java.util.IllegalFormatConversionException;
import java.util.List;
import java.util.UUID;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothProfile.ServiceListener;
-import android.bluetooth.IBluetoothManager;
-import android.bluetooth.IBluetoothStateChangeCallback;
-
-import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.util.ArrayList;
import android.bluetooth.BluetoothDevice;
-import android.util.Log;
-
/**
* This abstract class is used to implement {@link BluetoothGattServer} callbacks.
*/
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.util.ArrayList;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.util.ArrayList;
import android.content.ServiceConnection;
import android.os.RemoteException;
import android.os.IBinder;
-import android.os.ServiceManager;
import android.util.Log;
/**
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.util.ArrayList;
import android.content.ServiceConnection;
import android.os.RemoteException;
import android.os.IBinder;
-import android.os.ServiceManager;
import android.util.Log;
/**
package android.bluetooth;
import android.os.Handler;
-import android.os.Message;
import android.os.ParcelUuid;
import java.io.Closeable;
package android.bluetooth;
-import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.util.Log;
import java.io.Closeable;
import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.util.List;
import java.util.Locale;
import java.util.UUID;
import android.net.LocalSocket;
package android.bluetooth;
import android.net.BaseNetworkStateTracker;
-import android.os.IBinder;
-import android.os.ServiceManager;
-import android.os.INetworkManagementService;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.DhcpResults;
import android.os.Messenger;
import android.text.TextUtils;
import android.util.Log;
-import java.net.InterfaceAddress;
-import android.net.LinkAddress;
-import android.net.RouteInfo;
-import java.net.Inet4Address;
-import android.os.SystemProperties;
import com.android.internal.util.AsyncChannel;
import android.os.Handler;
import android.os.IBinder;
import android.os.ServiceManager;
-import android.os.StrictMode;
-import android.util.Log;
import java.util.ArrayList;
package android.content;
-import android.app.Activity;
-import android.app.ActivityManagerNative;
-import android.app.LoadedApk;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
-import android.os.RemoteException;
import android.os.UserHandle;
import android.view.DisplayAdjustments;
import android.view.Display;
package android.content;
-import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.os.CancellationSignal;
package android.content;
-import android.os.Parcelable;
-import android.os.Parcel;
import android.net.Uri;
-import android.util.Log;
import java.util.ArrayList;
* Return the {@link ClipData} associated with this Intent. If there is
* none, returns null. See {@link #setClipData} for more information.
*
- * @see #setClipData;
+ * @see #setClipData
*/
public ClipData getClipData() {
return mClipData;
*
* @param type MIME data type to normalize
* @return normalized MIME data type, or null if the input was null
- * @see {@link #setType}
- * @see {@link #setTypeAndNormalize}
+ * @see #setType
+ * @see #setTypeAndNormalize
*/
public static String normalizeMimeType(String type) {
if (type == null) {
import android.os.Parcel;
import android.os.Parcelable;
-import java.lang.annotation.Inherited;
-
/**
* Applications can expose restrictions for a restricted user on a
* multiuser device. The administrator can configure these restrictions that will then be
package android.content;
import android.accounts.Account;
-import android.content.pm.RegisteredServicesCache;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.Parcelable.Creator;
/**
* Information about the sync operation that is currently underway.
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Pair;
public class SyncRequest implements Parcelable {
private static final String TAG = "SyncRequest";
import android.os.IBinder;
import android.os.Process;
import android.os.Trace;
-import android.util.ArrayMap;
import android.util.SparseArray;
import android.util.Log;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.Parcelable.Creator;
/**
* A single feature that can be requested by an application. This corresponds
import org.xmlpull.v1.XmlSerializer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import android.os.Parcel;
import java.io.IOException;
package android.content.res;
import android.os.ParcelFileDescriptor;
-import android.os.Trace;
import android.util.Log;
import android.util.TypedValue;
import android.util.Slog;
import android.util.TypedValue;
import android.util.LongSparseArray;
-import android.view.DisplayAdjustments;
import java.io.IOException;
import java.io.InputStream;
package android.content.res;
-import android.content.pm.ActivityInfo;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
-import android.util.Log;
/**
import android.content.Context;
import android.database.DatabaseErrorHandler;
-import android.database.DefaultDatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.util.Log;
import org.apache.harmony.dalvik.ddmc.ChunkHandler;
import org.apache.harmony.dalvik.ddmc.DdmServer;
import android.util.Log;
-import java.nio.ByteBuffer;
/**
* Handle thread-related traffic.
import org.apache.harmony.dalvik.ddmc.DdmServer;
import android.os.Debug;
import android.util.Log;
-import java.io.IOException;
import java.nio.ByteBuffer;
/**
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import java.util.concurrent.locks.ReentrantLock;
/**
* The Camera class is used to set image capture settings, start/stop preview,
package android.hardware;
-import android.app.PendingIntent;
import android.content.Context;
-import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
-import android.os.SystemProperties;
import android.util.Log;
import java.io.IOException;
-import java.util.HashMap;
/**
* @hide
package android.hardware;
import android.os.ParcelFileDescriptor;
-import android.util.Log;
import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
-import java.io.OutputStream;
import java.nio.ByteBuffer;
import android.content.Context;
import android.hardware.ICameraService;
import android.hardware.ICameraServiceListener;
-import android.hardware.IProCameraUser;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.utils.CameraBinderDecorator;
import android.hardware.camera2.utils.CameraRuntimeException;
*/
package android.hardware.camera2;
-import android.hardware.camera2.CameraDevice.CaptureListener;
-
/**
* A report of failed capture for a single image capture from the image sensor.
*
package android.hardware.camera2;
import android.hardware.camera2.impl.CameraMetadataNative;
-import android.hardware.camera2.CameraDevice.CaptureListener;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.Surface;
package android.hardware.camera2;
-import android.graphics.Point;
-import android.graphics.Rect;
import android.hardware.camera2.impl.CameraMetadataNative;
/**
}
/**
- * Initiates a fresh scan of availble Wifi displays.
+ * Starts scanning for available Wifi displays.
* The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast.
* <p>
+ * Calls to this method nest and must be matched by an equal number of calls to
+ * {@link #stopWifiDisplayScan()}.
+ * </p><p>
+ * Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
+ * </p>
+ *
+ * @hide
+ */
+ public void startWifiDisplayScan() {
+ mGlobal.startWifiDisplayScan();
+ }
+
+ /**
+ * Stops scanning for available Wifi displays.
+ * <p>
* Requires {@link android.Manifest.permission#CONFIGURE_WIFI_DISPLAY}.
* </p>
*
* @hide
*/
- public void scanWifiDisplays() {
- mGlobal.scanWifiDisplays();
+ public void stopWifiDisplayScan() {
+ mGlobal.stopWifiDisplayScan();
}
/**
private final SparseArray<DisplayInfo> mDisplayInfoCache = new SparseArray<DisplayInfo>();
private int[] mDisplayIdCache;
+ private int mWifiDisplayScanNestCount;
+
private DisplayManagerGlobal(IDisplayManager dm) {
mDm = dm;
}
}
}
- public void scanWifiDisplays() {
- try {
- mDm.scanWifiDisplays();
- } catch (RemoteException ex) {
- Log.e(TAG, "Failed to scan for Wifi displays.", ex);
+ public void startWifiDisplayScan() {
+ synchronized (mLock) {
+ if (mWifiDisplayScanNestCount++ == 0) {
+ registerCallbackIfNeededLocked();
+ try {
+ mDm.startWifiDisplayScan();
+ } catch (RemoteException ex) {
+ Log.e(TAG, "Failed to scan for Wifi displays.", ex);
+ }
+ }
+ }
+ }
+
+ public void stopWifiDisplayScan() {
+ synchronized (mLock) {
+ if (--mWifiDisplayScanNestCount == 0) {
+ try {
+ mDm.stopWifiDisplayScan();
+ } catch (RemoteException ex) {
+ Log.e(TAG, "Failed to scan for Wifi displays.", ex);
+ }
+ } else if (mWifiDisplayScanNestCount < 0) {
+ Log.wtf(TAG, "Wifi display scan nest count became negative: "
+ + mWifiDisplayScanNestCount);
+ mWifiDisplayScanNestCount = 0;
+ }
}
}
void registerCallback(in IDisplayManagerCallback callback);
- // No permissions required.
- void scanWifiDisplays();
+ // Requires CONFIGURE_WIFI_DISPLAY permission.
+ // The process must have previously registered a callback.
+ void startWifiDisplayScan();
- // Requires CONFIGURE_WIFI_DISPLAY permission to connect to an unknown device.
- // No permissions required to connect to a known device.
+ // Requires CONFIGURE_WIFI_DISPLAY permission.
+ void stopWifiDisplayScan();
+
+ // Requires CONFIGURE_WIFI_DISPLAY permission.
void connectWifiDisplay(String address);
// No permissions required.
// Requires CONFIGURE_WIFI_DISPLAY permission.
void forgetWifiDisplay(String address);
+ // Requires CONFIGURE_WIFI_DISPLAY permission.
+ void pauseWifiDisplay();
+
+ // Requires CONFIGURE_WIFI_DISPLAY permission.
+ void resumeWifiDisplay();
+
// No permissions required.
WifiDisplayStatus getWifiDisplayStatus();
// No permissions required but must be same Uid as the creator.
void releaseVirtualDisplay(in IBinder token);
-
- // Requires CONFIGURE_WIFI_DISPLAY permission.
- void pauseWifiDisplay();
-
- // Requires CONFIGURE_WIFI_DISPLAY permission.
- void resumeWifiDisplay();
}
import android.os.Parcelable;
import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.List;
/**
* Describes the current global state of Wifi display connectivity, including the
package android.hardware.location;
-import android.location.Location;
-
/**
* This class represents the characteristics of the geofence.
*
package android.hardware.usb;
-import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Log;
/**
* A class representing a USB accessory, which is an external hardware component
package android.hardware.usb;
-import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
-import android.util.Log;
-
-import java.io.FileDescriptor;
/**
* This class represents a USB device attached to the android device with the android device
package android.hardware.usb;
-import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
package android.hardware.usb;
-import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Bundle;
import android.os.Looper;
import android.os.Message;
-import android.os.RemoteException;
import android.util.Log;
import android.util.SparseArray;
import android.view.InputChannel;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.Inet4Address;
-import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.List;
import android.os.Build.VERSION_CODES;
import android.os.Messenger;
import android.os.RemoteException;
-import android.os.ResultReceiver;
import android.provider.Settings;
import java.net.InetAddress;
import android.os.Parcelable;
import android.os.Parcel;
-import java.net.InetAddress;
/**
* A simple object for retrieving the results of a DHCP request.
import java.net.InetAddress;
import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
/**
* A simple object for retrieving the results of a DHCP request.
* for this network.
*/
public String getTcpBufferSizesPropName() {
- return "net.tcp.buffersize.wifi";
+ return "net.tcp.buffersize.ethernet";
}
public void setDependencyMet(boolean met) {
* @param active True if the interface is actively transmitting data, false if it is idle.
*/
void interfaceClassDataActivityChanged(String label, boolean active);
+
+ /**
+ * Information about available DNS servers has been received.
+ *
+ * @param iface The interface on which the information was received.
+ * @param lifetime The time in seconds for which the DNS servers may be used.
+ * @param servers The IP addresses of the DNS servers.
+ */
+ void interfaceDnsServerInfo(String iface, long lifetime, in String[] servers);
}
package android.net;
-import java.util.Map;
-
/**
* Interface used to get feedback about a {@link android.net.LinkSocket}. Instance is optionally
* passed when a LinkSocket is constructed. Multiple LinkSockets may use the same notifier.
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-import java.util.Set;
/**
*
package android.net;
-import android.util.Log;
import java.util.Locale;
/**
import android.text.TextUtils;
import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
import java.util.Locale;
/**
import android.os.SystemClock;
import android.util.Log;
-import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetAddress;
import java.net.Inet4Address;
import java.nio.ByteBuffer;
-import java.util.List;
/**
* This class implements the DHCP-ACK packet.
import java.net.InetAddress;
import java.net.Inet4Address;
import java.nio.ByteBuffer;
-import java.util.List;
/**
* This class implements the DHCP-OFFER packet.
package android.net.dhcp;
-import android.util.Log;
-
-import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
package android.net.dhcp;
import java.net.InetAddress;
-import java.nio.ByteBuffer;
import java.util.List;
/**
package android.net.http;
-import org.apache.http.Header;
-
import org.apache.http.HttpConnection;
import org.apache.http.HttpClientConnection;
import org.apache.http.HttpConnectionMetrics;
import org.apache.http.HttpInetConnection;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseFactory;
import org.apache.http.NoHttpResponseException;
import org.apache.http.StatusLine;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.entity.ContentLengthStrategy;
-import org.apache.http.impl.DefaultHttpResponseFactory;
import org.apache.http.impl.HttpConnectionMetricsImpl;
import org.apache.http.impl.entity.EntitySerializer;
import org.apache.http.impl.entity.StrictContentLengthStrategy;
import java.io.IOException;
import java.net.UnknownHostException;
-import java.util.ListIterator;
import java.util.LinkedList;
import javax.net.ssl.SSLHandshakeException;
import android.content.Context;
import android.os.SystemClock;
-import org.apache.http.HttpHost;
-
import java.lang.Thread;
/**
import java.net.Socket;
import java.io.IOException;
-import org.apache.http.HttpClientConnection;
import org.apache.http.HttpHost;
-import org.apache.http.impl.DefaultHttpClientConnection;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
package android.net.http;
import android.content.Context;
-import com.android.okhttp.OkResponseCache;
-import com.android.okhttp.ResponseSource;
-import com.android.okhttp.internal.DiskLruCache;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.net.ssl.HttpsURLConnection;
-import libcore.io.IoUtils;
import org.apache.http.impl.client.DefaultHttpClient;
/**
import javax.net.ssl.X509TrustManager;
import java.io.File;
import java.io.IOException;
-import java.net.InetSocketAddress;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.cert.X509Certificate;
import org.apache.http.entity.InputStreamEntity;
import org.apache.http.Header;
-import org.apache.http.HttpClientConnection;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
import org.apache.http.ParseException;
import org.apache.http.ProtocolVersion;
import android.net.NetworkInfo;
import android.net.Proxy;
import android.net.WebAddress;
-import android.os.Handler;
-import android.os.Message;
-import android.os.SystemProperties;
-import android.text.TextUtils;
import android.util.Log;
import java.io.InputStream;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
-import android.os.Binder;
-import android.os.IBinder;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.nfc.FormatException;
import android.nfc.INfcTag;
import android.nfc.NdefMessage;
-import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.TagLostException;
import android.os.Bundle;
import android.nfc.FormatException;
import android.nfc.INfcTag;
import android.nfc.NdefMessage;
-import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.nfc.TagLostException;
import android.os.RemoteException;
import android.content.pm.ApplicationInfo;
import android.telephony.SignalStrength;
-import android.util.Log;
import android.util.Printer;
import android.util.Slog;
import android.util.SparseArray;
/** The manufacturer of the product/hardware. */
public static final String MANUFACTURER = getString("ro.product.manufacturer");
- /** The brand (e.g., carrier) the software is customized for, if any. */
+ /** The consumer-visible brand with which the product/hardware will be associated, if any. */
public static final String BRAND = getString("ro.product.brand");
/** The end-user-visible name for the end product. */
*/
package android.os;
-import java.net.InetAddress;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
import java.net.InetSocketAddress;
import java.util.NoSuchElementException;
-import static libcore.io.OsConstants.*;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
import android.os.Binder;
import android.os.CommonTimeUtils;
import android.os.IBinder;
*/
package android.os;
-import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.NoSuchElementException;
package android.os;
-import android.util.Log;
-
/**
* Schedule a countdown until a time in the future, with
* regular notifications on intervals along the way.
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
-import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Reader;
import java.lang.reflect.Field;
import org.apache.harmony.dalvik.ddmc.DdmServer;
import dalvik.bytecode.OpcodeInfo;
-import dalvik.bytecode.Opcodes;
import dalvik.system.VMDebug;
package android.os;
-import android.util.Log;
-
import com.android.internal.os.IDropBoxManagerService;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import android.util.Log;
-import com.android.internal.os.RuntimeInit;
-
import java.lang.ref.WeakReference;
-import java.util.ArrayList;
import java.util.HashMap;
/**
import android.util.Slog;
import libcore.io.ErrnoException;
-import libcore.io.IoUtils;
import libcore.io.Libcore;
-import libcore.io.OsConstants;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
package android.os;
import java.io.FileDescriptor;
-import java.io.PrintWriter;
/**
* Base interface for a remotable object, the core part of a lightweight
import android.util.Log;
import android.util.Printer;
-import android.util.PrefixPrinter;
/**
* Class used to run a message loop for a thread. Threads by default do
package android.os;
-import android.util.Log;
-
/**
* Vibrator implementation that does nothing.
*
import android.os.Message;
import java.lang.ref.WeakReference;
-import java.util.HashMap;
/** @hide */
public class Registrant
package android.os;
import android.os.Handler;
-import android.os.Message;
import java.util.ArrayList;
-import java.util.HashMap;
/** @hide */
public class RegistrantList
import java.util.ArrayList;
-import android.util.Log;
-
/**
* Gives access to the system properties store. The system properties
package android.os;
-import android.util.Slog;
-
import com.google.android.collect.Maps;
import java.util.HashMap;
package android.os;
-import android.util.Log;
-
/**
* Writes trace events to the system trace buffer. These trace events can be
* collected and visualized using the Systrace tool.
import android.app.ActivityManagerNative;
import android.content.Context;
-import android.content.RestrictionEntry;
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Log;
import android.util.TypedValue;
import android.util.Xml;
import android.view.LayoutInflater;
PreferenceManager.OnPreferenceTreeClickListener,
PreferenceFragment.OnPreferenceStartFragmentCallback {
+ private static final String TAG = "PreferenceActivity";
+
// Constants for state save/restore
private static final String HEADERS_TAG = ":android:headers";
private static final String CUR_HEADER_TAG = ":android:cur_header";
int initialTitle = getIntent().getIntExtra(EXTRA_SHOW_FRAGMENT_TITLE, 0);
int initialShortTitle = getIntent().getIntExtra(EXTRA_SHOW_FRAGMENT_SHORT_TITLE, 0);
- // Restore from headers only if they are supported which
- // is in multi-pane mode.
- if (savedInstanceState != null && !mSinglePane) {
+ if (savedInstanceState != null) {
// We are restarting from a previous saved state; used that to
// initialize, instead of starting fresh.
ArrayList<Header> headers = savedInstanceState.getParcelableArrayList(HEADERS_TAG);
package android.preference;
-import java.util.Map;
-
import android.content.Context;
import android.util.AttributeSet;
package android.preference;
-import android.app.FragmentBreadCrumbs;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import com.android.internal.util.XmlUtils;
import java.io.IOException;
-import java.util.Map;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import android.app.AliasActivity;
import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
-import android.util.Log;
/**
* The {@link PreferenceInflater} is used to inflate preference hierarchies from
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
-import android.widget.AbsListView;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.ListAdapter;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
-import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.widget.ImageView;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
/**
* <p>
* {@link #MIME_TYPE_DIR}.
*
* @see #COLUMN_FLAGS
- * @see DocumentsContract#createDocument(ContentResolver, Uri, String,
- * String)
* @see DocumentsProvider#createDocument(String, String, String)
*/
public static final int FLAG_DIR_SUPPORTS_CREATE = 1 << 3;
import android.view.textservice.SentenceSuggestionsInfo;
import android.view.textservice.SuggestionsInfo;
import android.view.textservice.TextInfo;
-import android.widget.SpellChecker;
import java.lang.ref.WeakReference;
import java.text.BreakIterator;
import android.os.PowerManager;
import android.os.RemoteException;
import android.util.Log;
-import android.util.LogPrinter;
import android.view.Display;
import android.view.Gravity;
import android.view.IWindowSession;
package android.speech.srec;
-import android.util.Log;
-
import java.io.File;
import java.io.InputStream;
import java.io.IOException;
package android.speech.tts;
import android.media.AudioFormat;
-import android.os.FileUtils;
import android.speech.tts.TextToSpeechService.UtteranceProgressDispatcher;
import android.util.Log;
-import java.io.File;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import android.os.RemoteException;
import android.speech.tts.ITextToSpeechCallback;
import android.speech.tts.ITextToSpeechService;
-import android.speech.tts.TextToSpeech.Engine;
import android.util.Log;
import android.util.Pair;
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
-import com.android.internal.util.XmlUtils;
-
import java.io.IOException;
import java.io.StringReader;
-import java.util.HashMap;
/**
* This class processes HTML strings into displayable styled text.
import java.util.Formatter;
import java.util.GregorianCalendar;
import java.util.Locale;
-import java.util.TimeZone;
import libcore.icu.DateIntervalFormat;
import libcore.icu.LocaleData;
package android.text.method;
-import android.graphics.Rect;
-import android.text.GetChars;
-import android.text.Spanned;
-import android.text.SpannedString;
-import android.text.TextUtils;
-import android.view.View;
-
/**
* This transformation method causes any carriage return characters (\r)
* to be hidden by displaying them as zero-width non-breaking space
import android.text.NoCopySpan;
import android.text.TextUtils;
import android.text.TextWatcher;
-import android.text.Selection;
import android.text.Spanned;
import android.text.Spannable;
import android.text.style.UpdateLayout;
package android.text.method;
-import android.graphics.Rect;
-import android.text.Editable;
-import android.text.GetChars;
-import android.text.Spannable;
-import android.text.Spanned;
-import android.text.SpannedString;
-import android.text.TextUtils;
-import android.view.View;
-
/**
* This transformation method causes any newline characters (\n) to be
* displayed as spaces instead of causing line breaks, and causes
import android.graphics.drawable.Drawable;
import android.graphics.Paint;
import android.graphics.Canvas;
-import android.graphics.RectF;
import android.text.Spanned;
import android.text.Layout;
package android.text.style;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
-import android.graphics.Paint.Style;
import android.graphics.drawable.Drawable;
-import android.util.Log;
import java.lang.ref.WeakReference;
import android.graphics.Paint;
import android.graphics.Bitmap;
import android.graphics.Canvas;
-import android.graphics.RectF;
import android.text.Spanned;
import android.text.Layout;
package android.text.style;
import android.graphics.Paint;
-import android.graphics.Canvas;
-import android.text.Layout;
import android.text.TextPaint;
public interface LineHeightSpan
package android.text.style;
-import android.graphics.Paint;
import android.text.TextPaint;
/**
package android.util;
-import android.util.Log;
-
import java.io.BufferedReader;
-import java.io.FileReader;
import java.io.IOException;
-import java.util.HashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
/**
* @deprecated This class is no longer functional.
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.io.StringWriter;
import java.util.Iterator;
import java.util.LinkedList;
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*/
public class LongSparseArray<E> implements Cloneable {
private static final Object DELETED = new Object();
import com.android.internal.util.ArrayUtils;
-import java.util.Arrays;
-
/**
* Map of {@code long} to {@code long}. Unlike a normal array of longs, there
* can be gaps in the indices. It is intended to be more memory efficient than using a
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*
* @hide
*/
package android.util;
-import com.android.internal.os.RuntimeInit;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
/**
* @hide
*/
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*/
public class SparseArray<E> implements Cloneable {
private static final Object DELETED = new Object();
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*/
public class SparseBooleanArray implements Cloneable {
/**
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*/
public class SparseIntArray implements Cloneable {
private int[] mKeys;
* {@link #keyAt(int)} and {@link #valueAt(int)}. Iterating over the keys using
* <code>keyAt(int)</code> with ascending values of the index will return the
* keys in ascending order, or the values corresponding to the keys in ascending
- * order in the case of <code>valueAt(int)<code>.</p>
+ * order in the case of <code>valueAt(int)</code>.</p>
*/
public class SparseLongArray implements Cloneable {
private int[] mKeys;
import android.os.Message;
import android.os.Process;
import android.os.RemoteException;
-import android.util.LongArray;
-import android.util.SparseLongArray;
import android.view.View.AttachInfo;
import android.view.accessibility.AccessibilityInteractionClient;
import android.view.accessibility.AccessibilityNodeInfo;
package android.view;
import android.content.ComponentCallbacks;
-import android.content.Context;
-import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import java.text.BreakIterator;
import android.content.ContextWrapper;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.os.Build;
/**
* A ContextWrapper that allows you to modify the theme from what is in the
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.Process;
import android.util.DisplayMetrics;
import libcore.util.Objects;
import dalvik.system.CloseGuard;
-import android.os.Handler;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Pools.Pool;
import android.os.Parcelable;
import android.text.method.MetaKeyKeyListener;
import android.util.Log;
-import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.KeyCharacterMap;
import android.graphics.Region;
import android.view.Surface;
import android.os.IBinder;
-import android.os.SystemProperties;
import android.util.Log;
import android.view.Surface.OutOfResourcesException;
private final String mName;
int mNativeObject; // package visibility only for Surface.java access
- private static final boolean HEADLESS = "1".equals(
- SystemProperties.get("ro.config.headless", "0"));
-
/* flags used in constructor (keep in sync with ISurfaceComposerClient.h) */
/**
new Throwable());
}
- checkHeadless();
-
mName = name;
mNativeObject = nativeCreate(session, name, w, h, format, flags);
if (mNativeObject == 0) {
}
nativeScreenshot(display, consumer, width, height, minLayer, maxLayer, allLayers);
}
-
- private static void checkHeadless() {
- if (HEADLESS) {
- throw new UnsupportedOperationException("Device is headless");
- }
- }
}
attachInfo.mHandler.removeCallbacks(action);
attachInfo.mViewRootImpl.mChoreographer.removeCallbacks(
Choreographer.CALLBACK_ANIMATION, action, null);
- } else {
- // Assume that post will succeed later
- ViewRootImpl.getRunQueue().removeCallbacks(action);
}
+ // Assume that post will succeed later
+ ViewRootImpl.getRunQueue().removeCallbacks(action);
}
return true;
}
if (mAttachInfo != null) {
mAttachInfo.mViewRootImpl.mChoreographer.removeCallbacks(
Choreographer.CALLBACK_ANIMATION, what, who);
- } else {
- ViewRootImpl.getRunQueue().removeCallbacks(what);
}
+ ViewRootImpl.getRunQueue().removeCallbacks(what);
}
}
import android.util.Pools.SynchronizedPool;
import android.util.SparseArray;
import android.view.accessibility.AccessibilityEvent;
-import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
public abstract void setTitle(CharSequence title);
+ @Deprecated
public abstract void setTitleColor(int textColor);
public abstract void openPanel(int featureId, KeyEvent event);
import android.util.Log;
import android.util.LongSparseArray;
import android.util.SparseArray;
-import android.util.SparseLongArray;
import java.util.ArrayList;
import java.util.Collections;
import android.util.Log;
import android.util.LongArray;
import android.util.LongSparseArray;
-import android.util.SparseLongArray;
import java.util.HashSet;
import java.util.LinkedList;
package android.view.animation;
import android.content.Context;
-import android.content.res.TypedArray;
import android.util.AttributeSet;
/**
import android.os.Parcel;
import android.os.Parcelable;
-import android.text.TextUtils;
/**
* Description of what an input method would like from an application when
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
-import android.text.TextUtils;
/**
* Information given to an {@link InputMethod} about a client connecting
package android.webkit;
-import android.content.Context;
-import android.net.http.Headers;
-import android.util.Log;
-
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.res.Resources;
import java.util.Calendar;
-import java.util.Date;
import java.util.Locale;
import libcore.icu.LocaleData;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
-import android.webkit.WebView;
/**
* Represents a plugin (Java equivalent of the PluginPackageAndroid
package android.webkit;
-import android.net.http.Headers;
-
import java.io.InputStream;
/**
import java.io.BufferedWriter;
import java.io.File;
-import java.io.OutputStream;
import java.util.Map;
/**
package android.webkit;
-import android.os.Build;
import android.os.StrictMode;
-import android.os.SystemProperties;
import android.util.AndroidRuntimeException;
import android.util.Log;
import java.io.BufferedWriter;
import java.io.File;
-import java.io.OutputStream;
import java.util.Map;
/**
import com.android.internal.R;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.util.Log;
import android.view.ActionProvider;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.content.Context;
import android.content.res.TypedArray;
-import android.graphics.Canvas;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.text.format.DateUtils;
import android.util.AttributeSet;
import android.util.Log;
-import android.util.Slog;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.RemoteViews.RemoteView;
import android.util.AttributeSet;
import android.util.Log;
import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
import android.widget.TextView;
import android.widget.RemoteViews.RemoteView;
-import com.android.internal.R;
-
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.text.method.KeyListener;
import android.text.method.TextKeyListener;
import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyCharacterMap;
import android.view.View;
import android.graphics.Rect;
import android.inputmethodservice.ExtractEditText;
import android.os.Bundle;
import android.os.Handler;
-import android.os.Message;
-import android.os.Messenger;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.DynamicLayout;
import android.view.accessibility.AccessibilityNodeInfo.CollectionInfo;
import android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo;
import android.view.animation.GridLayoutAnimationController;
-import android.widget.AbsListView.LayoutParams;
import android.widget.RemoteViews.RemoteView;
import java.lang.annotation.Retention;
package android.widget;
import android.content.Context;
-import android.os.Handler;
-import android.os.Message;
import android.util.AttributeSet;
-import android.view.MotionEvent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.RemoteViews.RemoteView;
-import java.util.Map;
-
/**
* <p>
* Displays a button with an image (instead of text) that can be pressed
import android.view.MotionEvent;
import android.view.View;
import android.view.View.MeasureSpec;
-import android.view.View.OnAttachStateChangeListener;
import android.view.View.OnTouchListener;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewParent;
-import android.view.ViewRootImpl;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.CollectionInfo;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
-import com.android.internal.R;
-
/**
* <p>
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
-import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
import com.android.internal.widget.IRemoteViewsAdapterConnection;
import com.android.internal.widget.IRemoteViewsFactory;
-import com.android.internal.widget.LockPatternUtils;
/**
* An adapter to a RemoteViewsService which fetches and caches RemoteViews
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
-import android.view.ViewGroup;
/**
* Space is a lightweight View subclass that may be used to create gaps between components
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Locale;
-import java.util.concurrent.locks.ReentrantLock;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
package android.widget;
import android.annotation.Widget;
-import android.app.Dialog;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Parcelable;
import android.util.AttributeSet;
-import android.view.KeyEvent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.ViewRootImpl;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Handler;
-import android.util.Log;
import android.util.TypedValue;
import android.view.ActionMode;
import android.view.ContextThemeWrapper;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
-import android.view.ViewGroup;
import android.view.Window;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AnimationUtils;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
-import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
-import android.view.View.OnClickListener;
/**
* Media route chooser dialog fragment.
import android.app.Activity;
import android.content.ActivityNotFoundException;
-import android.content.Context;
import android.content.Intent;
import android.graphics.Typeface;
import android.provider.Settings;
import android.os.Bundle;
import android.os.Handler;
import android.text.method.AllCapsTransformationMethod;
-import android.text.method.TransformationMethod;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.View;
-import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AnticipateOvershootInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
-import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.Toast;
public class PlatLogoActivity extends Activity {
FrameLayout mContent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
-import android.os.RemoteException;
import android.os.SELinux;
import android.util.Log;
import com.android.org.bouncycastle.util.encoders.Base64;
import java.io.File;
-import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.util.ArrayList;
/**
* Backup transport for stashing stuff into a known location on disk, and
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Handler;
-import android.os.HandlerThread;
import android.os.Looper;
import android.os.UserHandle;
import com.android.internal.os.BackgroundThread;
import android.net.RouteInfo;
import android.net.LinkAddress;
-import com.android.internal.util.Preconditions;
-
import java.net.InetAddress;
import java.util.List;
import java.util.ArrayList;
package com.android.internal.os;
-import android.os.Binder;
import android.os.IBinder;
import android.os.SystemClock;
import android.util.EventLog;
-import android.util.Log;
-
-import java.io.FileDescriptor;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
import java.lang.ref.WeakReference;
-import java.lang.reflect.Modifier;
/**
* Private and debugging Binder APIs.
import java.io.IOException;
import libcore.io.IoUtils;
-import libcore.io.Libcore;
import dalvik.system.Zygote;
import com.android.internal.R;
import android.content.Context;
-import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
-import android.view.ViewConfiguration;
/**
* Allows components to query for various configuration policy decisions
import android.database.ContentObserver;
import android.net.Uri;
import android.os.AsyncTask;
-import android.os.Build;
import android.os.Handler;
import android.os.RemoteException;
import android.os.UserHandle;
import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
-import android.transition.Transition;
-import android.transition.TransitionManager;
import android.util.SparseBooleanArray;
import android.view.ActionProvider;
import android.view.Gravity;
package com.android.internal.view.menu;
import android.content.Context;
-import android.database.DataSetObserver;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
-import android.view.MotionEvent;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
package com.android.internal.widget;
-import android.app.ActionBar;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
-import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.content.Context;
import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
import android.widget.RelativeLayout;
public class FaceUnlockView extends RelativeLayout {
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
-import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
package com.android.internal.widget;
-import java.util.Locale;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.inputmethodservice.Keyboard;
import android.inputmethodservice.KeyboardView;
import android.inputmethodservice.KeyboardView.OnKeyboardActionListener;
-import android.os.Handler;
import android.os.SystemClock;
-import android.os.Vibrator;
import android.provider.Settings;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
-import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.Settings;
import android.app.ActionBar;
import android.content.Context;
import android.content.res.Configuration;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.res.Resources.Theme;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
-import android.util.TypedValue;
import android.view.View;
import android.view.accessibility.CaptioningManager.CaptionStyle;
import android.content.Context;
import android.os.SystemClock;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.Settings;
-import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.content.res.Resources;
import android.graphics.Canvas;
-import android.graphics.ColorFilter;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.util.Log;
public void limitReached(String limitName, String iface) {
// default no-op
}
+
+ @Override
+ public void interfaceDnsServerInfo(String iface, long lifetime, String[] servers) {
+ // default no-op
+ }
}
android/graphics/TextLayout.cpp \
android/graphics/TextLayoutCache.cpp \
android/graphics/Typeface.cpp \
+ android/graphics/TypefaceImpl.cpp \
android/graphics/Utils.cpp \
android/graphics/Xfermode.cpp \
android/graphics/YuvToJpegEncoder.cpp \
libicuuc \
libicui18n \
libmedia \
- libwpa_client \
libjpeg \
libusbhost \
libharfbuzz_ng \
LOCAL_SHARED_LIBRARIES += libhwui
endif
+ifeq ($(USE_MINIKIN), true)
+ LOCAL_CFLAGS += -DUSE_MINIKIN
+ LOCAL_C_INCLUDES += frameworks/minikin/include \
+ external/freetype/include
+ LOCAL_SRC_FILES += android/graphics/MinikinSkia.cpp
+# note: the freetype include is spurious; minikin itself probably
+# shouldn't depend on it
+ LOCAL_SHARED_LIBRARIES += libminikin libstlport
+endif
+
LOCAL_SHARED_LIBRARIES += \
libdl
# we need to access the private Bionic header
do {\r
*dst++ = SkUnPreMultiply::PMColorToColor(colors[*s++]);\r
} while (--width != 0);\r
- ctable->unlockColors(false);\r
+ ctable->unlockColors();\r
}\r
\r
static void ToColor_SI8_Raw(SkColor dst[], const void* src, int width,\r
*dst++ = SkColorSetARGB(SkGetPackedA32(c), SkGetPackedR32(c),\r
SkGetPackedG32(c), SkGetPackedB32(c));\r
} while (--width != 0);\r
- ctable->unlockColors(false);\r
+ ctable->unlockColors();\r
}\r
\r
static void ToColor_SI8_Opaque(SkColor dst[], const void* src, int width,\r
*dst++ = SkColorSetRGB(SkGetPackedR32(c), SkGetPackedG32(c),\r
SkGetPackedB32(c));\r
} while (--width != 0);\r
- ctable->unlockColors(false);\r
+ ctable->unlockColors();\r
}\r
\r
// can return NULL\r
p->writeInt32(count);\r
memcpy(p->writeInplace(count * sizeof(SkPMColor)),\r
ctable->lockColors(), count * sizeof(SkPMColor));\r
- ctable->unlockColors(false);\r
+ ctable->unlockColors();\r
} else {\r
p->writeInt32(0); // indicate no ctable\r
}\r
int fHeight;
};
-static jobject createBitmapRegionDecoder(JNIEnv* env, SkStream* stream) {
+static jobject createBitmapRegionDecoder(JNIEnv* env, SkStreamRewindable* stream) {
SkImageDecoder* decoder = SkImageDecoder::Factory(stream);
int width, height;
if (NULL == decoder) {
For now we just always copy the array's data if isShareable.
*/
AutoJavaByteArray ar(env, byteArray);
- SkStream* stream = new SkMemoryStream(ar.ptr() + offset, length, true);
+ SkMemoryStream* stream = new SkMemoryStream(ar.ptr() + offset, length, true);
jobject brd = createBitmapRegionDecoder(env, stream);
SkSafeUnref(stream); // the decoder now holds a reference
#include "SkShader.h"
#include "SkTemplates.h"
+#ifdef USE_MINIKIN
+#include <minikin/Layout.h>
+#include "MinikinSkia.h"
+#endif
+
#include "TextLayout.h"
#include "TextLayoutCache.h"
+#include "TypefaceImpl.h"
#include "unicode/ubidi.h"
#include "unicode/ushape.h"
}
- static void drawText___CIIFFIPaint(JNIEnv* env, jobject, SkCanvas* canvas,
+ static void drawText___CIIFFIPaintTypeface(JNIEnv* env, jobject, SkCanvas* canvas,
jcharArray text, int index, int count,
- jfloat x, jfloat y, int flags, SkPaint* paint) {
+ jfloat x, jfloat y, int flags, SkPaint* paint,
+ TypefaceImpl *typeface) {
jchar* textArray = env->GetCharArrayElements(text, NULL);
- drawTextWithGlyphs(canvas, textArray + index, 0, count, x, y, flags, paint);
+ drawTextWithGlyphs(canvas, textArray + index, 0, count, x, y, flags, paint, typeface);
env->ReleaseCharArrayElements(text, textArray, JNI_ABORT);
}
- static void drawText__StringIIFFIPaint(JNIEnv* env, jobject,
+ static void drawText__StringIIFFIPaintTypeface(JNIEnv* env, jobject,
SkCanvas* canvas, jstring text,
int start, int end,
- jfloat x, jfloat y, int flags, SkPaint* paint) {
+ jfloat x, jfloat y, int flags, SkPaint* paint,
+ TypefaceImpl *typeface) {
const jchar* textArray = env->GetStringChars(text, NULL);
- drawTextWithGlyphs(canvas, textArray, start, end, x, y, flags, paint);
+ drawTextWithGlyphs(canvas, textArray, start, end, x, y, flags, paint, typeface);
env->ReleaseStringChars(text, textArray);
}
+#ifdef USE_MINIKIN
+ static void drawGlyphsToSkia(SkCanvas *canvas, SkPaint *paint, Layout *layout, float x, float y) {
+ size_t nGlyphs = layout->nGlyphs();
+ uint16_t *glyphs = new uint16_t[nGlyphs];
+ SkPoint *pos = new SkPoint[nGlyphs];
+ SkTypeface *lastFace = NULL;
+ SkTypeface *skFace = NULL;
+ size_t start = 0;
+
+ paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ for (size_t i = 0; i < nGlyphs; i++) {
+ MinikinFontSkia *mfs = static_cast<MinikinFontSkia *>(layout->getFont(i));
+ skFace = mfs->GetSkTypeface();
+ glyphs[i] = layout->getGlyphId(i);
+ pos[i].fX = SkFloatToScalar(x + layout->getX(i));
+ pos[i].fY = SkFloatToScalar(y + layout->getY(i));
+ if (i > 0 && skFace != lastFace) {
+ paint->setTypeface(lastFace);
+ canvas->drawPosText(glyphs + start, (i - start) << 1, pos + start, *paint);
+ start = i;
+ }
+ lastFace = skFace;
+ }
+ if (skFace != NULL) {
+ paint->setTypeface(skFace);
+ canvas->drawPosText(glyphs + start, (nGlyphs - start) << 1, pos + start, *paint);
+ }
+ delete[] glyphs;
+ delete[] pos;
+ }
+#endif
+
static void drawTextWithGlyphs(SkCanvas* canvas, const jchar* textArray,
int start, int end,
- jfloat x, jfloat y, int flags, SkPaint* paint) {
+ jfloat x, jfloat y, int flags, SkPaint* paint, TypefaceImpl* typeface) {
jint count = end - start;
- drawTextWithGlyphs(canvas, textArray + start, 0, count, count, x, y, flags, paint);
+ drawTextWithGlyphs(canvas, textArray + start, 0, count, count, x, y, flags, paint, typeface);
}
static void drawTextWithGlyphs(SkCanvas* canvas, const jchar* textArray,
int start, int count, int contextCount,
- jfloat x, jfloat y, int flags, SkPaint* paint) {
-
+ jfloat x, jfloat y, int flags, SkPaint* paint, TypefaceImpl* typeface) {
+
+#ifdef USE_MINIKIN
+ Layout layout;
+ TypefaceImpl* resolvedFace = TypefaceImpl_resolveDefault(typeface);
+ layout.setFontCollection(resolvedFace->fFontCollection);
+ FontStyle style = resolvedFace->fStyle;
+ char css[256];
+ sprintf(css, "font-size: %d; font-weight: %d; font-style: %s",
+ (int)paint->getTextSize(),
+ style.getWeight() * 100,
+ style.getItalic() ? "italic" : "normal");
+ layout.setProperties(css);
+ layout.doLayout(textArray + start, count);
+ drawGlyphsToSkia(canvas, paint, &layout, x, y);
+#else
sp<TextLayoutValue> value = TextLayoutEngine::getInstance().getValue(paint,
textArray, start, count, contextCount, flags);
if (value == NULL) {
doDrawGlyphsPos(canvas, value->getGlyphs(), value->getPos(), 0, value->getGlyphsCount(), x, y, flags, paint);
doDrawTextDecorations(canvas, x, y, value->getTotalAdvance(), paint);
paint->setTextAlign(align);
+#endif
}
// Same values used by Skia
delete[] posPtr;
}
- static void drawTextRun___CIIIIFFIPaint(
+ static void drawTextRun___CIIIIFFIPaintTypeface(
JNIEnv* env, jobject, SkCanvas* canvas, jcharArray text, int index,
int count, int contextIndex, int contextCount,
- jfloat x, jfloat y, int dirFlags, SkPaint* paint) {
+ jfloat x, jfloat y, int dirFlags, SkPaint* paint,
+ TypefaceImpl* typeface) {
jchar* chars = env->GetCharArrayElements(text, NULL);
drawTextWithGlyphs(canvas, chars + contextIndex, index - contextIndex,
- count, contextCount, x, y, dirFlags, paint);
+ count, contextCount, x, y, dirFlags, paint, typeface);
env->ReleaseCharArrayElements(text, chars, JNI_ABORT);
}
- static void drawTextRun__StringIIIIFFIPaint(
+ static void drawTextRun__StringIIIIFFIPaintTypeface(
JNIEnv* env, jobject obj, SkCanvas* canvas, jstring text, jint start,
jint end, jint contextStart, jint contextEnd,
- jfloat x, jfloat y, jint dirFlags, SkPaint* paint) {
+ jfloat x, jfloat y, jint dirFlags, SkPaint* paint,
+ TypefaceImpl* typeface) {
jint count = end - start;
jint contextCount = contextEnd - contextStart;
const jchar* chars = env->GetStringChars(text, NULL);
drawTextWithGlyphs(canvas, chars + contextStart, start - contextStart,
- count, contextCount, x, y, dirFlags, paint);
+ count, contextCount, x, y, dirFlags, paint, typeface);
env->ReleaseStringChars(text, chars);
}
(void*)SkCanvasGlue::drawBitmapMesh},
{"nativeDrawVertices", "(III[FI[FI[II[SIII)V",
(void*)SkCanvasGlue::drawVertices},
- {"native_drawText","(I[CIIFFII)V",
- (void*) SkCanvasGlue::drawText___CIIFFIPaint},
- {"native_drawText","(ILjava/lang/String;IIFFII)V",
- (void*) SkCanvasGlue::drawText__StringIIFFIPaint},
- {"native_drawTextRun","(I[CIIIIFFII)V",
- (void*) SkCanvasGlue::drawTextRun___CIIIIFFIPaint},
- {"native_drawTextRun","(ILjava/lang/String;IIIIFFII)V",
- (void*) SkCanvasGlue::drawTextRun__StringIIIIFFIPaint},
+ {"native_drawText","(I[CIIFFIII)V",
+ (void*) SkCanvasGlue::drawText___CIIFFIPaintTypeface},
+ {"native_drawText","(ILjava/lang/String;IIFFIII)V",
+ (void*) SkCanvasGlue::drawText__StringIIFFIPaintTypeface},
+ {"native_drawTextRun","(I[CIIIIFFIII)V",
+ (void*) SkCanvasGlue::drawTextRun___CIIIIFFIPaintTypeface},
+ {"native_drawTextRun","(ILjava/lang/String;IIIIFFIII)V",
+ (void*) SkCanvasGlue::drawTextRun__StringIIIIFFIPaintTypeface},
{"native_drawPosText","(I[CII[FI)V",
(void*) SkCanvasGlue::drawPosText___CII_FPaint},
{"native_drawPosText","(ILjava/lang/String;[FI)V",
--- /dev/null
+/*
+ * Copyright (C) 2013 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.
+ */
+
+#include <SkTypeface.h>
+#include <SkPaint.h>
+#include <SkFP.h>
+
+#define LOG_TAG "Minikin"
+#include <cutils/log.h>
+
+#include <minikin/MinikinFont.h>
+#include "MinikinSkia.h"
+
+namespace android {
+
+MinikinFontSkia::MinikinFontSkia(SkTypeface *typeface) :
+ mTypeface(typeface) {
+}
+
+MinikinFontSkia::~MinikinFontSkia() {
+ SkSafeUnref(mTypeface);
+}
+
+bool MinikinFontSkia::GetGlyph(uint32_t codepoint, uint32_t *glyph) const {
+ SkPaint paint;
+ paint.setTypeface(mTypeface);
+ paint.setTextEncoding(SkPaint::kUTF32_TextEncoding);
+ uint16_t glyph16;
+ paint.textToGlyphs(&codepoint, sizeof(codepoint), &glyph16);
+ *glyph = glyph16;
+ return !!glyph;
+}
+
+float MinikinFontSkia::GetHorizontalAdvance(uint32_t glyph_id,
+ const MinikinPaint &paint) const {
+ SkPaint skpaint;
+ skpaint.setTypeface(mTypeface);
+ skpaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ // TODO: set more paint parameters from Minikin
+ skpaint.setTextSize(paint.size);
+ uint16_t glyph16 = glyph_id;
+ SkScalar skWidth;
+ SkRect skBounds;
+ skpaint.getTextWidths(&glyph16, sizeof(glyph16), &skWidth, &skBounds);
+ // TODO: get bounds information
+ return SkScalarToFP(skWidth);
+}
+
+bool MinikinFontSkia::GetTable(uint32_t tag, uint8_t *buf, size_t *size) {
+ if (buf == NULL) {
+ const size_t tableSize = mTypeface->getTableSize(tag);
+ *size = tableSize;
+ return tableSize != 0;
+ } else {
+ const size_t actualSize = mTypeface->getTableData(tag, 0, *size, buf);
+ *size = actualSize;
+ return actualSize != 0;
+ }
+}
+
+SkTypeface *MinikinFontSkia::GetSkTypeface() {
+ return mTypeface;
+}
+
+int32_t MinikinFontSkia::GetUniqueId() const {
+ return mTypeface->uniqueID();
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2013 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.
+ */
+
+namespace android {
+
+class MinikinFontSkia : public MinikinFont {
+public:
+ explicit MinikinFontSkia(SkTypeface *typeface);
+
+ ~MinikinFontSkia();
+
+ bool GetGlyph(uint32_t codepoint, uint32_t *glyph) const;
+
+ float GetHorizontalAdvance(uint32_t glyph_id,
+ const MinikinPaint &paint) const;
+
+ // If buf is NULL, just update size
+ bool GetTable(uint32_t tag, uint8_t *buf, size_t *size);
+
+ int32_t GetUniqueId() const;
+
+ SkTypeface *GetSkTypeface();
+
+private:
+ SkTypeface *mTypeface;
+
+};
+
+} // namespace android
\ No newline at end of file
}
static SkTypeface* setTypeface(JNIEnv* env, jobject clazz, SkPaint* obj, SkTypeface* typeface) {
+#ifndef USE_MINIKIN
return obj->setTypeface(typeface);
+#else
+ // TODO(raph): not yet implemented
+ return NULL;
+#endif
}
static SkRasterizer* setRasterizer(JNIEnv* env, jobject clazz, SkPaint* obj, SkRasterizer* rasterizer) {
#include "pathops/SkPathOps.h"
#include <Caches.h>
+#include <vector>
+#include <map>
namespace android {
static jboolean op(JNIEnv* env, jobject clazz, SkPath* p1, SkPath* p2, SkPathOp op, SkPath* r) {
return Op(*p1, *p2, op, r);
}
+
+
+ typedef SkPoint (*bezierCalculation)(float t, const SkPoint* points);
+
+ static void addMove(std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths,
+ const SkPoint& point) {
+ float length = 0;
+ if (!lengths.empty()) {
+ length = lengths.back();
+ }
+ segmentPoints.push_back(point);
+ lengths.push_back(length);
+ }
+
+ static void addLine(std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths,
+ const SkPoint& toPoint) {
+ if (segmentPoints.empty()) {
+ segmentPoints.push_back(SkPoint::Make(0, 0));
+ lengths.push_back(0);
+ } else if (segmentPoints.back() == toPoint) {
+ return; // Empty line
+ }
+ float length = lengths.back() + SkPoint::Distance(segmentPoints.back(), toPoint);
+ segmentPoints.push_back(toPoint);
+ lengths.push_back(length);
+ }
+
+ static float cubicCoordinateCalculation(float t, float p0, float p1, float p2, float p3) {
+ float oneMinusT = 1 - t;
+ float oneMinusTSquared = oneMinusT * oneMinusT;
+ float oneMinusTCubed = oneMinusTSquared * oneMinusT;
+ float tSquared = t * t;
+ float tCubed = tSquared * t;
+ return (oneMinusTCubed * p0) + (3 * oneMinusTSquared * t * p1)
+ + (3 * oneMinusT * tSquared * p2) + (tCubed * p3);
+ }
+
+ static SkPoint cubicBezierCalculation(float t, const SkPoint* points) {
+ float x = cubicCoordinateCalculation(t, points[0].x(), points[1].x(),
+ points[2].x(), points[3].x());
+ float y = cubicCoordinateCalculation(t, points[0].y(), points[1].y(),
+ points[2].y(), points[3].y());
+ return SkPoint::Make(x, y);
+ }
+
+ static float quadraticCoordinateCalculation(float t, float p0, float p1, float p2) {
+ float oneMinusT = 1 - t;
+ return oneMinusT * ((oneMinusT * p0) + (t * p1)) + t * ((oneMinusT * p1) + (t * p2));
+ }
+
+ static SkPoint quadraticBezierCalculation(float t, const SkPoint* points) {
+ float x = quadraticCoordinateCalculation(t, points[0].x(), points[1].x(), points[2].x());
+ float y = quadraticCoordinateCalculation(t, points[0].y(), points[1].y(), points[2].y());
+ return SkPoint::Make(x, y);
+ }
+
+ // Subdivide a section of the Bezier curve, set the mid-point and the mid-t value.
+ // Returns true if further subdivision is necessary as defined by errorSquared.
+ static bool subdividePoints(const SkPoint* points, bezierCalculation bezierFunction,
+ float t0, const SkPoint &p0, float t1, const SkPoint &p1,
+ float& midT, SkPoint &midPoint, float errorSquared) {
+ midT = (t1 + t0) / 2;
+ float midX = (p1.x() + p0.x()) / 2;
+ float midY = (p1.y() + p0.y()) / 2;
+
+ midPoint = (*bezierFunction)(midT, points);
+ float xError = midPoint.x() - midX;
+ float yError = midPoint.y() - midY;
+ float midErrorSquared = (xError * xError) + (yError * yError);
+ return midErrorSquared > errorSquared;
+ }
+
+ // Divides Bezier curves until linear interpolation is very close to accurate, using
+ // errorSquared as a metric. Cubic Bezier curves can have an inflection point that improperly
+ // short-circuit subdivision. If you imagine an S shape, the top and bottom points being the
+ // starting and end points, linear interpolation would mark the center where the curve places
+ // the point. It is clearly not the case that we can linearly interpolate at that point.
+ // doubleCheckDivision forces a second examination between subdivisions to ensure that linear
+ // interpolation works.
+ static void addBezier(const SkPoint* points,
+ bezierCalculation bezierFunction, std::vector<SkPoint>& segmentPoints,
+ std::vector<float>& lengths, float errorSquared, bool doubleCheckDivision) {
+ typedef std::map<float, SkPoint> PointMap;
+ PointMap tToPoint;
+
+ tToPoint[0] = (*bezierFunction)(0, points);
+ tToPoint[1] = (*bezierFunction)(1, points);
+
+ PointMap::iterator iter = tToPoint.begin();
+ PointMap::iterator next = iter;
+ ++next;
+ while (next != tToPoint.end()) {
+ bool needsSubdivision = true;
+ SkPoint midPoint;
+ do {
+ float midT;
+ needsSubdivision = subdividePoints(points, bezierFunction, iter->first,
+ iter->second, next->first, next->second, midT, midPoint, errorSquared);
+ if (!needsSubdivision && doubleCheckDivision) {
+ SkPoint quarterPoint;
+ float quarterT;
+ needsSubdivision = subdividePoints(points, bezierFunction, iter->first,
+ iter->second, midT, midPoint, quarterT, quarterPoint, errorSquared);
+ if (needsSubdivision) {
+ // Found an inflection point. No need to double-check.
+ doubleCheckDivision = false;
+ }
+ }
+ if (needsSubdivision) {
+ next = tToPoint.insert(iter, PointMap::value_type(midT, midPoint));
+ }
+ } while (needsSubdivision);
+ iter = next;
+ next++;
+ }
+
+ // Now that each division can use linear interpolation with less than the allowed error
+ for (iter = tToPoint.begin(); iter != tToPoint.end(); ++iter) {
+ addLine(segmentPoints, lengths, iter->second);
+ }
+ }
+
+ static void createVerbSegments(SkPath::Verb verb, const SkPoint* points,
+ std::vector<SkPoint>& segmentPoints, std::vector<float>& lengths, float errorSquared) {
+ switch (verb) {
+ case SkPath::kMove_Verb:
+ addMove(segmentPoints, lengths, points[0]);
+ break;
+ case SkPath::kClose_Verb:
+ case SkPath::kLine_Verb:
+ addLine(segmentPoints, lengths, points[1]);
+ break;
+ case SkPath::kQuad_Verb:
+ addBezier(points, quadraticBezierCalculation, segmentPoints, lengths,
+ errorSquared, false);
+ break;
+ case SkPath::kCubic_Verb:
+ addBezier(points, cubicBezierCalculation, segmentPoints, lengths,
+ errorSquared, true);
+ break;
+ default:
+ // Leave element as NULL, Conic sections are not supported.
+ break;
+ }
+ }
+
+ // Returns a float[] with each point along the path represented by 3 floats
+ // * fractional length along the path that the point resides
+ // * x coordinate
+ // * y coordinate
+ // Note that more than one point may have the same length along the path in
+ // the case of a move.
+ // NULL can be returned if the Path is empty.
+ static jfloatArray approximate(JNIEnv* env, jclass, SkPath* path, float acceptableError)
+ {
+ SkASSERT(path);
+ SkPath::Iter pathIter(*path, false);
+ SkPath::Verb verb;
+ SkPoint points[4];
+ std::vector<SkPoint> segmentPoints;
+ std::vector<float> lengths;
+ float errorSquared = acceptableError * acceptableError;
+
+ while ((verb = pathIter.next(points)) != SkPath::kDone_Verb) {
+ createVerbSegments(verb, points, segmentPoints, lengths, errorSquared);
+ }
+
+ if (segmentPoints.empty()) {
+ return NULL;
+ }
+
+ size_t numPoints = segmentPoints.size();
+ size_t approximationArraySize = numPoints * 3;
+
+ float* approximation = new float[approximationArraySize];
+ float totalLength = lengths.back();
+
+ int approximationIndex = 0;
+ for (int i = 0; i < numPoints; i++) {
+ const SkPoint& point = segmentPoints[i];
+ approximation[approximationIndex++] = lengths[i] / totalLength;
+ approximation[approximationIndex++] = point.x();
+ approximation[approximationIndex++] = point.y();
+ }
+
+ jfloatArray result = env->NewFloatArray(approximationArraySize);
+ env->SetFloatArrayRegion(result, 0, approximationArraySize, approximation);
+ delete[] approximation;
+ return result;
+ }
};
static JNINativeMethod methods[] = {
{"native_setLastPoint","(IFF)V", (void*) SkPathGlue::setLastPoint},
{"native_transform","(III)V", (void*) SkPathGlue::transform__MatrixPath},
{"native_transform","(II)V", (void*) SkPathGlue::transform__Matrix},
- {"native_op","(IIII)Z", (void*) SkPathGlue::op}
+ {"native_op","(IIII)Z", (void*) SkPathGlue::op},
+ {"native_approximate", "(IF)[F", (void*) SkPathGlue::approximate},
};
int register_android_graphics_Path(JNIEnv* env) {
+/*
+ * Copyright (C) 2013 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.
+ */
+
#include "jni.h"
#include <android_runtime/AndroidRuntime.h>
#include "GraphicsJNI.h"
#include "SkStream.h"
#include "SkTypeface.h"
+#include "TypefaceImpl.h"
#include <android_runtime/android_util_AssetManager.h>
#include <androidfw/AssetManager.h>
const char* fCStr;
};
-static SkTypeface* Typeface_create(JNIEnv* env, jobject, jstring name,
+static TypefaceImpl* Typeface_create(JNIEnv* env, jobject, jstring name,
SkTypeface::Style style) {
- SkTypeface* face = NULL;
+ TypefaceImpl* face = NULL;
if (NULL != name) {
AutoJavaStringToUTF8 str(env, name);
- face = SkTypeface::CreateFromName(str.c_str(), style);
- // Try to find the closest matching font, using the standard heuristic
- if (NULL == face) {
- face = SkTypeface::CreateFromName(str.c_str(), (SkTypeface::Style)(style ^ SkTypeface::kItalic));
- }
- for (int i = 0; NULL == face && i < 4; i++) {
- face = SkTypeface::CreateFromName(str.c_str(), (SkTypeface::Style)i);
- }
+ face = TypefaceImpl_createFromName(str.c_str(), style);
}
// return the default font at the best style if no exact match exists
if (NULL == face) {
- face = SkTypeface::CreateFromName(NULL, style);
+ face = TypefaceImpl_createFromName(NULL, style);
}
return face;
}
-static SkTypeface* Typeface_createFromTypeface(JNIEnv* env, jobject, SkTypeface* family, int style) {
- SkTypeface* face = SkTypeface::CreateFromTypeface(family, (SkTypeface::Style)style);
+static TypefaceImpl* Typeface_createFromTypeface(JNIEnv* env, jobject, TypefaceImpl* family, int style) {
+ TypefaceImpl* face = TypefaceImpl_createFromTypeface(family, (SkTypeface::Style)style);
// Try to find the closest matching font, using the standard heuristic
if (NULL == face) {
- face = SkTypeface::CreateFromTypeface(family, (SkTypeface::Style)(style ^ SkTypeface::kItalic));
+ face = TypefaceImpl_createFromTypeface(family, (SkTypeface::Style)(style ^ SkTypeface::kItalic));
}
for (int i = 0; NULL == face && i < 4; i++) {
- face = SkTypeface::CreateFromTypeface(family, (SkTypeface::Style)i);
+ face = TypefaceImpl_createFromTypeface(family, (SkTypeface::Style)i);
}
if (NULL == face) {
- face = SkTypeface::CreateFromName(NULL, (SkTypeface::Style)style);
+ face = TypefaceImpl_createFromName(NULL, (SkTypeface::Style)style);
}
return face;
}
-static void Typeface_unref(JNIEnv* env, jobject obj, SkTypeface* face) {
- SkSafeUnref(face);
+static void Typeface_unref(JNIEnv* env, jobject obj, TypefaceImpl* face) {
+ TypefaceImpl_unref(face);
}
-static int Typeface_getStyle(JNIEnv* env, jobject obj, SkTypeface* face) {
- return face->style();
+static int Typeface_getStyle(JNIEnv* env, jobject obj, TypefaceImpl* face) {
+ return TypefaceImpl_getStyle(face);
}
-class AssetStream : public SkStream {
-public:
- AssetStream(Asset* asset, bool hasMemoryBase) : fAsset(asset)
- {
- fMemoryBase = hasMemoryBase ? fAsset->getBuffer(false) : NULL;
- }
-
- virtual ~AssetStream()
- {
- delete fAsset;
- }
-
- virtual const void* getMemoryBase()
- {
- return fMemoryBase;
- }
-
- virtual bool rewind()
- {
- off64_t pos = fAsset->seek(0, SEEK_SET);
- return pos != (off64_t)-1;
- }
-
- virtual size_t read(void* buffer, size_t size)
- {
- ssize_t amount;
-
- if (NULL == buffer)
- {
- if (0 == size) // caller is asking us for our total length
- return fAsset->getLength();
-
- // asset->seek returns new total offset
- // we want to return amount that was skipped
-
- off64_t oldOffset = fAsset->seek(0, SEEK_CUR);
- if (-1 == oldOffset)
- return 0;
- off64_t newOffset = fAsset->seek(size, SEEK_CUR);
- if (-1 == newOffset)
- return 0;
-
- amount = newOffset - oldOffset;
- }
- else
- {
- amount = fAsset->read(buffer, size);
- }
-
- if (amount < 0)
- amount = 0;
- return amount;
- }
-
-private:
- Asset* fAsset;
- const void* fMemoryBase;
-};
-
-static SkTypeface* Typeface_createFromAsset(JNIEnv* env, jobject,
+static TypefaceImpl* Typeface_createFromAsset(JNIEnv* env, jobject,
jobject jassetMgr,
jstring jpath) {
return NULL;
}
- SkStream* stream = new AssetStream(asset, true);
- SkTypeface* face = SkTypeface::CreateFromStream(stream);
- // SkTypeFace::CreateFromStream calls ref() on the stream, so we
- // need to unref it here or it won't be freed later on
- stream->unref();
-
- return face;
+ return TypefaceImpl_createFromAsset(asset);
}
-static SkTypeface* Typeface_createFromFile(JNIEnv* env, jobject, jstring jpath) {
+static TypefaceImpl* Typeface_createFromFile(JNIEnv* env, jobject, jstring jpath) {
NPE_CHECK_RETURN_ZERO(env, jpath);
AutoJavaStringToUTF8 str(env, jpath);
- return SkTypeface::CreateFromFile(str.c_str());
+ return TypefaceImpl_createFromFile(str.c_str());
}
///////////////////////////////////////////////////////////////////////////////
--- /dev/null
+/*
+ * Copyright (C) 2013 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.
+ */
+
+/**
+ * This is the implementation of the Typeface object. Historically, it has
+ * just been SkTypeface, but we are migrating to Minikin. For the time
+ * being, that choice is hidden under the USE_MINIKIN compile-time flag.
+ */
+
+#include "SkStream.h"
+#include "SkTypeface.h"
+
+#ifdef USE_MINIKIN
+#include <vector>
+#include <minikin/FontCollection.h>
+#include <minikin/FontFamily.h>
+#include <minikin/Layout.h>
+#include "MinikinSkia.h"
+#endif
+
+#include "TypefaceImpl.h"
+
+namespace android {
+
+class AssetStream : public SkStream {
+public:
+ AssetStream(Asset* asset, bool hasMemoryBase) : fAsset(asset)
+ {
+ fMemoryBase = hasMemoryBase ? fAsset->getBuffer(false) : NULL;
+ }
+
+ virtual ~AssetStream()
+ {
+ delete fAsset;
+ }
+
+ virtual const void* getMemoryBase()
+ {
+ return fMemoryBase;
+ }
+
+ virtual bool rewind()
+ {
+ off64_t pos = fAsset->seek(0, SEEK_SET);
+ return pos != (off64_t)-1;
+ }
+
+ virtual size_t read(void* buffer, size_t size)
+ {
+ ssize_t amount;
+
+ if (NULL == buffer)
+ {
+ if (0 == size) // caller is asking us for our total length
+ return fAsset->getLength();
+
+ // asset->seek returns new total offset
+ // we want to return amount that was skipped
+
+ off64_t oldOffset = fAsset->seek(0, SEEK_CUR);
+ if (-1 == oldOffset)
+ return 0;
+ off64_t newOffset = fAsset->seek(size, SEEK_CUR);
+ if (-1 == newOffset)
+ return 0;
+
+ amount = newOffset - oldOffset;
+ }
+ else
+ {
+ amount = fAsset->read(buffer, size);
+ }
+
+ if (amount < 0)
+ amount = 0;
+ return amount;
+ }
+
+private:
+ Asset* fAsset;
+ const void* fMemoryBase;
+};
+
+#ifdef USE_MINIKIN
+
+// Any weight greater than or equal to this is considered "bold" for
+// legacy API.
+static const int kBoldThreshold = 6;
+
+static FontStyle styleFromSkiaStyle(SkTypeface::Style skiaStyle) {
+ int weight = (skiaStyle & SkTypeface::kBold) != 0 ? 7 : 4;
+ bool italic = (skiaStyle & SkTypeface::kItalic) != 0;
+ return FontStyle(weight, italic);
+}
+
+TypefaceImpl* gDefaultTypeface;
+pthread_once_t gDefaultTypefaceOnce = PTHREAD_ONCE_INIT;
+
+// TODO: this currently builds a font collection from hardcoded paths.
+// It will get replaced by an implementation that parses the XML files.
+static FontCollection *makeFontCollection() {
+ std::vector<FontFamily *>typefaces;
+ const char *fns[] = {
+ "/system/fonts/Roboto-Regular.ttf",
+ "/system/fonts/Roboto-Italic.ttf",
+ "/system/fonts/Roboto-BoldItalic.ttf",
+ "/system/fonts/Roboto-Light.ttf",
+ "/system/fonts/Roboto-Thin.ttf",
+ "/system/fonts/Roboto-Bold.ttf",
+ "/system/fonts/Roboto-ThinItalic.ttf",
+ "/system/fonts/Roboto-LightItalic.ttf"
+ };
+
+ FontFamily *family = new FontFamily();
+ for (size_t i = 0; i < sizeof(fns)/sizeof(fns[0]); i++) {
+ const char *fn = fns[i];
+ SkTypeface *skFace = SkTypeface::CreateFromFile(fn);
+ MinikinFont *font = new MinikinFontSkia(skFace);
+ family->addFont(font);
+ }
+ typefaces.push_back(family);
+
+ family = new FontFamily();
+ const char *fn = "/system/fonts/NotoSansDevanagari-Regular.ttf";
+ SkTypeface *skFace = SkTypeface::CreateFromFile(fn);
+ MinikinFont *font = new MinikinFontSkia(skFace);
+ family->addFont(font);
+ typefaces.push_back(family);
+
+ return new FontCollection(typefaces);
+}
+
+static void getDefaultTypefaceOnce() {
+ Layout::init();
+ gDefaultTypeface = new TypefaceImpl;
+ gDefaultTypeface->fFontCollection = makeFontCollection();
+ gDefaultTypeface->fStyle = FontStyle();
+}
+
+TypefaceImpl* TypefaceImpl_resolveDefault(TypefaceImpl* src) {
+ if (src == NULL) {
+ pthread_once(&gDefaultTypefaceOnce, getDefaultTypefaceOnce);
+ return gDefaultTypeface;
+ } else {
+ return src;
+ }
+}
+
+TypefaceImpl* TypefaceImpl_createFromTypeface(TypefaceImpl* src, SkTypeface::Style style) {
+ TypefaceImpl* resolvedFace = TypefaceImpl_resolveDefault(src);
+ TypefaceImpl* result = new TypefaceImpl;
+ if (result != 0) {
+ result->fFontCollection = resolvedFace->fFontCollection;
+ result->fStyle = styleFromSkiaStyle(style);
+ }
+ return result;
+}
+
+static TypefaceImpl* createFromSkTypeface(SkTypeface* typeface) {
+ MinikinFont* minikinFont = new MinikinFontSkia(typeface);
+ std::vector<FontFamily *> typefaces;
+ FontFamily* family = new FontFamily();
+ family->addFont(minikinFont);
+ typefaces.push_back(family);
+ TypefaceImpl* result = new TypefaceImpl;
+ result->fFontCollection = new FontCollection(typefaces);
+ result->fStyle = FontStyle(); // TODO: improve
+ return result;
+}
+
+TypefaceImpl* TypefaceImpl_createFromName(const char* name, SkTypeface::Style style) {
+ // TODO: should create a font collection with all styles corresponding to
+ // the name
+ SkTypeface* face = SkTypeface::CreateFromName(name, style);
+ return createFromSkTypeface(face);
+}
+
+TypefaceImpl* TypefaceImpl_createFromFile(const char* filename) {
+ SkTypeface* face = SkTypeface::CreateFromFile(filename);
+ return createFromSkTypeface(face);
+}
+
+TypefaceImpl* TypefaceImpl_createFromAsset(Asset* asset) {
+ SkStream* stream = new AssetStream(asset, true);
+ SkTypeface* face = SkTypeface::CreateFromStream(stream);
+ // SkTypeFace::CreateFromStream calls ref() on the stream, so we
+ // need to unref it here or it won't be freed later on
+ stream->unref();
+ return createFromSkTypeface(face);
+}
+
+void TypefaceImpl_unref(TypefaceImpl* face) {
+ delete face;
+}
+
+int TypefaceImpl_getStyle(TypefaceImpl* face) {
+ FontStyle style = face->fStyle;
+ int result = style.getItalic() ? SkTypeface::kItalic : 0;
+ if (style.getWeight() >= kBoldThreshold) {
+ result |= SkTypeface::kBold;
+ }
+ return result;
+}
+
+#else // USE_MINIKIN
+
+/* Just use SkTypeface instead. */
+
+typedef SkTypeface TypefaceImpl;
+
+TypefaceImpl* TypefaceImpl_createFromTypeface(TypefaceImpl* src, SkTypeface::Style style) {
+ return SkTypeface::CreateFromTypeface(src, style);
+}
+
+TypefaceImpl* TypefaceImpl_createFromName(const char* name, SkTypeface::Style style) {
+ return SkTypeface::CreateFromName(name, style);
+}
+
+TypefaceImpl* TypefaceImpl_createFromFile(const char* filename) {
+ return SkTypeface::CreateFromFile(filename);
+}
+
+TypefaceImpl* TypefaceImpl_createFromAsset(Asset* asset) {
+ SkStream* stream = new AssetStream(asset, true);
+ SkTypeface* face = SkTypeface::CreateFromStream(stream);
+ // SkTypeFace::CreateFromStream calls ref() on the stream, so we
+ // need to unref it here or it won't be freed later on
+ stream->unref();
+
+ return face;
+}
+
+void TypefaceImpl_unref(TypefaceImpl* face) {
+ SkSafeUnref(face);
+}
+
+int TypefaceImpl_getStyle(TypefaceImpl* face) {
+ return face->style();
+}
+
+#endif // USE_MINIKIN
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2013 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.
+ */
+
+
+#ifndef ANDROID_TYPEFACE_IMPL_H
+#define ANDROID_TYPEFACE_IMPL_H
+
+#include <androidfw/AssetManager.h>
+
+#ifdef USE_MINIKIN
+#include <minikin/FontCollection.h>
+#endif
+
+namespace android {
+
+#ifdef USE_MINIKIN
+struct TypefaceImpl {
+ FontCollection *fFontCollection;
+ FontStyle fStyle;
+};
+
+// Note: it would be cleaner if the following functions were member
+// functions (static or otherwise) of the TypefaceImpl class. However,
+// that can't be easily accommodated in the case where TypefaceImpl
+// is just a pointer to SkTypeface, in the non-USE_MINIKIN case.
+// TODO: when #ifdef USE_MINIKIN is removed, move to member functions.
+
+TypefaceImpl* TypefaceImpl_resolveDefault(TypefaceImpl* src);
+#else
+typedef SkTypeface TypefaceImpl;
+#endif
+
+TypefaceImpl* TypefaceImpl_createFromTypeface(TypefaceImpl* src, SkTypeface::Style style);
+
+TypefaceImpl* TypefaceImpl_createFromName(const char* name, SkTypeface::Style style);
+
+TypefaceImpl* TypefaceImpl_createFromFile(const char* filename);
+
+TypefaceImpl* TypefaceImpl_createFromAsset(Asset* asset);
+
+void TypefaceImpl_unref(TypefaceImpl* face);
+
+int TypefaceImpl_getStyle(TypefaceImpl* face);
+
+}
+
+#endif // ANDROID_TYPEFACE_IMPL_H
\ No newline at end of file
SkColorTable* ctable = bitmap.getColorTable();
memcpy(data, ctable->lockColors(), ctable->count() * sizeof(SkPMColor));
memcpy(pixels, p, size);
- ctable->unlockColors(false);
+ ctable->unlockColors();
glCompressedTexImage2D(target, level, internalformat, w, h, border, imageSize, data);
free(data);
} else {
static bool android_view_GLES20Canvas_quickReject(JNIEnv* env, jobject clazz,
OpenGLRenderer* renderer, jfloat left, jfloat top, jfloat right, jfloat bottom) {
- return renderer->quickRejectNoScissor(left, top, right, bottom);
+ return renderer->quickRejectConservative(left, top, right, bottom);
}
static bool android_view_GLES20Canvas_clipRectF(JNIEnv* env, jobject clazz,
<string name="wireless_display_route_description" msgid="9070346425023979651">"Draadlose skerm"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Media-uitvoer"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Koppel aan toestel"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Saai skerm uit na toestel"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Soek tans vir toestelle…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Instellings"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Ontkoppel"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Oorlegger #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", veilig"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Skerm word tans uitgesaai"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Koppel tans aan <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Skerm word tans uitgesaai"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Gekoppel aan <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Ontkoppel"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Noodoproep"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Het jy die patroon vergeet?"</string>
<string name="permdesc_sendSms" msgid="7094729298204937667">"መተግበሪያው የኤስ.ኤም.ኤስ. መልዕክቶችን እንዲልክ ይፈቅድለታል። ይህ ያልተጠበቁ ወጪዎችን ሊያስከትል ይችላል። ተንኮል አዘል መተግበሪያዎች ያላንተ ማረጋገጫ መልዕክቶችን በመላክ ገንዘብ ሊያስወጡህ ይችላሉ።"</string>
<string name="permlab_sendRespondViaMessageRequest" msgid="8713889105305943200">"የበመልዕክት-በኩል-ምላሽ-ስጥ ክስተቶችን ይላኩ"</string>
<string name="permdesc_sendRespondViaMessageRequest" msgid="7107648548468778734">"መተግበሪያው ሌሎች የመልዕክት መላኪያ መተግበሪያዎች ለመጪ ጥሪዎች በመልዕክት-በኩል-ምላሽ-መስጠት ስራን እንዲይዙ ጥያቄዎች እንዲልክላቸው ያስችለዋል።"</string>
- <string name="permlab_readSms" msgid="8745086572213270480">"á\8b¨á\8c½á\88\91á\8d\8d á\88\98á\88\8dá\8b\95á\8aá\89¶á\89½á\88\85á\8a\95 á\8a á\8a\95á\89¥á\89¥ (ኤስ.ኤም.ኤስ. ወይም ኤም.ኤም.ኤስ.)"</string>
+ <string name="permlab_readSms" msgid="8745086572213270480">"á\8b¨á\8c½á\88\91á\8d\8d á\88\98á\88\8dá\8b\95á\8aá\89¶á\89½á\8b\8eá\8a\95 á\8b«á\8a\95á\89¥á\89¡ (ኤስ.ኤም.ኤስ. ወይም ኤም.ኤም.ኤስ.)"</string>
<string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"መገለጫው በጡባዊ ቱኮህ ወይም በSIM ካርድህ የተከማቹ የኤስ.ኤም.ኤስ. መልእክቶችን እንዲያነብ ይፈቅድለታል። ይህ መተግበሪያው ይዘት ወይም ሚስጥራዊነትን ከግምት ሳያስገባ ሁሉንም የኤስ.ኤም.ኤስ. መልእክቶች እንዲያነብ ይፈቅድለታል።"</string>
<string name="permdesc_readSms" product="default" msgid="3695967533457240550">"መገለጫው በስልክህ ወይም በSIM ካርድህ የተከማቹ የኤስ.ኤም.ኤስ. መልእክቶችን እንዲያነብ ይፈቅድለታል። ይህ መተግበሪያው ይዘት ወይም ሚስጥራዊነትን ከግምት ሳያስገባ ሁሉንም የኤስ.ኤም.ኤስ. መልእክቶች እንዲያነብ ይፈቅድለታል።"</string>
<string name="permlab_writeSms" msgid="3216950472636214774">"የጽሑፍ መልዕክቶችህን አርትዕ (ኤስ.ኤም.ኤስ. ወይም ኤም.ኤም.ኤስ.)"</string>
<string name="permlab_broadcastSticky" msgid="7919126372606881614">"ልጥፍ ዝርዝር ላክ"</string>
<string name="permdesc_broadcastSticky" product="tablet" msgid="7749760494399915651">"መተግበሪያው ስርጭቱ ከተጠናቀቀ በኋላ የሚቀሩ አጣባቂ ስርጭቶችን እንዲልክ ይፈቅድለታል። ከልክ በላይ መጠቀም ጡባዊ ተኮው ብዙ ማህደረ ትውስታን እንዲጠቀም በማድረግ ቀርፋፋ ወይም ያልተረጋጋ ሊያደርገው ይችላል።"</string>
<string name="permdesc_broadcastSticky" product="default" msgid="2825803764232445091">"መተግበሪያው ስርጭቱ ከተጠናቀቀ በኋላ የሚቀሩ አጣባቂ ስርጭቶችን እንዲልክ ይፈቅድለታል። ከልክ በላይ መጠቀም ስልኩ ብዙ ማህደረ ትውስታን እንዲጠቀም በማድረግ ቀርፋፋ ወይም ያልተረጋጋ ሊያደርገው ይችላል።"</string>
- <string name="permlab_readContacts" msgid="8348481131899886131">"á\8a¥á\8b\8dá\89\82á\8b«á\8b\8eá\89½á\88\85á\8a\95 á\8a á\8a\95á\89¥á\89¥"</string>
+ <string name="permlab_readContacts" msgid="8348481131899886131">"á\8a¥á\8b\8dá\89\82á\8b«á\8b\8eá\89½á\8b\8eá\8a\95 á\8b«á\8a\95á\89¥á\89¡"</string>
<string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"መተግበሪያው በጡባዊ ተኮህ ስለተከማቹ ዕውቂያዎች ያሉትን ውሂቦች በሙሉ፤ ጥሪ ያደረግክበትን፣ ኢሜይል የላክበትን ወይም ከተወሰኑ ግለሰቦች ጋር በሌላ መንገድ የተገናኘህበትን ድግምግሞሽ ጨምሮ፣ እንዲያነብ ይፈቅድለታል። ይህ ፈቃድ መተግበሪያዎች የእውቂያ ውሂብህን እንዲያስቀምጡ የሚፈቅድላቸው ሲሆን ተንኮል አዘል መተግበሪያዎች የእውቂያህን ውሂብ ሳታውቀው ሊያጋሩት ይችላሉ።"</string>
<string name="permdesc_readContacts" product="default" msgid="8440654152457300662">"መተግበሪያው በስልክህ ስለተከማቹ ዕውቂያዎች ያሉትን ውሂቦች በሙሉ፤ ጥሪ ያደረግክበትን፣ ኢሜይል የላክበትን ወይም ከተወሰኑ ግለሰቦች ጋር በሌላ መንገድ የተገናኘህበትን ድግምግሞሽ ጨምሮ፣ እንዲያነብ ይፈቅድለታል። ይህ ፈቃድ መተግበሪያዎች የእውቂያ ውሂብህን እንዲያስቀምጡ የሚፈቅድላቸው ሲሆን ተንኮል አዘል መተግበሪያዎች የእውቂያህን ውሂብ ሳታውቀው ሊያጋሩት ይችላሉ።"</string>
<string name="permlab_writeContacts" msgid="5107492086416793544">"ዕውቂያዎችዎን ያስተካክሉ"</string>
<string name="permdesc_mediaContentControl" msgid="1637478200272062">"መተግበሪያው የሚዲያ መልሰህ አጫውትን እንዲቆጣጠር እና የሚዲያ መረጃውን (ርእስ፣ ደራሲ...) እንዲደርስ ይፈቅድለታል።"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"የድምፅ ቅንብሮችን ለውጥ"</string>
<string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"መተግበሪያው አንደ የድምጽ መጠን እና ለውጽአት የትኛውን የድምጽ ማጉያ ጥቅም ላይ እንደዋለ የመሳሰሉ ሁለንተናዊ የድምጽ ቅንብሮችን እንዲያስተካክል ይፈቅድለታል።"</string>
- <string name="permlab_recordAudio" msgid="3876049771427466323">"á\8a¦á\8b²á\8b® á\89\85á\8b³"</string>
+ <string name="permlab_recordAudio" msgid="3876049771427466323">"á\8a¦á\8b²á\8b® á\8bá\89\85á\8b±"</string>
<string name="permdesc_recordAudio" msgid="4906839301087980680">"መተግበሪያው ድምጽን በማይክሮፎን እንዲቀዳ ይፈቅድለታል። ይህ ፈቃድ መተግበሪያው ያላንተ ማረጋገጫ በማንኛውም ጊዜ ድምጽ እንዲቀዳ ይፈቅድለታል።"</string>
- <string name="permlab_camera" msgid="3616391919559751192">"á\8d\8eá\89¶á\8b\8eá\89½ á\8a¥á\8a\93 á\89ªá\8b²á\8b®á\8b\8eá\89½ á\8a á\8a\95á\88³"</string>
+ <string name="permlab_camera" msgid="3616391919559751192">"á\8d\8eá\89¶á\8b\8eá\89½ á\8a¥á\8a\93 á\89ªá\8b²á\8b®á\8b\8eá\89½ á\8b«á\8a\95á\88±"</string>
<string name="permdesc_camera" msgid="8497216524735535009">"መተግበሪያው በካሜራው ፎቶዎችንና ቪዲዮዎችን እንዲያነሳ ይፈቅድለታል። ይህ ፈቃድ መተግበሪያው ካሜራውን በማንኛውም ጊዜ ያላንተ ማረጋገጫ እንዲጠቀም ይፈቅድለታል።"</string>
<string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"ካሜራው ስራ ላይ ሲሆን የማስተላለፍ አመልካች ኤል ኢ ዲን ያሰናክሉ"</string>
<string name="permdesc_cameraDisableTransmitLed" msgid="4764585465480295341">"ቀድሞ የተጫነ የስርዓት መተግበሪያ ካሜራውን አመላካች ኤል ኢ ዲ እንዳይጠቀም እንዲያሰናክል ያስችለዋል።"</string>
<string name="permdesc_setTimeZone" product="default" msgid="4499943488436633398">" የስልኩን ሰዓት መለወጥ ለመተግበሪያው ይፈቅዳሉ።"</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"እንደ አውርድአዸራጅአገልግሎት"</string>
<string name="permdesc_accountManagerService" msgid="1948455552333615954">" ወደ መለያ አረጋጋጮች ጥሪ ለማድረግ ለመተግበሪያ ይፈቅዳሉ።"</string>
- <string name="permlab_getAccounts" msgid="1086795467760122114">"á\88\98á\88£á\88ªá\8b«á\8b\8d á\88\8bá\8b á\8b«á\88\89 á\88\98á\88\88á\8b«á\8b\8eá\89½á\8a\95 á\8a á\8c\8dá\8a\9d"</string>
+ <string name="permlab_getAccounts" msgid="1086795467760122114">"á\88\98á\88£á\88ªá\8b«á\8b\8d á\88\8bá\8b á\8b«á\88\89 á\88\98á\88\88á\8b«á\8b\8eá\89½á\8a\95 á\8b«á\8c\8dá\8a\99"</string>
<string name="permdesc_getAccounts" product="tablet" msgid="2741496534769660027">"መተግበሪያው በጡባዊ ተኮው የሚታወቁትን መለያዎች ዝርዝር እንዲያገኝ ይፈቅድለታል። ይህ በጫንዋቸው ማናቸውም መተግበሪያዎች የተፈጠሩ መለያዎችን ሊያጠቃልል ይችላል።"</string>
<string name="permdesc_getAccounts" product="default" msgid="3448316822451807382">"መተግበሪያው በስልኩ የሚታወቁትን መለያዎች ዝርዝር እንዲያገኝ ይፈቅድለታል። ይህ በጫንዋቸው ማናቸውም መተግበሪያዎች የተፈጠሩ መለያዎችን ሊያጠቃልል ይችላል።"</string>
<string name="permlab_authenticateAccounts" msgid="5265908481172736933">"መለያዎችን ፍጠርና የይለፍ ቃላትን አስቀምጥ"</string>
<string name="permdesc_authenticateAccounts" msgid="5472124296908977260">"የመለያ አረጋጋጭ መለያ መናጅ ችሎታን ለመጠቀም፣ መለያ መፍጠር እና የይለፍ ቃሎችን ለማግኘት እና ለማቀናጀት አክሎ ለመተግበሪያው ይፈቅዳሉ ።"</string>
- <string name="permlab_manageAccounts" msgid="4983126304757177305">"á\88\98á\88\88á\8b«á\8b\8eá\89½á\8a\95 á\8a á\8aá\88\8d á\8b\88á\8bá\88\9d á\8a á\88µá\8b\88á\8c\8dá\8bµ"</string>
+ <string name="permlab_manageAccounts" msgid="4983126304757177305">"á\88\98á\88\88á\8b«á\8b\8eá\89½á\8a\95 á\8b«á\8aá\88\89 á\8b\88á\8bá\88\9d á\8b«á\88µá\8b\88á\8c\8dá\8b±"</string>
<string name="permdesc_manageAccounts" msgid="8698295625488292506">"መለያዎችን እንደ ማከል እና ማስወገድ ክወናዎችን እና የይለፍ ቃልን መሰረዝ ለማከናወን ለመተግበሪያው ይፈቅዳሉ፡፡"</string>
<string name="permlab_useCredentials" msgid="235481396163877642">"በመሣሪያው ላይ ያሉ መለያዎችን ይጠቀሙ"</string>
<string name="permdesc_useCredentials" msgid="7984227147403346422">"የማረጋገጫ የምስጋና የምስክር ወረቀትን ለመጠየቅ ለመተግበሪያው ይፈቅዳሉ፡፡"</string>
<string name="permdesc_readDictionary" msgid="659614600338904243">"መተግበሪያው ተጠቃሚው በተጠቃሚው መዝገበ-ቃላት አከማችቷቸው ሊሆኑ የሚችሉ ሁሉንም ቃላት፣ ስሞችና ሐረጋት እንዲያነባቸው ይፈቅድለታል።"</string>
<string name="permlab_writeDictionary" msgid="2183110402314441106">"በተጠቃሚ በተገለጸ መዝገበ ቃላት ላይ ቃላትን ያክላል"</string>
<string name="permdesc_writeDictionary" msgid="8185385716255065291">"በተጠቃሚ መዝገበ ቃላት ውስጥ አዲስ ቃል እንዲጽፍ ለመተግበሪያው ይፈቅዳሉ፡፡"</string>
- <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"á\8b¨USB á\88\9bá\8a¨á\88\9bá\89»á\88\85á\8a\95 á\8bá\8b\98á\89¶á\89½ á\8a á\8a\95á\89¥á\89¥"</string>
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"á\8b¨USB á\88\9bá\8a¨á\88\9bá\89»á\8b\8eá\8a\95 á\8bá\8b\98á\89¶á\89½ á\8b«á\8a\95á\89¥á\89¡"</string>
<string name="permlab_sdcardRead" product="default" msgid="2188156462934977940">"የSD ካርድህን ይዘቶች አንብብ"</string>
<string name="permdesc_sdcardRead" product="nosdcard" msgid="3446988712598386079">"መተግበሪያው የእርስዎ USB ማከማቻ ይዘቶችን እንዲያነብ ያስችለዋል።"</string>
<string name="permdesc_sdcardRead" product="default" msgid="2607362473654975411">"መተግበሪያው የእርስዎ SD ካርድ ይዘቶችን እንዲያነብ ያስችለዋል።"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"ገመድ አልባ ማሳያ"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"የሚዲያ ውጽዓት"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"ከመሳሪያ ጋር ያገናኙ"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"ማያ ገጽን ወደ መሣሪያ ይውሰዱ"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"መሳሪያዎችን በመፈለግ ላይ…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"ቅንብሮች"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"ግንኙነት አቋርጥ"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"ተደራቢ #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>፦ <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>፣ <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"፣ የተጠበቀ"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"ማያ ገጽን በመውሰድ ላይ"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"ከ<xliff:g id="NAME">%1$s</xliff:g> ጋር በመገናኘት ላይ"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"ማያ ገጽን በመውሰድ ላይ"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"ከ<xliff:g id="NAME">%1$s</xliff:g> ጋር ተገናኝቷል"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"ግንኙነት አቋርጥ"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"የአደጋ ጊዜ ጥሪ"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ስርዓተ ጥለቱን እርሳ"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"عرض شاشة لاسلكي"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"المنفذ الإعلامي"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"الاتصال بجهاز"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"بث الشاشة على الجهاز"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"جارٍ البحث عن الأجهزة…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"الإعدادات"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"قطع الاتصال"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"المركب #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>، <xliff:g id="DPI">%4$d</xliff:g> نقطة لكل بوصة"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"آمن"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"جارٍ بث الشاشة"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"جارٍ الاتصال بـ <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"جارٍ بث الشاشة"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"متصل بـ <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"قطع الاتصال"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"الاتصال بالطوارئ"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"نسيت النقش"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Мультымедыйны выхад"</string>
<!-- no translation found for media_route_chooser_title (1751618554539087622) -->
<skip />
+ <!-- no translation found for media_route_chooser_title_for_remote_display (3395541745872017583) -->
+ <skip />
<!-- no translation found for media_route_chooser_searching (4776236202610828706) -->
<skip />
<!-- no translation found for media_route_chooser_extended_settings (87015534236701604) -->
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> кр. на цалю"</string>
<!-- no translation found for display_manager_overlay_display_secure_suffix (6022119702628572080) -->
<skip />
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
+ <!-- no translation found for wifi_display_notification_connecting_title (2838646471050359706) -->
<skip />
<!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
<skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
+ <!-- no translation found for wifi_display_notification_connected_title (8567308065912676285) -->
<skip />
<!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
<skip />
<string name="wireless_display_route_description" msgid="9070346425023979651">"Безжичен дисплей"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Изходяща мултимедия"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Свързване с устройство"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Екран за предаване към устройството"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Търсят се устройства…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Настройки"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Прекратяване на връзката"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Наслагване №<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"„<xliff:g id="NAME">%1$s</xliff:g>“: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", защитено"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Екранът се предава"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Установява се връзка с/ъс „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Екранът се предава"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Установена е връзка с/ъс „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Прекратяване на връзката"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Спешно обаждане"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забравена фигура"</string>
<string name="enable_explore_by_touch_warning_message" product="tablet" msgid="8655887539089910577">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vol activar l\'exploració tàctil. Quan l\'exploració tàctil està activada, pots escoltar o veure les descripcions del contingut seleccionat o utilitzar gestos per interactuar amb la tauleta."</string>
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vol activar l\'exploració tàctil. Quan l\'exploració per tàctil està activada, pots escoltar o veure les descripcions del contingut seleccionat o utilitzar gestos per interactuar amb el telèfon."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Fa 1 mes"</string>
- <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fa menys d\'1 mes"</string>
+ <string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fa més d\'1 mes"</string>
<plurals name="num_seconds_ago">
<item quantity="one" msgid="4869870056547896011">"Fa 1 segon"</item>
- <item quantity="other" msgid="3903706804349556379">"fa <xliff:g id="COUNT">%d</xliff:g> segons"</item>
+ <item quantity="other" msgid="3903706804349556379">"Fa <xliff:g id="COUNT">%d</xliff:g> segons"</item>
</plurals>
<plurals name="num_minutes_ago">
<item quantity="one" msgid="3306787433088810191">"Fa 1 minut"</item>
<string name="last_month" msgid="3959346739979055432">"El mes passat"</string>
<string name="older" msgid="5211975022815554840">"Més antigues"</string>
<plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ahir"</item>
+ <item quantity="one" msgid="861358534398115820">"Ahir"</item>
<item quantity="other" msgid="2479586466153314633">"Fa <xliff:g id="COUNT">%d</xliff:g> dies"</item>
</plurals>
<plurals name="in_num_seconds">
<string name="wireless_display_route_description" msgid="9070346425023979651">"Pantalla sense fil"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Sortida de contingut multimèdia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connexió al dispositiu"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Emissió de pantalla al dispositiu"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"S\'estan cercant dispositius…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Configuració"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Desconnecta"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposa #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", segur"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Emissió de pantalla"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"S\'està connectant a <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Emissió de pantalla"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Connectat a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Desconnecta"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Trucada d\'emergència"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Patró oblidat"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Bezdrátový displej"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Výstup médií"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Připojení k zařízení"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Odesílání obsahu obrazovky do zařízení"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Vyhledávání zařízení…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Nastavení"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Odpojit"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Překryvná vrstva č. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", zabezpečené"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Odesílání obsahu obrazovky"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Připojování k obrazovce <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Odesílání obsahu obrazovky"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Připojeno k obrazovce <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Odpojit"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Tísňové volání"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zapomenuté gesto"</string>
<string name="capital_on" msgid="1544682755514494298">"TIL"</string>
<string name="capital_off" msgid="6815870386972805832">"FRA"</string>
<string name="whichApplication" msgid="4533185947064773386">"Brug"</string>
- <string name="whichHomeApplication" msgid="4616420172727326782">"Vælg en startsideapp"</string>
+ <string name="whichHomeApplication" msgid="4616420172727326782">"Vælg en startapp"</string>
<string name="alwaysUse" msgid="4583018368000610438">"Brug som standard til denne handling."</string>
<string name="clearDefaultHintMsg" msgid="3252584689512077257">"Ryd standard i Systemindstillinger > Apps > Downloadet."</string>
<string name="chooseActivity" msgid="7486876147751803333">"Vælg en handling"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Trådløs skærm"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medieudgang"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Opret forbindelse til enheden"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Send skærm til enhed"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Søger efter enheder…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Indstillinger"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Afbryd forbindelsen"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlejring nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sikker"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Skærm sendes"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Der oprettes forbindelse til <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Skærm sendes"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Forbundet til <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Afbryd forbindelsen"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Nødopkald"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Glemt mønster"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Kabellose Übertragung (WiDi)"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medienausgabe"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Mit Gerät verbinden"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Bildschirm auf Gerät übertragen"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Geräte werden gesucht…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Einstellungen"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Verbindung trennen"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay-Nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sicher"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Bildschirm wird übertragen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Verbindung mit <xliff:g id="NAME">%1$s</xliff:g> wird hergestellt."</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Bildschirm wird übertragen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Verbunden mit <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Verbindung trennen"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Notruf"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Muster vergessen"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Ασύρματη οθόνη"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Έξοδος μέσων"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Σύνδεση με τη συσκευή"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Μετάδοση οθόνης σε συσκευή"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Αναζήτηση συσκευών…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Ρυθμίσεις"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Αποσύνδεση"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Επικάλυψη #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", ασφαλές"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Μετάδοση οθόνης"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Γίενται σύνδεση με το <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Μετάδοση οθόνης"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Συνδέθηκε με το <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Αποσύνδεση"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Κλήσεις επείγουσας ανάγκης"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Ξεχάσατε το μοτίβο"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Wireless display"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Media output"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connect to device"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Cast screen to device"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Searching for devices…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Settings"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Disconnect"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", secure"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Casting screen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Connecting to <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Casting screen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Connected to <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Disconnect"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Emergency call"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Forgot Pattern"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Wireless display"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Media output"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connect to device"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Cast screen to device"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Searching for devices…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Settings"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Disconnect"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", secure"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Casting screen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Connecting to <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Casting screen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Connected to <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Disconnect"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Emergency call"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Forgot Pattern"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Pantalla inalámbrica"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Salida multimedia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Conectar al dispositivo"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Transmitir pantalla a dispositivo"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Buscando dispositivos…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Configuración"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Desconectar"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposición #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> ppp"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", segura"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Transmitiendo pantalla"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Estableciendo conexión con <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Transmitiendo pantalla"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Se estableció conexión con <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Desconectar"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Realizar llamada de emergencia"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"¿Olvidaste el patrón?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Pantalla inalámbrica"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Salida multimedia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Conectar a dispositivo"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Enviar pantalla a dispositivo"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Buscando dispositivos…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Ajustes"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Desconectar"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposición #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", seguro"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Enviando pantalla"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Conectando a <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Enviando pantalla"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Conectado a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Desconectar"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Llamada de emergencia"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"¿Has olvidado el patrón?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Juhtmeta ekraan"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Meediaväljund"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Seadmega ühendamine"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Ekraanikuva ülekandmine seadmesse"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Seadmete otsimine …"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Seaded"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Katkesta ühendus"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Ülekate nr .<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", turvaline"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Ekraanikuva ülekandmine"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Ühendamine ekraaniga <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Ekraanikuva ülekandmine"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Ühendatud ekraaniga <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Katkesta ühendus"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Hädaabikõne"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Unustasin mustri"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"صفحه نمایش بیسیم"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"خروجی رسانه"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"برقراری ارتباط با دستگاه"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"فرستادن صفحه نمایش به دستگاه"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"در حال جستجو برای دستگاهها..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"تنظیمات"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"قطع ارتباط"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"همپوشانی #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"، امن"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"درحال فرستادن صفحه نمایش"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"درحال اتصال به <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"درحال فرستادن صفحه نمایش"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"به <xliff:g id="NAME">%1$s</xliff:g> متصل شد"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"قطع اتصال"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"تماس اضطراری"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"الگو را فراموش کردهاید"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Langaton näyttö"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Median äänentoisto"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Yhdistä laitteeseen"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Lähetä näyttö laitteeseen"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Etsitään laitteita…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Asetukset"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Katkaise yhteys"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Peittokuva # <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", suojattu"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Lähetetään näyttöä"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Yhdistetään näyttöön <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Lähetetään näyttöä"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Yhdistetty näyttöön <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Katkaise yhteys"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Hätäpuhelu"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Unohtunut kuvio"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Affichage sans fil"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Sortie multimédia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connexion à l\'appareil"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Diffuser l\'écran sur l\'appareil"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Recherche d\'appareils en cours…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Paramètres"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Déconnecter"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposition n° <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g> : <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> ppp"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sécurisé"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Connexion à l\'écran en cours"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Connexion au réseau <xliff:g id="NAME">%1$s</xliff:g> en cours…"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Diffusion de l\'écran en cours"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Connecté à <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Déconnecter"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Appel d\'urgence"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"J\'ai oublié le schéma"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Affichage sans fil"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Sortie multimédia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connexion à l\'appareil"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Diffuser l\'écran sur l\'appareil"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Recherche d\'appareils en cours…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Paramètres"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Déconnecter"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposition n° <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g> : <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sécurisé"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Diffusion de l\'écran en cours"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Connexion à <xliff:g id="NAME">%1$s</xliff:g> en cours…"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Diffusion de l\'écran en cours"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Connecté à <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Déconnecter"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Appel d\'urgence"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"J\'ai oublié le schéma"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"वायरलेस प्रदर्शन"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"मीडिया आउटपुट"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"उपकरण से कनेक्ट करें"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"स्क्रीन को उपकरण में कास्ट करें"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"उपकरण खोजे जा रहे हैं…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"सेटिंग"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"डिस्कनेक्ट करें"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"ओवरले #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", सुरक्षित"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"स्क्रीन कास्ट हो रही है"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g> से कनेक्ट हो रहा है"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"स्क्रीन कास्ट हो रही है"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g> से कनेक्ट है"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"डिस्कनेक्ट करें"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"आपातकालीन कॉल"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"आकार भूल गए"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Bežični prikaz"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medijski izlaz"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Povezivanje s uređajem"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Emitiranje zaslona na uređaj"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Traženje uređaja…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Postavke"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Prekini vezu"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Preklapanje br. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sigurno"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Emitiranje zaslona"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Povezivanje sa zaslonom <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Emitiranje zaslona"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Povezan sa zaslonom <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Isključi"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Hitan poziv"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Zaboravili ste obrazac"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Vezeték nélküli kijelző"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Médiakimenet"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Csatlakozás adott eszközhöz"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Képernyő átküldése az eszközre"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Eszközkeresés…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Beállítások"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Leválasztás"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"<xliff:g id="ID">%1$d</xliff:g>. fedvény"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> képpont"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", biztonságos"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Képernyő átküldése…"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Csatlakozás a következőhöz: <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Képernyő átküldése…"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Csatlakozva a következőhöz: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Szétkapcsol"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Segélyhívás"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Elfelejtett minta"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Անլար էկրան"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Մեդիա արտածում"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Միանալ սարքին"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Հեռարձակել էկրանը սարքի վրա"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Որոնվում են սարքեր..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Կարգավորումներ"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Անջատել"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Վերածածկ #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>. <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> կմվ"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", անվտանգ"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Էկրանի հեռարձակում"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Միանում է <xliff:g id="NAME">%1$s</xliff:g>-ին"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Էկրանը հեռարձակվում է"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Միացված է <xliff:g id="NAME">%1$s</xliff:g>-ին"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Անջատել"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Արտակարգ իրավիճակի հեռախոսազանգ"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Մոռացել եմ սխեման"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Layar nirkabel"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Keluaran media"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Sambungkan ke perangkat"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Transmisi layar ke perangkat"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Menelusuri perangkat…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Setelan"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Putuskan sambungan"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Hamparan #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", aman"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Transmisi layar"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Menyambung ke <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Transmisi layar"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Tersambung ke <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Putuskan sambungan"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Panggilan darurat"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Lupa Pola?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Visualizzazione wireless"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Uscita media"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Connetti al dispositivo"</string>
- <string name="media_route_chooser_searching" msgid="4776236202610828706">"Ricerca di dispositivi…"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Trasmetti schermo al dispositivo"</string>
+ <string name="media_route_chooser_searching" msgid="4776236202610828706">"Ricerca di dispositivi in corso…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Impostazioni"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Disconnetti"</string>
<string name="media_route_status_scanning" msgid="7279908761758293783">"Ricerca in corso..."</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay n. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", opzione sicura"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Trasmissione schermo"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Collegamento a <xliff:g id="NAME">%1$s</xliff:g> in corso"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Trasmissione schermo attiva"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Collegato a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Disconnetti"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Chiamata di emergenza"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Sequenza dimenticata"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"צג אלחוטי"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"פלט מדיה"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"התחברות למכשיר"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"העברת מסך אל מכשיר"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"מחפש מכשירים…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"הגדרות"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"התנתק"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"שכבת על #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", מאובטח"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"העברת מסך מתבצעת"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"מתחבר אל <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"העברת מסך מתבצעת"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"מחובר אל <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"נתק"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"שיחת חירום"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"שכחת את הקו"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"ワイヤレスディスプレイ"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"メディア出力"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"端末に接続"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"端末への画面のキャスト"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"端末を検索しています…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"設定"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"接続を解除"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"オーバーレイ第<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>、<xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"、セキュア"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"画面のキャスト中"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g>に接続しています"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"画面のキャスト中"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g>に接続しました"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"切断"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"緊急通報"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"パターンを忘れた場合"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"უსადენო ეკრანი"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"მედია გამომავალი"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"მოწყობილობასთან დაკავშირება"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"ეკრანის მოწყობილობაზე გადაცემა"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"მოწყობილობების ძიება…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"პარამეტრები"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"კავშირის გაწყვეტა"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"გადაფარვა #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", დაცული"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"მიმდინარეობს ეკრანის გადაცემა"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g>-თან დაკავშირება"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"მიმდინარეობს ეკრანის გადაცემა"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"დაკავშირებულია <xliff:g id="NAME">%1$s</xliff:g>-თან"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"კავშირის გაწყვეტა"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"გადაუდებელი დახმარების ზარი"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"დაგავიწყდათ ნიმუში"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"បង្ហាញបណ្ដាញឥតខ្សែ"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"លទ្ធផលមេឌៀ"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"ភ្ជាប់ឧបករណ៍"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"ចាត់ថ្នាក់អេក្រង់ទៅឧបករណ៍"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"កំពុងស្វែងរកឧបករណ៍..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"ការកំណត់"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"ផ្ដាច់"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"#<xliff:g id="ID">%1$d</xliff:g> ត្រួតគ្នា"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", សុវត្ថិភាព"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"ចាត់ថ្នាក់អេក្រង់"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"កំពុងតភ្ជាប់ទៅ <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"ចាត់ថ្នាក់អេក្រង់"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"តភ្ជាប់ទៅ <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"ផ្ដាច់"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"ការហៅពេលអាសន្ន"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ភ្លេចលំនាំ"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"무선 디스플레이"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"미디어 출력"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"기기에 연결"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"기기로 화면 전송"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"기기 검색 중…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"설정"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"연결 해제"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"<xliff:g id="ID">%1$d</xliff:g>번째 오버레이"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", 보안"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"화면 전송 중"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g>에 연결 중"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"화면 전송 중"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g>에 연결됨"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"연결 해제"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"긴급 통화"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"패턴을 잊음"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"ການສະແດງຜົນໄຮ້ສາຍ"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"ມີເດຍເອົ້າພຸດ"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"ເຊື່ອມຕໍ່ຫາອຸປະກອນ"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"ສົ່ງພາບໜ້າຈໍໄປຫາອຸປະກອນ"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"ກຳລັງຊອກຫາອຸປະກອນ..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"ການຕັ້ງຄ່າ"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"ຕັດການເຊື່ອມຕໍ່"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"ການວາງຊ້ອນ #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", ປອດໄພ"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"ກຳລັງສົ່ງພາບໜ້າຈໍ"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"ກຳລັງເຊື່ອມຕໍ່ຫາ <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"ການສົ່ງພາບໜ້າຈໍ"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"ເຊື່ອມຕໍ່ກັບ <xliff:g id="NAME">%1$s</xliff:g> ແລ້ວ"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"ຢຸດການເຊື່ອມຕໍ່"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"ການໂທສຸກເສີນ"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ລືມຮູບແບບປົດລັອກ?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Belaidis rodymas"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medijos išvestis"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Prijungimas prie įrenginio"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Perduoti ekraną į įrenginį"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Ieškoma įrenginių…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Nustatymai"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Atjungti"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Perdanga nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"„<xliff:g id="NAME">%1$s</xliff:g>“: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> tašk. colyje"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", saugu"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Perduodamas ekranas"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Prisijungiama prie „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Perduodamas ekranas"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Prisijungta prie „<xliff:g id="NAME">%1$s</xliff:g>“"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Atjungti"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Skambutis pagalbos numeriu"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Pamiršau atrakinimo piešinį"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Bezvadu attēlošana"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Multivides izeja"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Savienojuma izveide ar ierīci"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Ekrāna apraide uz ierīci"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Notiek ierīču meklēšana…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Iestatījumi"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Atvienot"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Pārklājums Nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", drošs"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Ekrāna apraidīšana"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Notiek savienojuma izveide ar: <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Ekrāna apraidīšana"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Izveidots savienojums ar: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Pārtraukt savienojumu"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Ārkārtas izsaukums"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Aizmirsu kombināciju"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Утасгүй дэлгэц"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Медиа гаралт"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Төхөөрөмжтэй холбох"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Дэлгэцийг төхөөрөмж рүү дамжуулах"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Төхөөрөмжүүдийг хайж байна…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Тохиргоо"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Салгах"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Давхарга #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", найдвартай"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Дэлгэцийг дамжуулж байна"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g> руу холбогдож байна"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Дэлгэцийг дамжуулж байна"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g> руу холбогдсон"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Салгах"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Яаралтай дуудлага"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Хээг мартсан"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Paparan wayarles"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Output media"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Sambung ke peranti"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Hantar skrin ke peranti"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Mencari peranti..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Tetapan"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Putuskan sambungan"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Tindih #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", selamat"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Menghantar skrin"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Menyambung ke <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Menghantar skrin"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Disambungkan ke <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Putus sambungan"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Panggilan kecemasan"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Lupa Corak"</string>
<string name="lockscreen_forgot_pattern_button_text" msgid="2626999449610695930">"Glemt mønsteret?"</string>
<string name="lockscreen_glogin_forgot_pattern" msgid="2588521501166032747">"Opplåsing av konto"</string>
<string name="lockscreen_glogin_too_many_attempts" msgid="2751368605287288808">"For mange forsøk på tegning av mønster"</string>
- <string name="lockscreen_glogin_instructions" msgid="3931816256100707784">"Logg deg på med Google-kontoen din for å låse opp."</string>
+ <string name="lockscreen_glogin_instructions" msgid="3931816256100707784">"Logg på med Google-kontoen din for å låse opp."</string>
<string name="lockscreen_glogin_username_hint" msgid="8846881424106484447">"Brukernavn (e-post)"</string>
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Passord"</string>
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Logg på"</string>
<item quantity="other" msgid="7915895323644292768">"Åpne trådløsnett i nærheten"</item>
</plurals>
<string name="wifi_available_sign_in" msgid="4029489716605255386">"Pålogging til Wi-Fi-nettverk"</string>
- <string name="network_available_sign_in" msgid="8495155593358054676">"Logg deg på nettverket"</string>
+ <string name="network_available_sign_in" msgid="8495155593358054676">"Logg på nettverket"</string>
<!-- no translation found for network_available_sign_in_detailed (8000081941447976118) -->
<skip />
<string name="wifi_watchdog_network_disabled" msgid="7904214231651546347">"Kan ikke koble til Wi-Fi"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Trådløs skjerm"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medieutgang"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Koble til enheten"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Send skjermen til enheten"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Søker etter enheter …"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Innstillinger"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Koble fra"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlegg #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", sikker"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Sender skjermen …"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Kobler til <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Sender skjermen …"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Koblet til <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Koble fra"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Nødnummer"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Har du glemt mønsteret?"</string>
<string name="kg_invalid_puk" msgid="3638289409676051243">"Skriv inn den korrekte PUK-koden på nytt. Gjentatte forsøk kommer til å deaktivere SIM-kortet."</string>
<string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN-kodene stemmer ikke overens"</string>
<string name="kg_login_too_many_attempts" msgid="6486842094005698475">"For mange forsøk på tegning av mønster"</string>
- <string name="kg_login_instructions" msgid="1100551261265506448">"Logg deg på med Google-kontoen din for å låse opp."</string>
+ <string name="kg_login_instructions" msgid="1100551261265506448">"Logg på med Google-kontoen din for å låse opp."</string>
<string name="kg_login_username_hint" msgid="5718534272070920364">"Brukernavn (e-postadresse)"</string>
<string name="kg_login_password_hint" msgid="9057289103827298549">"Passord"</string>
<string name="kg_login_submit_button" msgid="5355904582674054702">"Logg på"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Draadloze weergave"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Media-uitvoer"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Verbinding maken met apparaat"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Scherm sturen naar apparaat"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Zoeken naar apparaten…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Instellingen"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Verbinding verbreken"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", beveiligd"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Scherm sturen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Verbinden met <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Scherm sturen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Verbonden met <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Verbinding verbreken"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Noodoproep"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Patroon vergeten"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Wyświetlacz bezprzewodowy"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Wyjście multimediów"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Połącz z urządzeniem"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Prezentuj ekran na urządzeniu"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Szukam urządzeń…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Ustawienia"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Rozłącz"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Nakładka nr <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", bezpieczny"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Rozpoczynam prezentowanie ekranu"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Łączę z <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Trwa prezentowanie ekranu"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Połączono z <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Rozłącz"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Połączenie alarmowe"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nie pamiętam wzoru"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Visualização sem fios"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Saída de som multimédia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Ligar ao dispositivo"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Transmitir ecrã para o dispositivo"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"A pesquisar dispositivos…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Definições"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Desligar"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Sobreposição #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> ppp"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", protegido"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"A transmitir o ecrã"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"A ligar a <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"A transmitir o ecrã"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Ligado a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Desligar"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Chamada de emergência"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueceu-se da Sequência"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Display sem fio"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Saída de mídia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Conectar ao dispositivo"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Transmitir tela para dispositivo"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Procurando dispositivos…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Configurações"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Desconectar"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Sobreposição nº <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", seguro"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Transmitindo a tela"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Conectando a <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Transmitindo a tela"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Conectado a <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Desconectar"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Chamada de emergência"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Esqueci o padrão"</string>
<skip />
<!-- no translation found for media_route_chooser_title (1751618554539087622) -->
<skip />
+ <!-- no translation found for media_route_chooser_title_for_remote_display (3395541745872017583) -->
+ <skip />
<!-- no translation found for media_route_chooser_searching (4776236202610828706) -->
<skip />
<!-- no translation found for media_route_chooser_extended_settings (87015534236701604) -->
<skip />
<!-- no translation found for display_manager_overlay_display_secure_suffix (6022119702628572080) -->
<skip />
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
+ <!-- no translation found for wifi_display_notification_connecting_title (2838646471050359706) -->
<skip />
<!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
<skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
+ <!-- no translation found for wifi_display_notification_connected_title (8567308065912676285) -->
<skip />
<!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
<skip />
<string name="wireless_display_route_description" msgid="9070346425023979651">"Ecran wireless"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Rezultate media"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Conectați-vă la dispozitiv"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Trimiteți ecranul pe dispozitiv"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Se caută dispozitive..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Setări"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Deconectați-vă"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Suprapunerea <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", securizat"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Se trimite ecranul"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Se conectează la <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Se trimite ecranul"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Conectat la <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Deconectaţi-vă"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Apel de urgenţă"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Model uitat"</string>
<string name="submit" msgid="1602335572089911941">"Отправить"</string>
<string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Включен режим \"Штурман\""</string>
<string name="car_mode_disable_notification_message" msgid="8035230537563503262">"Чтобы выйти, нажмите здесь."</string>
- <string name="tethered_notification_title" msgid="3146694234398202601">"USB-модем/точка доступа Wi-Fi используется"</string>
+ <string name="tethered_notification_title" msgid="3146694234398202601">"Включен режим модема"</string>
<string name="tethered_notification_message" msgid="6857031760103062982">"Нажмите для настройки."</string>
<string name="back_button_label" msgid="2300470004503343439">"Назад"</string>
<string name="next_button_label" msgid="1080555104677992408">"Далее"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Беспроводной монитор"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Перенаправлять поток мультимедиа"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Подключение к устройству"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Подключение к удаленному дисплею"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Поиск устройств…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Настройки"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Отключить"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Наложение № <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> х <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> тчк/дюйм"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", безопасный"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Подключение к удаленному дисплею"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Подключение к <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Удаленный дисплей подключен"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Подключено к <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Отключить"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Экстренный вызов"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Забыли графический ключ?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Bezdrôtový displej"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Výstup médií"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Pripojenie k zariadeniu"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Odovzdanie obraz. na prehratie v zariad."</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Prebieha vyhľadávanie zariadení…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Nastavenia"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Odpojiť"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Prekrytie č. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", zabezpečené"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Odovzdávanie obrazovky na prehratie"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Prebieha pripájanie k obrazovke <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Odovzdávanie obrazovky na prehratie"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Pripojené k obrazovke <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Odpojiť"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Tiesňové volanie"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nepamätám si vzor"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Brezžični prikaz"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Izhod predstavnosti"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Povezovanje z napravo"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Predvajanje zaslona v napravi"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Iskanje naprav …"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Nastavitve"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Prekinitev povezave"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Prekrivanje #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> pik na palec"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", varen"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Predvajanje zaslona"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Povezovanje z zaslonom <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Predvajanje zaslona"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Vzpostavljena povezava z zaslonom <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Prekini povezavo"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Klic v sili"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Pozabljen vzorec"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Бежични екран"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Излаз медија"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Повежите са уређајем"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Пребаците екран на уређај"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Тражење уређаја…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Подешавања"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Прекини везу"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Постављени елемент бр. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>×<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", безбедно"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Пребацивање екрана"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Повезивање са <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Пребацивање екрана"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Повезано је са <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Прекини везу"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Хитни позив"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Заборављени шаблон"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Trådlös skärm"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medieuppspelning"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Anslut till enhet"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Överför skärmen till enheten"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Söker efter enheter ..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Inställningar"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Koppla från"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Överlagring #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g> x <xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", säker"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Överför skärmen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Ansluter till <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Överför skärmen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Ansluten till <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Koppla från"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Nödsamtal"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Har du glömt ditt grafiska lösenord?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Uonyeshaji usiotumia waya"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Towe la midia"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Unganisha kwenye kifaa"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Tuma skrini kwenye kifaa"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Inatafuta vifaa..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Mipangilio"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Ondoa"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Uwekeleaji #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", salama"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Inatuma skrini"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Inaunganishwa na <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Inatuma skrini"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Imeungwanishwa na <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Tenganisha"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Simu ya dharura"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Umesahau Ruwaza"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"การแสดงผลแบบไร้สาย"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"เอาต์พุตสื่อ"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"เชื่อมต่อกับอุปกรณ์"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"ส่งหน้าจอไปยังอุปกรณ์"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"กำลังค้นหาอุปกรณ์…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"การตั้งค่า"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"ยกเลิกการเชื่อมต่อ"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"การวางซ้อน #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", ปลอดภัย"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"กำลังส่งหน้าจอ"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"กำลังเชื่อมต่อไปยัง <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"กำลังส่งหน้าจอ"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"เชื่อมต่อกับ <xliff:g id="NAME">%1$s</xliff:g> แล้ว"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"หยุดเชื่อมต่อ"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"หมายเลขฉุกเฉิน"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"ลืมรูปแบบใช่หรือไม่"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Wireless display"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Output ng media"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Kumonekta sa device"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"I-cast ang screen sa device"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Naghahanap ng mga device…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Mga Setting"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Idiskonekta"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", secure"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Kina-cast ang screen"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Kumokonekta sa <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Kina-cast ang screen"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Nakakonekta sa <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Alisin sa pagkakakonekta"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Emergency na tawag"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Nakalimutan ang Pattern"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Kablosuz ekran"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Medya çıkışı"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Cihaza bağlanın"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Ekranı cihaza yayınlayın"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Cihaz aranıyor…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Ayarlar"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Bağlantıyı kes"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Yer Paylaşımı No. <xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", güvenli"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Ekran yayınlanıyor"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g> bağlantısı yapılıyor"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Ekran yayınlanıyor"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g> bağlantısı yapıldı"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Bağlantıyı kes"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Acil durum çağrısı"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Deseni Unuttunuz mu?"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Бездротовий екран"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Вивід медіа-даних"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Під’єднатися до пристрою"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Транслювати екран на пристрій"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Пошук пристроїв…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Налаштування"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Від’єднатися"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Накладання №<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>х<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", безпечний"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Транслювання екрана"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"<xliff:g id="NAME">%1$s</xliff:g> – під’єднання"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Транслювання екрана"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"<xliff:g id="NAME">%1$s</xliff:g> – під’єднано"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Від’єднати"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Екстрений виклик"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Не пам’ятаю ключ"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Hiển thị không dây"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Đầu ra phương tiện"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Kết nối với thiết bị"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Truyền màn hình tới thiết bị"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Đang tìm kiếm thiết bị…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Cài đặt"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Ngắt kết nối"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Lớp phủ #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", an toàn"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Truyền màn hình"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Đang kết nối với <xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Truyền màn hình"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Đã kết nối với <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Ngắt kết nối"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Cuộc gọi khẩn cấp"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Đã quên hình"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"无线显示"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"媒体输出线路"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"连接到设备"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"将屏幕投射到设备上"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"正在搜索设备…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"设置"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"断开连接"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"叠加视图 #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>:<xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>,<xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">",安全"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"正在投射屏幕"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"正在连接到“<xliff:g id="NAME">%1$s</xliff:g>”"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"正在投射屏幕"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"已连接到“<xliff:g id="NAME">%1$s</xliff:g>”"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"断开连接"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"紧急呼救"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘记了图案"</string>
<string name="bluetooth_a2dp_audio_route_name" msgid="8575624030406771015">"藍牙音頻"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"無線螢幕分享"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"媒體輸出"</string>
- <string name="media_route_chooser_title" msgid="1751618554539087622">"連線至裝置"</string>
+ <string name="media_route_chooser_title" msgid="1751618554539087622">"連接裝置"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"在裝置上放送螢幕"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"正在搜尋裝置…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"設定"</string>
- <string name="media_route_controller_disconnect" msgid="8966120286374158649">"中斷連線"</string>
+ <string name="media_route_controller_disconnect" msgid="8966120286374158649">"停止連接"</string>
<string name="media_route_status_scanning" msgid="7279908761758293783">"正在掃描…"</string>
<string name="media_route_status_connecting" msgid="6422571716007825440">"正在連線..."</string>
<string name="media_route_status_available" msgid="6983258067194649391">"可用"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"重疊效果 #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>:<xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>,<xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"(安全)"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"正在此放送螢幕"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"正在連線到「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"正在此放送螢幕"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"已連線到「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"中斷連線"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"緊急電話"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘記圖案"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"無線螢幕分享"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"媒體輸出"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"連線至裝置"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"將螢幕投放到裝置上"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"正在搜尋裝置..."</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"設定"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"中斷連線"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"第 <xliff:g id="ID">%1$d</xliff:g> 個重疊效果"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>:<xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>,<xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">"(安全)"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"正在投放螢幕"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"正在連線至「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"正在投放螢幕"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"已連線至「<xliff:g id="NAME">%1$s</xliff:g>」"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"中斷連線"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"緊急電話"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"忘記圖形"</string>
<string name="wireless_display_route_description" msgid="9070346425023979651">"Ukubonisa okungenazintambo"</string>
<string name="media_route_button_content_description" msgid="5758553567065145276">"Okukhiphayo kwemidiya"</string>
<string name="media_route_chooser_title" msgid="1751618554539087622">"Xhuma kudivayisi"</string>
+ <string name="media_route_chooser_title_for_remote_display" msgid="3395541745872017583">"Lingisa isikrini kudivayisi"</string>
<string name="media_route_chooser_searching" msgid="4776236202610828706">"Isesha amadivayisi…"</string>
<string name="media_route_chooser_extended_settings" msgid="87015534236701604">"Izilungiselelo"</string>
<string name="media_route_controller_disconnect" msgid="8966120286374158649">"Nqamula"</string>
<string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Isendlalelo #<xliff:g id="ID">%1$d</xliff:g>"</string>
<string name="display_manager_overlay_display_title" msgid="652124517672257172">"<xliff:g id="NAME">%1$s</xliff:g>: <xliff:g id="WIDTH">%2$d</xliff:g>x<xliff:g id="HEIGHT">%3$d</xliff:g>, <xliff:g id="DPI">%4$d</xliff:g> dpi"</string>
<string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", kuphephile"</string>
- <!-- no translation found for wifi_display_notification_connecting_title (9102788196896266990) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connecting_message (5837350993752841389) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_title (4118323329495921271) -->
- <skip />
- <!-- no translation found for wifi_display_notification_connected_message (2587209325701109715) -->
- <skip />
+ <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"Isikrini sokulingisa"</string>
+ <string name="wifi_display_notification_connecting_message" msgid="5837350993752841389">"Ixhuma ku-<xliff:g id="NAME">%1$s</xliff:g>"</string>
+ <string name="wifi_display_notification_connected_title" msgid="8567308065912676285">"Isikrini sokulingisa"</string>
+ <string name="wifi_display_notification_connected_message" msgid="2587209325701109715">"Kuxhunywe ku-<xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="wifi_display_notification_disconnect" msgid="6183754463561153372">"Nqamula"</string>
<string name="kg_emergency_call_label" msgid="684946192523830531">"Ucingo lwezimo eziphuthumayo"</string>
<string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"Ukhohlwe iphethini?"</string>
<item>12</item> <!-- EVDO_B -->
</integer-array>
+ <!-- Set to true if after a provisioning apn the radio should be restarted -->
+ <bool name="config_restartRadioAfterProvisioning">false</bool>
+
<!-- Vibrator pattern to be used as the default for notifications
that specify DEFAULT_VIBRATE.
-->
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
<java-symbol type="bool" name="config_camera_sound_forced" />
<java-symbol type="bool" name="config_dontPreferApn" />
+ <java-symbol type="bool" name="config_restartRadioAfterProvisioning" />
<java-symbol type="bool" name="config_speed_up_audio_on_mt_calls" />
<java-symbol type="bool" name="config_useFixedVolume" />
<java-symbol type="bool" name="config_forceDefaultOrientation" />
<p>If you want to emulate an NFC card that is using these protocols in your app, create a service component based on the {@link android.nfc.cardemulation.HostApduService} class. Whereas if your app instead uses a secure element for card emulation, you need to create a service based on the {@link android.nfc.cardemulation.OffHostApduService} class, which will not directly be involved in the transactions but is necessary to register the AIDs that should be handled by the secure element.</p>
-<p>For more information, read the <a href="">NFC Card Emulation</a> guide.</p>
+<p>For more information, read the <a href="{@docRoot}guide/topics/connectivity/nfc/hce.html">NFC Card Emulation</a> guide.</p>
<h3 id="ReaderMode">NFC reader mode</h3>
+excludeFromSuggestions=true
fullpage=true
page.title=Google I/O 13
@jd:body
header.hide=1
carousel=1
tabbedList=1
+excludeFromSuggestions=true
@jd:body
<style>
teacher-approved, educational apps and videos on Play Store. Teachers can filter
content by subject matter, grade and other criteria. Bulk purchase and instant
distribution let educators bring your apps directly to classrooms and schools.</p>
- <p>If you have an educational app, be a part of Google Play for Education.</p>
+ <p>If you have an educational app, join Google Play for Education.</p>
<p><a class="button" href="{@docRoot}distribute/googleplay/edu/about.html">Learn More</a></p>
</div>
</div>
will get a <code>NotRegistered</code> error. See <a href="#unreg">
How Unregistration Works</a> for more information.</p>
<p>Although is not possible to track the status of each individual message, the
-Google APIs Console stats are broken down by messages sent to device, messages
+Google Cloud Console stats are broken down by messages sent to device, messages
collapsed, and messages waiting for delivery.</p>
<h2 id="throttling">Throttling</h2>
<p>GCM will store up to 100 non-collapsible messages. After that, all messages
are discarded from GCM, and a new message is created that tells the client how
far behind it is. The message is delivered through a regular
-<code>com.google.android.c2dm.intent.RECEIVE</code> intent, with the following
-extras:</p>
-<ul>
- <li> <code>message_type</code>—The value is always the string
-"deleted_messages".</li>
- <li><code>total_deleted</code>—The value is a string with the number of
-deleted messages.</li>
-</ul>
+<code>com.google.android.c2dm.intent.RECEIVE</code> intent with the
+extra <code>message_type</code>, for which the value is always the string
+"deleted_messages".</p>
+
<p>The application should respond by syncing with the server to recover the
discarded messages. </p>
}
}.execute(null, null, null);
...
- /**
- * Sends the registration ID to your server over HTTP, so it can use GCM/HTTP
- * or CCS to send messages to your app. Not needed for this demo since the
- * device sends upstream messages to a server that echoes back the message
- * using the 'from' address in the message.
- */
- private void sendRegistrationIdToBackend() {
- // Your implementation here.
- }
+}</pre>
+
+<p>Once you've received your registration ID, send it to your server:</p>
+<pre>
+/**
+ * Sends the registration ID to your server over HTTP, so it can use GCM/HTTP
+ * or CCS to send messages to your app. Not needed for this demo since the
+ * device sends upstream messages to a server that echoes back the message
+ * using the 'from' address in the message.
+ */
+private void sendRegistrationIdToBackend() {
+ // Your implementation here.
}</pre>
<p>After registering, the app calls {@code storeRegistrationId()} to store the
<p class="note"><strong>Note:</strong> Stats on the Google API Console are not
enabled for GCM. You must use the <a href="http://play.google.com/apps/publish">Developer Console</a>.</p>
-
<th colspan="2">Credentials</th>
</tr>
<tr>
- <td><strong>Sender ID</strong></td>
+ <td id="senderid"><strong>Sender ID</strong></td>
<td>A project number you acquire from the API console, as described in
<a href="gs.html#create-proj">Getting Started</a>. The sender
ID is used in the <a href="#register">registration process</a> to identify a
account if the device is running a version lower than Android 4.0.4.</td>
</tr>
<tr>
- <td><strong>Sender Auth Token</strong></td>
+ <td id="apikey"><strong>Sender Auth Token</strong></td>
<td>An API key that is saved on the 3rd-party application
server that gives the application server authorized access to Google services.
The API key is included in the header of POST requests that send messages.</td>
<h2>See Also</h2>
<ol class="toc">
-<li><a href="https://code.google.com/apis/console">Google APIs Console page</a></li>
+<li><a href="https://cloud.google.com/console">Google Cloud Console</a></li>
+<li><a href="https://developers.google.com/console/help/new/">Google Cloud Console Help</a></li>
<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
</ol>
<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">
{@code GoogleCloudMessaging}</a> methods.</p>
-
<h2 id="create-proj">Creating a Google API project</h2>
<p>To create a Google API project:</p>
<ol>
- <li>Open the <a href="https://code.google.com/apis/console">Google APIs Console page</a>.
+ <li>Open the <a href="https://cloud.google.com/console">Google Cloud Console</a>.
</li>
- <li>If you haven't created an API project yet, this page will prompt you to do so:
- <p><img src="{@docRoot}images/gcm/gcm-create-api-proj.png" class="screenshot" /></p>
-<p class="note"><strong>Note:</strong> If you already have existing projects,
-the first page you see will be the <strong>Dashboard</strong> page. From there
-you can create a new project by opening the project drop-down menu (upper left corner)
-and choosing <strong>Other projects > Create</strong>.</p></li>
- <li> Click <strong>Create project</strong>.
- Your browser URL will change to something like:</li>
-
-<pre> https://code.google.com/apis/console/#project:<strong>4815162342</strong></pre>
-
- <li> Take note of the value after <code>#project:</code> (4815162342 in this
-example). This is your project number, and it will be used later on as the GCM sender ID.</li>
+ <li>If you haven't created an API project yet, click <strong>Create Project</strong>.</li>
+
+ <li>Supply a project name and click <strong>Create</strong>.
+
+<p>Once the project has been created, a page appears that displays your project ID and
+project number. For example, <strong>Project Number: 670330094152</strong>.</p></li>
+
+ <li>Copy down your project number. You will use it later on as the
+ <a href="{@docRoot}google/gcm/gcm.html#senderid">GCM sender ID</a>.</li>
</ol>
<h2 id="gcm-service">Enabling the GCM Service</h2>
<p>To enable the GCM service:</p>
<ol>
- <li> In the main Google APIs Console page, select <strong>Services</strong>.</li>
- <li>Turn the <strong>Google Cloud Messaging</strong> toggle to ON.</li>
- <li>In the Terms of Service page, accept the terms.
- </li>
+ <li>In the sidebar on the left, select <strong>APIs & auth</strong>. </li>
+ <li>In the displayed list of APIs, turn the <strong>Google Cloud Messaging for Android
+ </strong> toggle to ON.</li>
+
</ol>
<h2 id="access-key">Obtaining an API Key</h2>
<p>To obtain an API key:</p>
<ol>
- <li> In the main Google APIs Console page, select <strong>API Access</strong>.
-You will see a screen that resembles the following:</li>
-
-
-<img src="{@docRoot}images/gcm/gcm-api-access.png" style="width:400px;padding:4px;">
-
- <li>Click <strong>Create new Server key</strong>. Either a server key or a
-browser key should work. The advantage to using a server key is that it allows
-you to whitelist IP addresses. The following screen appears:</li>
+ <li>In the sidebar on the left, select <strong>APIs & auth > Registered apps</strong>.</li>
+<li>Click <strong>Register app</strong>. </li>
+<li>In the <strong>Name</strong> field, type your app's name.</li>
+<li>Click <strong>Android > Accessing APIs directly from Android</strong>.</li>
+<li>Under <strong>Android identification</strong>, type the package name for your app.</li>
+<li>Enter an SHA1 fingerprint. To get this value, follow the instructions in the
+<a href="http://developers.google.com/console/help/new/#installedapplications">console
+help</a>.</li>
+<li>Click <strong>Register</strong>.</li>
-<img src="{@docRoot}images/gcm/gcm-config-server-key.png" style="width:400px;padding:4px;">
+<li>In the new page, open the <strong>Android Key</strong> section and copy the
+<a href="{@docRoot}google/gcm/gcm.html#apikey">API key</a>.
+You will need the API key later on to perform authentication in your application server.</li>
-
- <li>Click <strong>Create</strong>:</li>
-
-
-<img src="{@docRoot}images/gcm/gcm-api-key.png" style="width:400px;padding:4px;">
-
-
-
-</ol>
-<p> Take note of the <strong>API key</strong> value (<code>YourKeyWillBeShownHere</code>)
-in this example, as it will be used later on.</p>
<p class="note"><strong>Note:</strong> If you need to rotate the key, click
-<strong>Generate new key</strong>. A new key will be created while the old one
-will still be active for up to 24 hours. If you want to get rid of the old key
-immediately (for example, if you feel it was compromised), click <strong>Delete key</strong>.</p>
+the "recycle key" icon. A new key will be created. If you think the key has been compromised
+and you want to delete it immediately, you can accomplish this by deleting the app from
+the console. Then create a new entry for the app with the same SHA1 and package name.</p>
+</ol>
<h2 id="next">Next Steps</h2>
on a device. See <a href="client.html">Implementing GCM Client</a> for more information.</li>
</ol>
-
<li>When the device is online, Google sends the message to the device.</li>
<li>On the device, the system broadcasts the message to the specified Android
application via Intent broadcast with proper permissions, so that only the targeted
-ndroid application gets the message. This wakes the Android application up.
+Android application gets the message. This wakes the Android application up.
The Android application does not need to be running beforehand to receive the message.</li>
<li>The Android application processes the message. </li>
</ol>
<p>Required. When your app server sends a message in GCM, it must specify a target.</p>
<p>For HTTP you must specify the target as one of:</p>
<ul>
-<li><code>registration_ids</code>: For sending to 1 more more devices (up to 1000).
+<li><code>registration_ids</code>: For sending to 1 or more devices (up to 1000).
When you send a message to multiple registration IDs, that is called a multicast message.</li>
<li><code>notification_key</code>: For sending to multiple devices owned by a single user.</li>
</ul>
<p>The Purchase Status API is part of the <a
href="https://developers.google.com/android-publisher/v1_1/">Google Play Android
-Developer API v1.1</a>, available through the Google APIs console. The new version
+Developer API v1.1</a>, available through the Google Cloud Console. The new version
of the API supersedes the v1 API, which is deprecated. If you are using the v1
API, please migrate your operations to the v1.1 API as soon as possible.</p>
<h2 id="using">Using the API</h2>
<p>To use the API, you must first register a project at the <a
-href="https://code.google.com/apis/console">Google APIs Console</a> and receive
+href="https://cloud.google.com/console">Google Cloud Console</a> and receive
a Client ID and shared secret that your app will present when calling the
API. All calls are authenticated with OAuth 2.0.</p>
subscription-validation needs, assuming that you follow the recommendation in
this section.</p>
-<p>If you need to request a higher limit for your application, please use the
-“Request more” link in the <a
-href="https://code.google.com/apis/console/#:quotas">Google APIs Console</a>.
+<p>If you need to request a higher limit for your application, see the
+instructions in the <a
+href="https://developers.google.com/console/help/new/#trafficcontrols">Google Cloud Console Help</a>.
Also, please read the section below on design best practices for minimizing your
use of the API.</p>
<a name="issue" id="issue"></a><h2>I think I found a security flaw. How do I
report it?</h2>
-<p>You can reach the Android security team at <a
-href="mailto:security@android.com">security@android.com</a>. If you like, you
+<p>You can reach the Android security team at security@android.com. If you like, you
can protect your message using our <a
href="http://code.google.com/android/security_at_android_dot_com.txt">PGP
key</a>.</p>
users are at risk. In return, we will make sure to keep the researcher informed
of our progress in issuing a fix. </p>
+<p>Vulnerabilities specific to Android OEMs should be reported to the relevant
+vendor. An incomplete list of Android vendor security contacts can be found below.
+To be added to this list, please contact security@android.com.</p>
+
+<ul>
+ <li><a href="http://www.htc.com/www/terms/product-security/">HTC</a></li>
+ <li><a href="http://www.motorolasolutions.com/US-EN/About/Security%20Vulnerability">Motorola</a></li>
+ <li><a href="http://developer.samsung.com/notice/How-to-Use-the-Forum">Samsung</a> - m.security@samsung.com</li>
+</ul>
<a name="informed" id="informed"></a><h2>How can I stay informed about Android security?</h2>
<p>Like any other platform, it will be possible for unethical developers
to create malicious software, known as <a
href="http://en.wikipedia.org/wiki/Malware">malware</a>, for Android. If you
-think somebody is trying to spread malware, please let us know at <a
-href="mailto:security@android.com">security@android.com</a>. Please include as
+think somebody is trying to spread malware, please let us know at
+security@android.com. Please include as
much detail about the application as possible, with the location it is
being distributed from and why you suspect it of being malicious software.</p>
</div>
</div>
+<a class="notice-developers-video" href="http://www.youtube.com/watch?v=vUbFB1Qypg8">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Bluetooth Low Energy API</p>
+</div>
+</a>
+
+
+
<p>
Android 4.3 (API Level 18) introduces built-in platform support for Bluetooth Low
<div id="qv-wrapper">
<div id="qv">
-<h2>In this document</h2>
-<ol>
+<h2>In this document
+ <a href="#" onclick="hideNestedItems('#toc44',this);return false;" class="header-toggle">
+ <span class="more">show more</span>
+ <span class="less" style="display:none">show less</span></a></h2>
+<ol id="toc44" class="hide-nested">
<li>
<a href="#overview">Overview</a>
</li>
<ol>
<li>{@link android.provider.DocumentsProvider}</li>
<li>{@link android.provider.DocumentsContract}</li>
- <li>{@link android.provider.DocumentsContract.Document}</li>
- <li>{@link android.provider.DocumentsContract.Root}</li>
+</ol>
+
+<h2>Videos</h2>
+
+<ol>
+ <li><a href="http://www.youtube.com/watch?v=zxHVeXbK1P4">
+DevBytes: Android 4.4 Storage Access Framework: Provider</a></li>
+ <li><a href="http://www.youtube.com/watch?v=UFj9AEz0DHQ">
+DevBytes: Android 4.4 Storage Access Framework: Client</a></li>
+</ol>
+
+
+<h2>Code Samples</h2>
+
+<ol>
+ <li><a href="{@docRoot}samples/StorageProvider/index.html">
+Storage Provider</a></li>
+ <li><a href="{@docRoot}samples/StorageClient/index.html">
+StorageClient</a></li>
</ol>
<h2>See Also</h2>
</a>
</li>
</ol>
+
</div>
</div>
-<p>Android 4.4 (API level 19) introduces the Storage Access Framework. The
-Storage Access Framework encapsulates capabilities in the Android platform that
-allow apps to request files from file storage services. The Storage Access
-Framework includes the following:</p>
+
+
+<p>Android 4.4 (API level 19) introduces the Storage Access Framework (SAF). The SAF
+ makes it simple for users to browse and open documents, images, and other files
+across all of their their preferred document storage providers. A standard, easy-to-use UI
+lets users browse files and access recents in a consistent way across apps and providers.</p>
+
+<p>Cloud or local storage services can participate in this ecosystem by implementing a new
+{@link android.provider.DocumentsProvider} that encapsulates their services. Client
+apps that need access to a provider's documents can integrate with the SAF with just a few
+lines of code.</p>
+
+<p>The SAF includes the following:</p>
<ul>
<li><strong>Document provider</strong>—A content provider that allows a
-storage service (such as Google Drive) to reveal the files it manages. This is
+storage service (such as Google Drive) to reveal the files it manages. A document provider is
implemented as a subclass of the {@link android.provider.DocumentsProvider} class.
-The document provider schema is based on a traditional file hierarchy,
+The document-provider schema is based on a traditional file hierarchy,
though how your document provider physically stores data is up to you.
The Android platform includes several built-in document providers, such as
Downloads, Images, and Videos.</li>
document providers that satisfy the client app's search criteria.</li>
</ul>
-<p>Some of the features offered by the Storage Access Framework are as follows:</p>
+<p>Some of the features offered by the SAF are as follows:</p>
<ul>
<li>Lets users browse content from all document providers, not just a single app.</li>
<li>Makes it possible for your app to have long term, persistent access to
<h2 id ="overview">Overview</h2>
-<p>The Storage Access Framework centers around a content provider that is a
+<p>The SAF centers around a content provider that is a
subclass of the {@link android.provider.DocumentsProvider} class. Within a <em>document provider</em>, data is
structured as a traditional file hierarchy:</p>
<p><img src="{@docRoot}images/providers/storage_datamodel.png" alt="data model" /></p>
long as it can be accessed through the {@link android.provider.DocumentsProvider} API. For example, you
could use tag-based cloud storage for your data.</p>
-<p>Figure 2 shows an example of how a photo app might use the Storage Access Framework
+<p>Figure 2 shows an example of how a photo app might use the SAF
to access stored data:</p>
<p><img src="{@docRoot}images/providers/storage_dataflow.png" alt="app" /></p>
<p>Note the following:</p>
<ul>
-<li>In the Storage Access Framework, providers and clients don't interact
+<li>In the SAF, providers and clients don't interact
directly. A client requests permission to interact
with files (that is, to read, edit, create, or delete files).</li>
<h3 id="edit">Edit a document</h3>
-<p>You can use the Storage Access Framework to edit a text document in place.
+<p>You can use the SAF to edit a text document in place.
This snippet fires
the {@link android.content.Intent#ACTION_OPEN_DOCUMENT} intent and uses the
category {@link android.content.Intent#CATEGORY_OPENABLE} to to display only
<p>
If you're developing an app that provides storage services for files (such as
-a cloud save service), you can make your files available through the Storage
-Access Framework by writing a custom document provider. This section describes
+a cloud save service), you can make your files available through the
+SAF by writing a custom document provider. This section describes
how to do this.</p>
You must export your provider so that other apps can see it.</li>
<li>The attribute <code>android:grantUriPermissions</code> set to
-<code>"true"</code>. This allows the system to grant other apps access
+<code>"true"</code>. This setting allows the system to grant other apps access
to content in your provider. For a discussion of how to persist a grant for
a particular document, see <a href="#permissions">Persist permissions</a>.</li>
<li>The {@code MANAGE_DOCUMENTS} permission. By default a provider is available
-to everyone. Adding this permission restricts your provider to the system,
-which is important for security. </li>
+to everyone. Adding this permission restricts your provider to the system.
+This restriction is important for security.</li>
+
+<li>The {@code android:enabled} attribute set to a boolean value defined in a resource
+file. The purpose of this attribute is to disable the provider on devices running Android 4.3 or lower.
+For example, {@code android:enabled="@bool/atLeastKitKat"}. In
+addition to including this attribute in the manifest, you need to do the following:
+<ul>
+<li>In your {@code bool.xml} resources file under {@code res/values/}, add
+this line: <pre><bool name="atLeastKitKat">false</bool></pre></li>
+
+<li>In your {@code bool.xml} resources file under {@code res/values-v19/}, add
+this line: <pre><bool name="atLeastKitKat">true</bool></pre></li>
+</ul></li>
<li>An intent filter that includes the
{@code android.content.action.DOCUMENTS_PROVIDER} action, so that your provider
android:authorities="com.example.android.storageprovider.documents"
android:grantUriPermissions="true"
android:exported="true"
- android:permission="android.permission.MANAGE_DOCUMENTS">
+ android:permission="android.permission.MANAGE_DOCUMENTS"
+ android:enabled="@bool/atLeastKitKat">
<intent-filter>
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</manifest></pre>
-<h4>Supporting devices running Android 4.3 and lower</h4>
+<h4 id="43">Supporting devices running Android 4.3 and lower</h4>
<p>The
{@link android.content.Intent#ACTION_OPEN_DOCUMENT} intent is only available
If you want your application to support {@link android.content.Intent#ACTION_GET_CONTENT}
to accommodate devices that are running Android 4.3 and lower, you should
disable the {@link android.content.Intent#ACTION_GET_CONTENT} intent filter in
-your manifest if a device is running Android 4.4 or higher. A
+your manifest for devices running Android 4.4 or higher. A
document provider and {@link android.content.Intent#ACTION_GET_CONTENT} should be considered
mutually exclusive. If you support both of them simultaneously, your app will
appear twice in the system picker UI, offering two different ways of accessing
<a href="{@docRoot}guide/topics/providers/content-provider-creating.html#ContractClass">
Content Providers</a> developers guide. A contract class is a {@code public final} class
that contains constant definitions for the URIs, column names, MIME types, and
-other metadata that pertain to the provider. The Storage Access Framework
+other metadata that pertain to the provider. The SAF
provides these contract classes for you, so you don't need to write your
own:</p>
getContentResolver().notifyChange(DocumentsContract
.buildRootsUri(AUTHORITY), null);
}
-</pre>
+</pre>
\ No newline at end of file
fullpage=true
no_footer_links=true
carousel=true
+excludeFromSuggestions=true
page.metaDescription=The official site for Android developers. Provides the Android SDK and documentation for app developers and designers.
page.customHeadTag=<meta name="google-site-verification" content="sa-bIAI6GKvct3f61-WpRguHq-aNjtF7xJjMTSi79as" />
page.title=Content License
fullpage=1
+excludeFromSuggestions=true
@jd:body
<div class="wrap" style="width:940px;">
home=true
page.title=Welcome
+excludeFromSuggestions=true
@jd:body
<style type="text/css">
$("#tos").hide();
$("#main").show();
location.hash = "Updating";
+ _gaq.push(['_trackEvent', 'SDK', 'Android Studio', $("#downloadForRealz").html()]);
return true;
} else {
$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
page.title=Developer Support
fullpage=1
+excludeFromSuggestions=true
@jd:body
<div class="wrap" style="width:940px;">
<h5>Community and Office Hours</h5>
<p style="color:#888">
+<a href="https://plus.google.com/+AndroidDevelopers">Android Developers</a> on Google+<br />
+<a href="https://plus.google.com/communities/105153134372062985968">Android Development community</a> on Google+<br />
<a href="http://groups.google.com/group/android-developers">android-developers</a> support forum<br />
<a href="http://groups.google.com/group/android-ndk">android-ndk</a> support forum<br />
<a href="http://groups.google.com/group/android-security-discuss">android-security-discuss</a> support forum<br />
</div>
-</div>
\ No newline at end of file
+</div>
-page.title=Analyzing Display and Performance with Systrace
+page.title=Analyzing Display and Performance
+page.tags=systrace,speed
parent.title=Debugging
parent.link=index.html
@jd:body
<li><a href="#generate">Generating Traces</a>
<ol>
<li><a href="#limit-trace">Limiting trace data</a></li>
- <li><a href="#config-categories">Configuring trace data categories</a></li>
- <li><a href="#running">Running a trace</a></li>
+ <li><a href="#running-4.3">Tracing on Android 4.3 and higher</a>
+ <li><a href="#running-4.2">Tracing on Android 4.2 and lower</a></li>
</ol>
</li>
+ <li><a href="#app-trace">Tracing Application Code</a></li>
<li><a href="#analysis">Analyzing Traces</a>
<ol>
<li><a href="#long-processes">Long running processes</a></li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}tools/help/systrace.html">Systrace</a>
- </li>
+ <li><a href="{@docRoot}tools/help/systrace.html">Systrace</a></li>
</ol>
</div>
</div>
-<p>After building features, eliminating bugs and cleaning up your code, you should spend some
+<p>After building features, eliminating bugs, and cleaning up your code, you should spend some
time looking at the performance of your application. The speed and smoothness with which your
application draws pixels and performs operations has an significant impact on your users'
experience.</p>
threaded processes for resources, which can cause performance problems that are hard to diagnose.
</p>
-<p>The {@code systrace} tool allows you to collect and review code execution data for your
+<p>The Systrace tool allows you to collect and review code execution data for your
application and the Android system. You can use this data to diagnose execution problems and
improve the performance of your application.</p>
<h2 id="overview">Overview</h2>
-<p>{@code systrace} helps you analyze how the execution of your application fits into the larger
+<p>Systrace helps you analyze how the execution of your application fits into the larger
Android environment, letting you see system and applications process execution on a common
timeline. The tool allows you to generate highly detailed, interactive reports from devices
running Android 4.1 and higher, such as the report in figure 1.</p>
<img src="{@docRoot}images/systrace/report.png" alt="Systrace example report" id="figure1" />
<p class="img-caption">
- <strong>Figure 1.</strong> An example {@code systrace} report on 5 seconds of process execution
+ <strong>Figure 1.</strong> An example Systrace report on 5 seconds of process execution
for a running application and related Android system processes.
</p>
<h2 id="generate">Generating Traces</h2>
<p>In order to create a trace of your application, you must perform a few setup steps. First, you
- must have a device running Android 4.1 or higher. Setup the device for
+ must have a device running Android 4.1 or higher. Set up the device for
<a href="{@docRoot}tools/device.html#setting-up">debugging</a>, connect it to your development
- system and install your application. Some types of trace information, specifically disk activity
- and kernel work queues, require root access to the device, but most {@code systrace} log data
- only requires that the device be enabled for developer debugging.</p>
+ system, and install your application. Some types of trace information, specifically disk activity
+ and kernel work queues, require that you have root access to the device. However, most Systrace
+ log data only requires that the device be enabled for developer debugging.</p>
+
+<p>Systrace traces can be run either from a
+ <a href="{@docRoot}tools/help/systrace.html#options">command line</a> or from a
+ <a href="{@docRoot}tools/help/systrace.html#gui">graphical user interface</a>. This guide
+ focuses on using the command line options.</p>
<h3 id="limit-trace">Limiting trace data</h3>
-<p>The {@code systrace} tool can generate a potentially huge amount of data from applications
+<p>The Systrace tool can generate a potentially huge amount of data from applications
and system sources. To limit the amount of data the tool collects and make the data more relevant
to your analysis, use the following options:</p>
<li>Limit the amount of time covered by the trace with the {@code -t, --time} option. The default
length of a trace is 5 seconds.</li>
<li>Limit the size of the data collected by the trace with the {@code -b, --buf-size} option.</li>
- <li>Specify what types of processes are traced using the {@code --set-tags} option and the
- {@code --disk}, {@code --cpu-freq}, {@code --cpu-idle}, {@code --cpu-load} options.</li>
+ <li>Specify what types of processes are traced. The types of processes that can be traced depends
+ on the version of Android you are running:
+ <ul>
+ <li>Android 4.2 and lower devices: Use the {@code --set-tags} option and the {@code --disk},
+ {@code --cpu-freq}, {@code --cpu-idle}, {@code --cpu-load} options.</li>
+ <li>Android 4.3 and higher devices: Use the {@code --list-categories} option to see what
+ categories are available on your test device.</li>
+ </ul>
+ </li>
</ul>
-<h3 id="config-categories">Configuring trace data categories</h3>
+<h3 id="running-4.3">Tracing on Android 4.3 and higher</h3>
+
+<p>To run a trace on Android 4.3 and higher devices:</p>
+
+<ol>
+ <li>Make sure the device is connected through a USB cable and is
+ <a href="{@docRoot}tools/device.html#setting-up">enabled for debugging</a>.</li>
+ <li>Run the trace with the options you want, for example:
+<pre>
+$ cd android-sdk/platform-tools/systrace
+$ python systrace.py --time=10 -o mynewtrace.html sched gfx view wm
+</pre>
+ </li>
+ <li>On the device, execute any user actions you want be included in the trace.</li>
+</ol>
+
+<p>For more information on the available options for running Systrace, see the
+<a href="{@docRoot}tools/help/systrace.html#options-4.3">Systrace</a> help page.</p>
+
-<p>To use {@code systrace} effectively, you must specify the types of processes you want to trace.
+<h3 id="running-4.2">Tracing on Android 4.2 and lower</h3>
+
+<p>To use Systrace effectively with devices running Android 4.2 and lower,
+ you must configure the types of processes you want to trace before running a trace.
The tool can gather the following types of process information:</p>
<ul>
<li>General system processes such as graphics, audio and input processes (selected using trace
- <a href="{@docRoot}tools/help/systrace.html#tags">Tags</a>).</li>
+ <a href="{@docRoot}tools/help/systrace.html#tags">category tags</a>).</li>
<li>Low level system information such as CPU, kernel and disk activity (selected using
- <a href="{@docRoot}tools/help/systrace.html#options">Options</a>).</li>
+ <a href="{@docRoot}tools/help/systrace.html#options">options</a>).</li>
</ul>
-<p>To set trace tags for {@code systrace} using the command-line:</p>
+<p>To set trace tags for Systrace using the command-line:</p>
<ol>
<li>Use the {@code --set-tags} option:
<pre>
-$> python systrace.py --set-tags=gfx,view,wm
+$ cd android-sdk/platform-tools/systrace
+$ python systrace.py --set-tags=gfx,view,wm
</pre>
</li>
<li>Stop and restart the {@code adb} shell to enable tracing of these processes.
<pre>
-$> adb shell stop
-$> adb shell start
+$ adb shell stop
+$ adb shell start
</pre></li>
</ol>
-<p>To set trace tags for {@code systrace} using the device user interface:</p>
+<p>To set trace tags for Systrace using the device user interface:</p>
<ol>
<li>On the device connected for tracing, navigate to: <strong>Settings >
selecting trace tags using this method.
</p>
-
-<h3 id="running">Running a trace</h3>
-
<p>After you have configured the category tags for your trace, you can start collecting
information for analysis.</p>
<a href="{@docRoot}tools/device.html#setting-up">enabled for debugging</a>.</li>
<li>Run the trace with the low-level system trace options and limits you want, for example:
<pre>
-$> python systrace.py --cpu-freq --cpu-load --time=10 -o mytracefile.html
+$ python systrace.py --cpu-freq --cpu-load --time=10 -o mytracefile.html
</pre>
</li>
<li>On the device, execute any user actions you want be included in the trace.</li>
</ol>
+<p>For more information on the available options for running Systrace, see the
+<a href="{@docRoot}tools/help/systrace.html#options-pre-4.3">Systrace</a> help page.</p>
+
+
+<h2 id="app-trace">Tracing Application Code</h2>
+
+<p>The Systrace tool can trace the execution of code within your application. In Android
+4.3 (API level 18) and higher, you can use the methods of the {@link android.os.Trace} class to
+add instrumentation to your application code and see the results in a Systrace report.</p>
+
+<p>The following code example shows how to use the {@link android.os.Trace} class to track
+execution of an application method, including two nested code blocks within that method.</p>
+
+<pre>
+public void ProcessPeople() {
+ Trace.beginSection("ProcessPeople");
+ try {
+ Trace.beginSection("Processing Jane");
+ try {
+ // code for Jane task...
+ } finally {
+ Trace.endSection(); // ends "Processing Jane"
+ }
+
+ Trace.beginSection("Processing John");
+ try {
+ // code for John task...
+ } finally {
+ Trace.endSection(); // ends "Processing John"
+ }
+ } finally {
+ Trace.endSection(); // ends "ProcessPeople"
+ }
+}
+</pre>
+<p class="note">
+ <strong>Note:</strong> When you nest trace calls within each other, the
+ {@link android.os.Trace#endSection} method ends the most recently called
+ {@link android.os.Trace#beginSection} method. This means that a trace started within another
+ trace cannot extend beyond the end of the enclosing trace, so make sure your beginning and
+ ending method calls are properly matched to measure your applications processing.
+</p>
+
+<p class="note">
+ <strong>Note:</strong> Traces must begin and end on the same thread. Do not call
+ {@link android.os.Trace#beginSection} on one thread of execution and then attempt to end the
+ trace with a call to {@link android.os.Trace#endSection} on another thread.
+</p>
+
+<p>When using application-level tracing with Systrace, you must specify the package name of your
+application in the user interface or specify the {@code -a} or {@code --app=} options on the
+command line. For more information, see the
+<a href="{@docRoot}tools/help/systrace.html">Systrace</a> help page.</p>
+
+<!-- todo: add ndk coverage -->
+
<h2 id="analysis">Analyzing Traces</h2>
-<p>After you have generated a trace using {@code systrace}, it lists the location of the output
+<p>After you have generated a trace using Systrace, it lists the location of the output
file and you can open the report using a web browser.
How you use the trace data depends on the performance issues you are investigating. However,
this section provides some general instructions on how to analyze a trace.</p>
-<p>The reports generated by {@code systrace} are interactive, allowing you to zoom into and out of
+<p>The reports generated by Systrace are interactive, allowing you to zoom into and out of
the process execution details. Use the <em>W</em> key to zoom in, the <em>S</em>
key to zoom out, the <em>A</em> key to pan left and the <em>D</em> key to pan
right. Select a task in timeline using your mouse to get more information about the task.
<h3 id="display-interupts">Interruptions in display execution</h3>
-<p>The {@code systrace} tool is particularly useful in analyzing application display slowness,
+<p>The Systrace tool is particularly useful in analyzing application display slowness,
or pauses in animations, because it shows you the execution of your application across multiple
system processes. With display execution, drawing screen frames with a regular rhythm is essential
for good performance. Having a regular rhythm for display ensures that animations and motion are
from the users perspective.</p>
<p>If you are analyzing an application for this type of problem, examine the
- <strong>SurfaceFlinger</strong> process in the {@code systrace} report where your application is
+ <strong>SurfaceFlinger</strong> process in the Systrace report where your application is
also executing to look for places where it drops out of its regular rhythm.</p>
<img src="{@docRoot}images/systrace/display-rhythm.png" alt="Systrace exerpt of display processing"
</p>
<p class="note">
- <strong>Note:</strong> When using {@code systrace} to analyze display problems, make sure
+ <strong>Note:</strong> When using Systrace to analyze display problems, make sure
you activate the tracing tags for <strong>Graphics</strong> and <strong>Views</strong>.
</p>
-<p>For more information on the command line options and keyboard controls for {@code systrace},
-see the <a href="{@docRoot}tools/help/systrace.html">Systrace</a> reference page.</p>
\ No newline at end of file
+<p>For more information on the command line options and keyboard controls for Systrace,
+see the <a href="{@docRoot}tools/help/systrace.html">Systrace</a> help page.</p>
\ No newline at end of file
<p>Android Device Monitor is a stand-alone tool that provides a graphical user interface for
several Android application debugging and analysis tools. The Monitor tool does not
-require installation of a integrated development environment, such as Eclipse, and encapsulates the
+require installation of an integrated development environment, such as Eclipse, and encapsulates the
following tools:</p>
<ul>
<li><a href="{@docRoot}tools/debugging/ddms.html">DDMS</a></li>
<li><a href="gltracer.html">Tracer for OpenGL ES</a></li>
<li><a href="hierarchy-viewer.html">Hierarchy Viewer</a></li>
+ <li><a href="systrace.html">Systrace</a></li>
<li><a href="traceview.html">Traceview</a></li>
<li>Pixel Perfect magnification viewer</li>
</ul>
@jd:body
-<p>The {@code systrace} tool helps analyze the performance of your application by capturing and
+<p>The Systrace tool helps analyze the performance of your application by capturing and
displaying execution times of your applications processes and other Android system processes. The
- tool combines data from the Android kernel such as the CPU scheduler, disk activity and
+ tool combines data from the Android kernel such as the CPU scheduler, disk activity, and
application threads to generate an HTML report that shows an overall picture of an Android
device’s system processes for a given period of time.</p>
-<p>The {@code systrace} tool is particularly useful in diagnosing display problems where an
+<p>The Systrace tool is particularly useful in diagnosing display problems where an
application is slow to draw or stutters while displaying motion or animation. For more information
- on how to use {@code systrace}, see <a href="{@docRoot}tools/debugging/systrace.html">Analyzing
- Display and Performance with Systrace</a>.</p>
+ on how to use Systrace, see <a href="{@docRoot}tools/debugging/systrace.html">Analyzing
+ Display and Performance</a>.</p>
-<h2 id="usage">Usage</h2>
-<p>In order to run {@code systrace}, the {@code adb} tool and
-<a href="http://www.python.org/">Python</a> must be installed and included in your development
-computer's execution path. In order to generate a trace, you must connect a device running Android
-4.1 (API Level 16) or higher to your development system using a USB debugging connection.</p>
+<h2 id="requirements">Requirements</h2>
-<p>The syntax for running {@code systrace} is as follows.</p>
+<p>In order to run Systrace, you must have Android SDK Tools 20 or later installed. You must also
+have <a href="http://www.python.org/">Python</a> installed and included in your development
+computer's execution path. In order to generate a trace, you must connect a device running Android
+4.1 (API Level 16) or higher to your development system using a
+<a href="{@docRoot}tools/device.html#setting-up">USB debugging connection</a>.</p>
+
+<p>The Systrace tool can be run either from one of the Android SDK's graphical user interface
+tools, or from the command line. The following sections describe how to run the tool using either
+of these methods.</p>
+
+
+<h2 id="gui">User Interface</h2>
+
+<p>The Systrace tool can be run from the
+<a href="{@docRoot}tools/help/adt.html">Android Developer Tools</a> (ADT) in Eclipse,
+<a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>,
+or the Android <a href="{@docRoot}tools/help/monitor.html">Device Monitor</a>.
+
+<p>To run the Systrace user interface:</p>
+
+<div class="toggle-content closed">
+<p style="margin-top:5px"><a href="#" onclick="return toggleContent(this)">
+ <img src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
+ />Using Eclipse</a></p>
+
+ <div class="toggle-content-toggleme">
+ <ol>
+ <li>In Eclipse, open an Android application project.</li>
+ <li>Switch to the DDMS perspective, by selecting <strong>Window > Perspectives >
+ DDMS</strong>.</li>
+ <li>In the <strong>Devices</strong> tab, select the device on which to run a trace. If no
+ devices are listed, make sure your device is connected via USB cable and that debugging is
+ enabled on the device.</li>
+ <li>Click the Systrace icon <img src="{@docRoot}images/systrace/systrace-button.png"
+ style="margin:0"/> at the top of the <strong>Devices</strong> panel to configure tracing.</li>
+ <li>Set the tracing options and click <strong>OK</strong> to start the trace.</li>
+ </ol>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+<p style="margin-top:5px"><a href="#" onclick="return toggleContent(this)">
+ <img src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
+ />Using Android Studio</a></p>
+
+ <div class="toggle-content-toggleme">
+ <ol>
+ <li>In <a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>, open an
+ Android application project.</li>
+ <li>Open the Device Monitor by selecting <strong>Tools > Android > Monitor</strong>.</li>
+ <li>In the <strong>Devices</strong> tab, select the device on which to run a trace. If no
+ devices are listed, make sure your device is connected via USB cable and that debugging is
+ enabled on the device.</li>
+ <li>Click the Systrace icon <img src="{@docRoot}images/systrace/systrace-button.png"
+ style="margin:0"/> at the top of the <strong>Devices</strong> panel to configure tracing.</li>
+ <li>Set the tracing options and click <strong>OK</strong> to start the trace.</li>
+ </ol>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+<p style="margin-top:5px"><a href="#" onclick="return toggleContent(this)">
+ <img src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
+ />Using Device Monitor</a></p>
+
+ <div class="toggle-content-toggleme">
+ <ol>
+ <li>Navigate to your SDK {@code tools/} directory.</li>
+ <li>Run the {@code monitor} program.</li>
+ <li>In the <strong>Devices</strong> tab, select the device on which to run a trace. If no
+ devices are listed, make sure your device is connected via USB cable and that debugging is
+ enabled on the device.</li>
+ <li>Click the Systrace icon <img src="{@docRoot}images/systrace/systrace-button.png"
+ style="margin:0"/> at the top of the <strong>Devices</strong> panel to configure tracing.</li>
+ <li>Set the tracing options and click <strong>OK</strong> to start the trace.</li>
+ </ol>
+ </div>
+</div>
+
+
+
+<h2 id="options">Command Line Usage</h2>
+
+<p>The Systrace tool has different command line options for devices running Android 4.3 (API
+level 18) and higher versus devices running Android 4.2 (API level 17) and lower. The following
+sections describe the different command line options for each version.</p>
+
+<p>The general syntax for running Systrace from the command line is as follows.</p>
<pre>
-$> python systrace.py [options]
+$ python systrace.py [options] [category1] [category2] ... [categoryN]
</pre>
-<p>Here is an example execution run that sets trace tags and generates a trace from a connected
-Android device.</p>
+<p>See the sections below for example Systrace sessions.</p>
+
+
+<h3 id="options-4.3">Android 4.3 and higher options</h3>
+
+<p>When you use Systrace on devices running Android 4.3 and higher, you must specify at least one
+trace category tag. Here is an example execution run that sets trace tags and generates a trace
+from a connected device.</p>
<pre>
-$> cd <em>android-sdk</em>/tools/systrace
-$> python systrace.py --set-tags gfx,view,wm
-$> adb shell stop
-$> adb shell start
-$> python systrace.py --disk --time=10 -o mynewtrace.html
+$ cd <em>android-sdk</em>/platform-tools/systrace
+$ python systrace.py --time=10 -o mynewtrace.html sched gfx view wm
</pre>
+<p class="note">
+ <strong>Tip:</strong> If you want to see the names of tasks in the trace output, you <em>must</em>
+ include the {@code sched} category in your command parameters.
+</p>
+
+<p>The table below lists the Systrace command line options for devices running Android 4.3
+(API level 18) and higher.</p>
+
+<table>
+ <tr>
+ <th>Option</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td><nobr><code>-h, --help</code></nobr></td>
+
+ <td>Show the help message.</td>
+ </tr>
+
+ <tr>
+ <td><code>-o <<em>FILE</em>></code></td>
+
+ <td>Write the HTML trace report to the specified file.</td>
+ </tr>
+
+ <tr>
+ <td><code>-t N, --time=N</code></td>
+
+ <td>Trace activity for <em>N</em> seconds. The default value is 5 seconds.</td>
+ </tr>
+
+ <tr>
+ <td><code>-b N, --buf-size=N</code></td>
+
+ <td>Use a trace buffer size of <em>N</em> kilobytes. This option lets you limit the total size
+ of the data collected during a trace.</td>
+ </tr>
+
+ <tr>
+ <td><code>-k <<em>KFUNCS</em>><br>
+ --ktrace=<<em>KFUNCS</em>></code></td>
+
+ <td>Trace the activity of specific kernel functions, specified in a comma-separated list.</td>
+ </tr>
+
+ <tr>
+ <td><code>-l, --list-categories</code></td>
+
+ <td>List the available tracing category tags. The available tags are:
+
+ <ul>
+ <li><code>gfx</code> - Graphics</li>
+ <li><code>input</code> - Input</li>
+ <li><code>view</code> - View</li>
+ <li><code>webview</code> - WebView</li>
+ <li><code>wm</code> - Window Manager</li>
+ <li><code>am</code> - Activity Manager</li>
+ <li><code>audio</code> - Audio</li>
+ <li><code>video</code> - Video</li>
+ <li><code>camera</code> - Camera</li>
+ <li><code>hal</code> - Hardware Modules</li>
+ <li><code>res</code> - Resource Loading</li>
+ <li><code>dalvik</code> - Dalvik VM</li>
+ <li><code>rs</code> - RenderScript</li>
+ <li><code>sched</code> - CPU Scheduling</li>
+ <li><code>freq</code> - CPU Frequency</li>
+ <li><code>membus</code> - Memory Bus Utilization</li>
+ <li><code>idle</code> - CPU Idle</li>
+ <li><code>disk</code> - Disk input and output</li>
+ <li><code>load</code> - CPU Load</li>
+ <li><code>sync</code> - Synchronization Manager</li>
+ <li><code>workq</code> - Kernel Workqueues</li>
+ </ul>
+
+ <p class="note"><strong>Note:</strong> Some trace categories are not supported on all
+ devices.</p>
+
+ <p class="note"><strong>Tip:</strong> If you want to see the names of tasks in the trace
+ output, you <em>must</em> include the {@code sched} category in your command parameters.</p>
+
+ </td>
+ </tr>
+
+ <tr>
+ <td><code>-a <<em>APP_NAME</em>><br>
+ --app=<<em>APP_NAME</em>></code></td>
+
+ <td>Enable tracing for applications, specified as a comma-separated list of
+ <a href="{@docRoot}guide/topics/manifest/manifest-element.html#package">package names</a>.
+ The apps must contain tracing instrumentation calls from the {@link android.os.Trace} class.
+ For more information, see <a href="{@docRoot}tools/debugging/systrace.html#app-trace">Analyzing
+ Display and Performance</a>.
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td><code>--link-assets</code></td>
+
+ <td>Link to the original CSS or JavaScript resources instead of embedding them in the HTML
+ trace report.</td>
+ </tr>
+
+ <tr>
+ <td><code>--from-file=<<em>FROM_FILE</em>></code></td>
+
+ <td>Create the interactive Systrace report from a file, instead of running a live trace.</td>
+ </tr>
+
+ <tr>
+ <td><code>--asset-dir=<<em>ASSET_DIR</em>></code></td>
+
+ <td>Specify a directory for the trace report assets. This option is useful for maintaining a
+ single set of assets for multiple Systrace reports.</td>
+ </tr>
+
+ <tr>
+ <td style="white-space:nowrap">
+ <code>-e <<em>DEVICE_SERIAL</em>><br>
+ --serial=<<em>DEVICE_SERIAL</em>></code></td>
+ <td>Conduct the trace on a specific connected device, identified by its
+ <a href="{@docRoot}tools/help/adb.html#devicestatus">device serial number</a>.</td>
+ </tr>
-<h2 id="options">Options</h2>
+</table>
-<p>The table below lists the command line options for {@code systrace}.</p>
+
+<h3 id="options-pre-4.3">Android 4.2 and lower options</h3>
+
+<p>Using Systrace on the command line with devices running Android 4.2 and lower is typically a
+two-step process. You must first set the trace tags you want to capture and then run the trace.
+Here is an example execution run that sets trace tags and generates a trace from a connected
+device.</p>
+
+<pre>
+$ cd <em>android-sdk</em>/platform-tools/systrace
+$ python systrace.py --set-tags gfx,view,wm
+$ adb shell stop
+$ adb shell start
+$ python systrace.py --disk --time=10 -o mynewtrace.html
+</pre>
+
+<p>The table below lists the Systrace command line options for devices running Android 4.2
+(API level 17) and lower.</p>
<table>
<tr>
</tr>
<tr>
+ <td><nobr><code>-h, --help</code></nobr></td>
+
+ <td>Show the help message.</td>
+ </tr>
+
+ <tr>
<td><code>-o <<em>FILE</em>></code></td>
<td>Write the HTML trace report to the specified file.</td>
<tr>
<td><code>-t N, --time=N</code></td>
- <td>Trace activity for N seconds. Default value is 5 seconds.</td>
+ <td>Trace activity for <em>N</em> seconds. The default value is 5 seconds.</td>
</tr>
<tr>
<td><code>-b N, --buf-size=N</code></td>
- <td>Use a trace buffer size of N kilobytes. This option lets you limit the total size of the
- data collected during a trace.</td>
+ <td>Use a trace buffer size of <em>N</em> kilobytes. This option lets you limit the total size
+ of the data collected during a trace.</td>
</tr>
<tr>
</tr>
<tr>
+ <td><nobr><code>-u, --bus-utilization</code></nobr></td>
+
+ <td>Trace the bus utilization levels. This option requires root access on the device.</td>
+ </tr>
+
+ <tr>
<td><code>-w, --workqueue</code></td>
<td>Trace kernel work queues. This option requires root access on the device.</td>
<li><code>webview</code> - WebView</li>
<li><code>wm</code> - Window Manager</li>
<li><code>am</code> - Activity Manager</li>
- <li><code>sync</code> - Sync Manager</li>
+ <li><code>sync</code> - Synchronization Manager</li>
<li><code>audio</code> - Audio</li>
<li><code>video</code> - Video</li>
<li><code>camera</code> - Camera</li>
</ul>
<p class="note"><strong>Note:</strong> When setting trace tags from the command line, you
- must stop and restart the framework ({@code $> adb shell stop; adb shell start}) for the
+ must stop and restart the framework ({@code $ adb shell stop; adb shell start}) for the
tag tracing changes to take effect.</p>
</td>
</tr>
report.</td>
</tr>
- <tr>
- <td><nobr><code>-h, --help</code></nobr></td>
-
- <td>Show the help message.</td>
- </tr>
-
</table>
-<p>You can set the trace <a href="#tags">tags</a> for {@code systrace} with your device's user
-interface, by navigating to <strong>Settings > Developer options > Monitoring > Enable
-traces</strong>.</p>
+<p>You can set the trace <a href="#tags">tags</a> for Systrace on
+your Android 4.2 and lower device by navigating to <strong>Settings > Developer options >
+Monitoring > Enable traces</strong>.</p>
<h2 id="viewing-options">Trace Viewing Shortcuts</h2>
-<p>The table below lists the keyboard shortcuts that are available while viewing a {@code systrace}
+<p>The table below lists the keyboard shortcuts that are available while viewing a Systrace
trace HTML report.</p>
<table>
+excludeFromSuggestions=true
@jd:body
<script type="text/javascript">
sdk.redirect=true
page.template=sdk
+excludeFromSuggestions=true
@jd:body
+excludeFromSuggestions=true
@jd:body
<script type="text/javascript">
+excludeFromSuggestions=true
@jd:body
<script type="text/javascript">
+excludeFromSuggestions=true
@jd:body
<script type="text/javascript">
<li><a href="<?cs var:toroot ?>tools/debugging/improving-w-lint.html"><span class="en">Improving Your Code with lint</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-ui.html"><span class="en">Optimizing your UI</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-tracing.html"><span class="en">Profiling with Traceview and dmtracedump</span></a></li>
- <li><a href="<?cs var:toroot ?>tools/debugging/systrace.html"><span class="en">Analysing Display and Performance with Systrace</span></a></li>
+ <li><a href="<?cs var:toroot ?>tools/debugging/systrace.html"><span class="en">Analyzing Display and Performance</span></a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-memory.html">Investigating Your RAM Usage</a></li>
<li><a href="<?cs var:toroot ?>tools/debugging/debugging-devtools.html"><span class="en">Using the Dev Tools App</span></a></li>
</ul>
<li><a href="{@docRoot}guide/topics/connectivity/wifip2p.html">Wi-Fi P2P</a></li>
</ul>
-
</div>
</div>
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=oi_ARV_I8Dc">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Network Service Discovery</p>
+</div>
+</a>
+
<p>Besides enabling communication with the cloud, Android's wireless APIs also
enable communication with other devices on the same local network, and even
</div>
</div>
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=rsQet4nBVi8">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Bitmap Allocation</p>
+</div>
+</a>
+
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=pMRnGDR6Cu0">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Making Apps Beautiful - Part 4 - Performance Tuning</p>
+</div>
+</a>
+
<p>Learn how to use common techniques to process and load {@link
android.graphics.Bitmap} objects in a way that keeps your user interface (UI) components responsive
and avoids exceeding your application memory limit. If you're not careful, bitmaps can quickly
get created once and then cached for later use.</p>
<pre>
-public Triangle() {
+public class Triangle() {
...
int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);
{@link android.opengl.GLSurfaceView} as its primary view:</p>
<pre>
-public class OpenGLES20 extends Activity {
+public class OpenGLES20Activity extends Activity {
private GLSurfaceView mGLView;
gray background in the {@link android.opengl.GLSurfaceView}:</p>
<pre>
-public class MyGL20Renderer implements GLSurfaceView.Renderer {
+public class MyGLRenderer implements GLSurfaceView.Renderer {
public void onSurfaceCreated(GL10 unused, EGLConfig config) {
// Set the background frame color
- GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+ GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
}
public void onDrawFrame(GL10 unused) {
private float[] mRotationMatrix = new float[16];
public void onDrawFrame(GL10 gl) {
...
+ float[] scratch = new float[16];
+
// Create a rotation transformation for the triangle
long time = SystemClock.uptimeMillis() % 4000L;
float angle = 0.090f * ((int) time);
Matrix.setRotateM(mRotationMatrix, 0, angle, 0, 0, -1.0f);
// Combine the rotation matrix with the projection and camera view
- Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0);
+ // Note that the mMVPMatrix factor *must be first* in order
+ // for the matrix multiplication product to be correct.
+ Matrix.multiplyMM(scratch, 0, mMVPMatrix, 0, mRotationMatrix, 0);
// Draw triangle
- mTriangle.draw(mMVPMatrix);
+ mTriangle.draw(scratch);
}
</pre>
<pre>
public MyGLSurfaceView(Context context) {
...
- // Render the view only when there is a change in the drawing data
- //setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // comment out for auto-rotation
+ // Render the view only when there is a change in the drawing data.
+ // To allow the triangle to rotate automatically, this line is commented out:
+ <strong>//setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);</strong>
}
</pre>
// this projection matrix is applied to object coordinates
// in the onDrawFrame() method
- Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
+ Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);
}
</pre>
-<p>This code populates a projection matrix, {@code mProjMatrix} which you can then combine with a
-camera view transformation in the {@link android.opengl.GLSurfaceView.Renderer#onDrawFrame
+<p>This code populates a projection matrix, {@code mProjectionMatrix} which you can then combine
+with a camera view transformation in the {@link android.opengl.GLSurfaceView.Renderer#onDrawFrame
onDrawFrame()} method, which is shown in the next section.</p>
<p class="note"><strong>Note:</strong> Just applying a projection transformation to your
@Override
public void onDrawFrame(GL10 unused) {
...
-
// Set the camera position (View matrix)
- Matrix.setLookAtM(mVMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
+ Matrix.setLookAtM(mViewMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);
// Calculate the projection and view transformation
- Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
+ Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mViewMatrix, 0);
// Draw shape
mTriangle.draw(mMVPMatrix);
// get handle to shape's transformation matrix
mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
- // Apply the projection and view transformation
+ // Pass the projection and view transformation to the shader
GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);
// Draw the triangle
}
</pre>
-<p>Once you have correctly calulated and applied the projection and camera view transformations,
+<p>Once you have correctly calculated and applied the projection and camera view transformations,
your graphic objects are drawn in correct proportions and should look like this:</p>
OpenGL ES graphics pipeline for processing.</p>
<pre>
-class Triangle {
+public class Triangle {
private FloatBuffer vertexBuffer;
// number of coordinates per vertex in this array
static final int COORDS_PER_VERTEX = 3;
- static float triangleCoords[] = { // in counterclockwise order:
- 0.0f, 0.622008459f, 0.0f, // top
- -0.5f, -0.311004243f, 0.0f, // bottom left
- 0.5f, -0.311004243f, 0.0f // bottom right
+ static float triangleCoords[] = { // in counterclockwise order:
+ 0.0f, 0.622008459f, 0.0f, // top
+ -0.5f, -0.311004243f, 0.0f, // bottom left
+ 0.5f, -0.311004243f, 0.0f // bottom right
};
// Set color with red, green, blue and alpha (opacity) values
OpenGL ES graphics pipeline how to draw these vertices. Here’s the code for this shape:</p>
<pre>
-class Square {
+public class Square {
private FloatBuffer vertexBuffer;
private ShortBuffer drawListBuffer;
// number of coordinates per vertex in this array
static final int COORDS_PER_VERTEX = 3;
- static float squareCoords[] = { -0.5f, 0.5f, 0.0f, // top left
- -0.5f, -0.5f, 0.0f, // bottom left
- 0.5f, -0.5f, 0.0f, // bottom right
- 0.5f, 0.5f, 0.0f }; // top right
+ static float squareCoords[] = {
+ -0.5f, 0.5f, 0.0f, // top left
+ -0.5f, -0.5f, 0.0f, // bottom left
+ 0.5f, -0.5f, 0.0f, // bottom right
+ 0.5f, 0.5f, 0.0f }; // top right
private short drawOrder[] = { 0, 1, 2, 0, 2, 3 }; // order to draw vertices
dy = dy * -1 ;
}
- mRenderer.mAngle += (dx + dy) * TOUCH_SCALE_FACTOR; // = 180.0f / 320
+ mRenderer.setAngle(
+ mRenderer.getAngle() +
+ ((dx + dy) * TOUCH_SCALE_FACTOR); // = 180.0f / 320
requestRender();
}
<pre>
public void onDrawFrame(GL10 gl) {
...
+ float[] scratch = new float[16];
+
// Create a rotation for the triangle
// long time = SystemClock.uptimeMillis() % 4000L;
// float angle = 0.090f * ((int) time);
<strong>Matrix.setRotateM(mRotationMatrix, 0, mAngle, 0, 0, -1.0f);</strong>
// Combine the rotation matrix with the projection and camera view
- Matrix.multiplyMM(mMVPMatrix, 0, mRotationMatrix, 0, mMVPMatrix, 0);
+ // Note that the mMVPMatrix factor *must be first* in order
+ // for the matrix multiplication product to be correct.
+ Matrix.multiplyMM(scratch, 0, mMVPMatrix, 0, mRotationMatrix, 0);
// Draw triangle
- mTriangle.draw(mMVPMatrix);
+ mTriangle.draw(scratch);
}
</pre>
</div>
</div>
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=-FUw8HMbmBQ">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Optimising Layouts with Hierarchy Viewer</p>
+</div>
+</a>
+
<p>Layouts are a key part of Android applications that directly affect the user experience. If
+excludeFromSuggestions=true
page.title=Notepad Tutorial
parent.title=Tutorials
@jd:body
+excludeFromSuggestions=true
page.title=Notepad Exercise 1
parent.title=Notepad Tutorial
parent.link=index.html
-Rpage.title=Notepad Exercise 2
+excludeFromSuggestions=true
+page.title=Notepad Exercise 2
parent.title=Notepad Tutorial
parent.link=index.html
@jd:body
+excludeFromSuggestions=true
page.title=Notepad Exercise 3
parent.title=Notepad Tutorial
parent.link=index.html
+excludeFromSuggestions=true
page.title=Notepad Extra Credit
parent.title=Notepad Tutorial
parent.link=index.html
+excludeFromSuggestions=true
page.title=Notepad Tutorial
@jd:body
</div>
</div>
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=Iub67ic87KI">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Android 4.4 Printing API</p>
+</div>
+</a>
+
<p>
Android users frequently view content solely on their devices, but there are times when
showing someone a screen is not an adequate way to share information. Being able to print
</div>
</div>
+
+<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=zsRnRLh-O34">
+<div>
+ <h3>Video</h3>
+ <p>DevBytes: Design for Large Displays - Part 1</p>
+</div>
+</a>
+
<p>
Smart TVs powered by Android bring your favorite Android apps to the best screen in your house.
Thousands of apps in the Google Play Store are already optimized for TVs. This class shows how
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
throw new IndexOutOfBoundsException();
}
native_drawText(mNativeCanvas, text, index, count, x, y, paint.mBidiFlags,
- paint.mNativePaint);
+ paint.mNativePaint, paint.mNativeTypeface);
}
/**
*/
public void drawText(String text, float x, float y, Paint paint) {
native_drawText(mNativeCanvas, text, 0, text.length(), x, y, paint.mBidiFlags,
- paint.mNativePaint);
+ paint.mNativePaint, paint.mNativeTypeface);
}
/**
throw new IndexOutOfBoundsException();
}
native_drawText(mNativeCanvas, text, start, end, x, y, paint.mBidiFlags,
- paint.mNativePaint);
+ paint.mNativePaint, paint.mNativeTypeface);
}
/**
if (text instanceof String || text instanceof SpannedString ||
text instanceof SpannableString) {
native_drawText(mNativeCanvas, text.toString(), start, end, x, y,
- paint.mBidiFlags, paint.mNativePaint);
+ paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
} else if (text instanceof GraphicsOperations) {
((GraphicsOperations) text).drawText(this, start, end, x, y,
paint);
char[] buf = TemporaryBuffer.obtain(end - start);
TextUtils.getChars(text, start, end, buf, 0);
native_drawText(mNativeCanvas, buf, 0, end - start, x, y,
- paint.mBidiFlags, paint.mNativePaint);
+ paint.mBidiFlags, paint.mNativePaint, paint.mNativeTypeface);
TemporaryBuffer.recycle(buf);
}
}
}
native_drawTextRun(mNativeCanvas, text, index, count,
- contextIndex, contextCount, x, y, dir, paint.mNativePaint);
+ contextIndex, contextCount, x, y, dir, paint.mNativePaint, paint.mNativeTypeface);
}
/**
if (text instanceof String || text instanceof SpannedString ||
text instanceof SpannableString) {
native_drawTextRun(mNativeCanvas, text.toString(), start, end,
- contextStart, contextEnd, x, y, flags, paint.mNativePaint);
+ contextStart, contextEnd, x, y, flags, paint.mNativePaint, paint.mNativeTypeface);
} else if (text instanceof GraphicsOperations) {
((GraphicsOperations) text).drawTextRun(this, start, end,
contextStart, contextEnd, x, y, flags, paint);
char[] buf = TemporaryBuffer.obtain(contextLen);
TextUtils.getChars(text, contextStart, contextEnd, buf, 0);
native_drawTextRun(mNativeCanvas, buf, start - contextStart, len,
- 0, contextLen, x, y, flags, paint.mNativePaint);
+ 0, contextLen, x, y, flags, paint.mNativePaint, paint.mNativeTypeface);
TemporaryBuffer.recycle(buf);
}
}
private static native void native_drawText(int nativeCanvas, char[] text,
int index, int count, float x,
- float y, int flags, int paint);
+ float y, int flags, int paint, int typeface);
private static native void native_drawText(int nativeCanvas, String text,
int start, int end, float x,
- float y, int flags, int paint);
+ float y, int flags, int paint, int typeface);
private static native void native_drawTextRun(int nativeCanvas, String text,
int start, int end, int contextStart, int contextEnd,
- float x, float y, int flags, int paint);
+ float x, float y, int flags, int paint, int typeface);
private static native void native_drawTextRun(int nativeCanvas, char[] text,
int start, int count, int contextStart, int contextCount,
- float x, float y, int flags, int paint);
+ float x, float y, int flags, int paint, int typeface);
private static native void native_drawPosText(int nativeCanvas,
char[] text, int index,
package android.graphics;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.DisplayMetrics;
-
-import java.io.OutputStream;
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.nio.ShortBuffer;
-
/**
* LargeBitmap can be used to decode a rectangle region from an image.
* LargeBimap is particularly useful when an original image is large and
* @hide
*/
public int mNativePaint;
+ /**
+ * @hide
+ */
+ public int mNativeTypeface;
private ColorFilter mColorFilter;
private MaskFilter mMaskFilter;
mRasterizer = null;
mShader = null;
mTypeface = null;
+ mNativeTypeface = 0;
mXfermode = null;
mHasCompatScaling = false;
mShader = null;
}
mTypeface = paint.mTypeface;
+ mNativeTypeface = paint.mNativeTypeface;
mXfermode = paint.mXfermode;
mHasCompatScaling = paint.mHasCompatScaling;
}
native_setTypeface(mNativePaint, typefaceNative);
mTypeface = typeface;
+ mNativeTypeface = typefaceNative;
return typeface;
}
return mNativePath;
}
+ /**
+ * Approximate the <code>Path</code> with a series of line segments.
+ * This returns float[] with the array containing point components.
+ * There are three components for each point, in order:
+ * <ul>
+ * <li>Fraction along the length of the path that the point resides</li>
+ * <li>The x coordinate of the point</li>
+ * <li>The y coordinate of the point</li>
+ * </ul>
+ * <p>Two points may share the same fraction along its length when there is
+ * a move action within the Path.</p>
+ *
+ * @param acceptableError The acceptable error for a line on the
+ * Path. Typically this would be 0.5 so that
+ * the error is less than half a pixel.
+ * @return An array of components for points approximating the Path.
+ * @hide
+ */
+ public float[] approximate(float acceptableError) {
+ return native_approximate(mNativePath, acceptableError);
+ }
+
private static native int init1();
private static native int init2(int nPath);
private static native void native_reset(int nPath);
private static native void native_transform(int nPath, int matrix);
private static native boolean native_op(int path1, int path2, int op, int result);
private static native void finalizer(int nPath);
+ private static native float[] native_approximate(int nPath, float error);
}
private static final SparseArray<SparseArray<Typeface>> sTypefaceCache =
new SparseArray<SparseArray<Typeface>>(3);
- int native_instance;
+ /**
+ * @hide
+ */
+ public int native_instance;
// Style
public static final int NORMAL = 0;
public class AnimationDrawable extends DrawableContainer implements Runnable, Animatable {
private final AnimationState mAnimationState;
private int mCurFrame = -1;
+ private boolean mAnimating;
private boolean mMutated;
public AnimationDrawable() {
* @return true if the animation is running, false otherwise
*/
public boolean isRunning() {
- return mCurFrame > -1;
+ return mAnimating;
}
/**
@Override
public void unscheduleSelf(Runnable what) {
mCurFrame = -1;
+ mAnimating = false;
super.unscheduleSelf(what);
}
}
mCurFrame = frame;
selectDrawable(frame);
- if (unschedule) {
+ if (unschedule || animate) {
unscheduleSelf(this);
}
if (animate) {
- // Unscheduling may have clobbered this value; restore it to record that we're animating
+ // Unscheduling may have clobbered these values; restore them
mCurFrame = frame;
+ mAnimating = true;
scheduleSelf(this, SystemClock.uptimeMillis() + mAnimationState.mDurations[frame]);
}
}
package android.graphics.drawable;
-import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
-import android.graphics.Matrix;
-import android.graphics.Matrix.ScaleToFit;
import android.graphics.drawable.Drawable;
import android.graphics.Picture;
import android.graphics.PixelFormat;
import android.graphics.Rect;
-import android.view.Gravity;
/**
* Drawable subclass that wraps a Picture, allowing the picture to be used
import android.graphics.Canvas;
import android.graphics.Paint;
-import android.graphics.RectF;
/**
* Creates an arc shape. The arc shape starts at a specified
package android.renderscript;
-import java.io.IOException;
-import java.io.InputStream;
import java.util.HashMap;
import android.content.res.Resources;
-import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.Surface;
import android.util.Log;
-import android.util.TypedValue;
import android.graphics.Canvas;
import android.os.Trace;
int mCurrentDimY;
int mCurrentDimZ;
int mCurrentCount;
- static HashMap<Integer, Allocation> mAllocationMap =
- new HashMap<Integer, Allocation>();
+ static HashMap<Long, Allocation> mAllocationMap =
+ new HashMap<Long, Allocation>();
OnBufferAvailableListener mBufferNotifier;
+ private Element.DataType validateObjectIsPrimitiveArray(Object d, boolean checkType) {
+ final Class c = d.getClass();
+ if (!c.isArray()) {
+ throw new RSIllegalArgumentException("Object passed is not an array of primitives.");
+ }
+ final Class cmp = c.getComponentType();
+ if (!cmp.isPrimitive()) {
+ throw new RSIllegalArgumentException("Object passed is not an Array of primitives.");
+ }
+
+ if (cmp == Long.TYPE) {
+ if (checkType) {
+ validateIsInt64();
+ return mType.mElement.mType;
+ }
+ return Element.DataType.SIGNED_64;
+ }
+
+ if (cmp == Integer.TYPE) {
+ if (checkType) {
+ validateIsInt32();
+ return mType.mElement.mType;
+ }
+ return Element.DataType.SIGNED_32;
+ }
+
+ if (cmp == Short.TYPE) {
+ if (checkType) {
+ validateIsInt16();
+ return mType.mElement.mType;
+ }
+ return Element.DataType.SIGNED_16;
+ }
+
+ if (cmp == Byte.TYPE) {
+ if (checkType) {
+ validateIsInt8();
+ return mType.mElement.mType;
+ }
+ return Element.DataType.SIGNED_8;
+ }
+
+ if (cmp == Float.TYPE) {
+ if (checkType) {
+ validateIsFloat32();
+ }
+ return Element.DataType.FLOAT_32;
+ }
+
+ if (cmp == Double.TYPE) {
+ if (checkType) {
+ validateIsFloat64();
+ }
+ return Element.DataType.FLOAT_64;
+ }
+ return null;
+ }
+
+
/**
* The usage of the Allocation. These signal to RenderScript where to place
* the Allocation in memory.
}
- private int getIDSafe() {
+ private long getIDSafe() {
if (mAdaptedAllocation != null) {
return mAdaptedAllocation.getID(mRS);
}
mBitmap = b;
}
- Allocation(int id, RenderScript rs, Type t, int usage) {
+ Allocation(long id, RenderScript rs, Type t, int usage) {
super(id, rs);
if ((usage & ~(USAGE_SCRIPT |
USAGE_GRAPHICS_TEXTURE |
super.finalize();
}
+ private void validateIsInt64() {
+ if ((mType.mElement.mType == Element.DataType.SIGNED_64) ||
+ (mType.mElement.mType == Element.DataType.UNSIGNED_64)) {
+ return;
+ }
+ throw new RSIllegalArgumentException(
+ "64 bit integer source does not match allocation type " + mType.mElement.mType);
+ }
+
private void validateIsInt32() {
if ((mType.mElement.mType == Element.DataType.SIGNED_32) ||
(mType.mElement.mType == Element.DataType.UNSIGNED_32)) {
"32 bit float source does not match allocation type " + mType.mElement.mType);
}
+ private void validateIsFloat64() {
+ if (mType.mElement.mType == Element.DataType.FLOAT_64) {
+ return;
+ }
+ throw new RSIllegalArgumentException(
+ "64 bit float source does not match allocation type " + mType.mElement.mType);
+ }
+
private void validateIsObject() {
if ((mType.mElement.mType == Element.DataType.RS_ELEMENT) ||
(mType.mElement.mType == Element.DataType.RS_TYPE) ||
@Override
void updateFromNative() {
super.updateFromNative();
- int typeID = mRS.nAllocationGetType(getID(mRS));
+ long typeID = mRS.nAllocationGetType(getID(mRS));
if(typeID != 0) {
mType = new Type(typeID, mRS);
mType.updateFromNative();
throw new RSIllegalArgumentException("Array size mismatch, allocation sizeX = " +
mCurrentCount + ", array length = " + d.length);
}
+ // FIXME: requires 64-bit path
+
int i[] = new int[d.length];
for (int ct=0; ct < d.length; ct++) {
- i[ct] = d[ct].getID(mRS);
+ i[ct] = (int)d[ct].getID(mRS);
}
copy1DRangeFromUnchecked(0, mCurrentCount, i);
Trace.traceEnd(RenderScript.TRACE_TAG);
}
}
+ private void copyFromUnchecked(Object array, Element.DataType dt, int arrayLen) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copyFromUnchecked");
+ mRS.validate();
+ if (mCurrentDimZ > 0) {
+ copy3DRangeFromUnchecked(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, array, dt, arrayLen);
+ } else if (mCurrentDimY > 0) {
+ copy2DRangeFromUnchecked(0, 0, mCurrentDimX, mCurrentDimY, array, dt, arrayLen);
+ } else {
+ copy1DRangeFromUnchecked(0, mCurrentCount, array, dt, arrayLen);
+ }
+ Trace.traceEnd(RenderScript.TRACE_TAG);
+ }
+
/**
* Copy into this Allocation from an array. This method does not guarantee
* that the Allocation is compatible with the input buffer; it copies memory
* without reinterpretation.
*
- * @param d the source data array
+ * @param array The source data array
*/
- public void copyFromUnchecked(int[] d) {
+ public void copyFromUnchecked(Object array) {
Trace.traceBegin(RenderScript.TRACE_TAG, "copyFromUnchecked");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFromUnchecked(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFromUnchecked(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFromUnchecked(0, mCurrentCount, d);
- }
+ copyFromUnchecked(array, validateObjectIsPrimitiveArray(array, false),
+ java.lang.reflect.Array.getLength(array));
Trace.traceEnd(RenderScript.TRACE_TAG);
}
*
* @param d the source data array
*/
+ public void copyFromUnchecked(int[] d) {
+ copyFromUnchecked(d, Element.DataType.SIGNED_32, d.length);
+ }
+
+ /**
+ * Copy into this Allocation from an array. This method does not guarantee
+ * that the Allocation is compatible with the input buffer; it copies memory
+ * without reinterpretation.
+ *
+ * @param d the source data array
+ */
public void copyFromUnchecked(short[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFromUnchecked");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFromUnchecked(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFromUnchecked(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFromUnchecked(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyFromUnchecked(d, Element.DataType.SIGNED_16, d.length);
}
/**
* @param d the source data array
*/
public void copyFromUnchecked(byte[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFromUnchecked");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFromUnchecked(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFromUnchecked(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFromUnchecked(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyFromUnchecked(d, Element.DataType.SIGNED_8, d.length);
}
/**
* @param d the source data array
*/
public void copyFromUnchecked(float[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFromUnchecked");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFromUnchecked(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFromUnchecked(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFromUnchecked(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyFromUnchecked(d, Element.DataType.FLOAT_32, d.length);
}
/**
* Copy into this Allocation from an array. This variant is type checked
* and will generate exceptions if the Allocation's {@link
- * android.renderscript.Element} is not a 32 bit integer type.
+ * android.renderscript.Element} does not match the array's
+ * primitive type.
*
* @param d the source data array
*/
- public void copyFrom(int[] d) {
+ public void copyFrom(Object array) {
Trace.traceBegin(RenderScript.TRACE_TAG, "copyFrom");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFrom(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFrom(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFrom(0, mCurrentCount, d);
- }
+ copyFromUnchecked(array, validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
Trace.traceEnd(RenderScript.TRACE_TAG);
}
/**
* Copy into this Allocation from an array. This variant is type checked
* and will generate exceptions if the Allocation's {@link
+ * android.renderscript.Element} is not a 32 bit integer type.
+ *
+ * @param d the source data array
+ */
+ public void copyFrom(int[] d) {
+ validateIsInt32();
+ copyFromUnchecked(d, Element.DataType.SIGNED_32, d.length);
+ }
+
+ /**
+ * Copy into this Allocation from an array. This variant is type checked
+ * and will generate exceptions if the Allocation's {@link
* android.renderscript.Element} is not a 16 bit integer type.
*
* @param d the source data array
*/
public void copyFrom(short[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFrom");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFrom(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFrom(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFrom(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ validateIsInt16();
+ copyFromUnchecked(d, Element.DataType.SIGNED_16, d.length);
}
/**
* @param d the source data array
*/
public void copyFrom(byte[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFrom");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFrom(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFrom(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFrom(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ validateIsInt8();
+ copyFromUnchecked(d, Element.DataType.SIGNED_8, d.length);
}
/**
* @param d the source data array
*/
public void copyFrom(float[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyFrom");
- mRS.validate();
- if (mCurrentDimZ > 0) {
- copy3DRangeFrom(0, 0, 0, mCurrentDimX, mCurrentDimY, mCurrentDimZ, d);
- } else if (mCurrentDimY > 0) {
- copy2DRangeFrom(0, 0, mCurrentDimX, mCurrentDimY, d);
- } else {
- copy1DRangeFrom(0, mCurrentCount, d);
- }
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ validateIsFloat32();
+ copyFromUnchecked(d, Element.DataType.FLOAT_32, d.length);
}
/**
mRS.nAllocationGenerateMipmaps(getID(mRS));
}
+ private void copy1DRangeFromUnchecked(int off, int count, Object array,
+ Element.DataType dt, int arrayLen) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFromUnchecked");
+ final int dataSize = mType.mElement.getBytesSize() * count;
+ data1DChecks(off, count, arrayLen * dt.mSize, dataSize);
+ mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, array, dataSize, dt);
+ Trace.traceEnd(RenderScript.TRACE_TAG);
+ }
+
+ /**
+ * Copy an array into part of this Allocation. This method does not
+ * guarantee that the Allocation is compatible with the input buffer.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param array The source data array
+ */
+ public void copy1DRangeFromUnchecked(int off, int count, Object array) {
+ copy1DRangeFromUnchecked(off, count, array,
+ validateObjectIsPrimitiveArray(array, false),
+ java.lang.reflect.Array.getLength(array));
+ }
+
/**
* Copy an array into part of this Allocation. This method does not
* guarantee that the Allocation is compatible with the input buffer.
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, int[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFromUnchecked");
- int dataSize = mType.mElement.getBytesSize() * count;
- data1DChecks(off, count, d.length * 4, dataSize);
- mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize, Element.DataType.SIGNED_32);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, (Object)d, Element.DataType.SIGNED_32, d.length);
}
/**
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, short[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFromUnchecked");
- int dataSize = mType.mElement.getBytesSize() * count;
- data1DChecks(off, count, d.length * 2, dataSize);
- mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize, Element.DataType.SIGNED_16);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, (Object)d, Element.DataType.SIGNED_16, d.length);
}
/**
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, byte[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFromUnchecked");
- int dataSize = mType.mElement.getBytesSize() * count;
- data1DChecks(off, count, d.length, dataSize);
- mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize, Element.DataType.SIGNED_8);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, (Object)d, Element.DataType.SIGNED_8, d.length);
}
/**
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, float[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFromUnchecked");
- int dataSize = mType.mElement.getBytesSize() * count;
- data1DChecks(off, count, d.length * 4, dataSize);
- mRS.nAllocationData1D(getIDSafe(), off, mSelectedLOD, count, d, dataSize, Element.DataType.FLOAT_32);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, (Object)d, Element.DataType.FLOAT_32, d.length);
+ }
+
+
+ /**
+ * Copy an array into part of this Allocation. This variant is type checked
+ * and will generate exceptions if the Allocation type does not
+ * match the component type of the array passed in.
+ *
+ * @param off The offset of the first element to be copied.
+ * @param count The number of elements to be copied.
+ * @param array The source data array.
+ */
+ public void copy1DRangeFrom(int off, int count, Object array) {
+ copy1DRangeFromUnchecked(off, count, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
}
/**
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, int[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFrom");
validateIsInt32();
- copy1DRangeFromUnchecked(off, count, d);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, d, Element.DataType.SIGNED_32, d.length);
}
/**
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, short[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFrom");
validateIsInt16();
- copy1DRangeFromUnchecked(off, count, d);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, d, Element.DataType.SIGNED_16, d.length);
}
/**
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, byte[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFrom");
validateIsInt8();
- copy1DRangeFromUnchecked(off, count, d);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, d, Element.DataType.SIGNED_8, d.length);
}
/**
* @param d the source data array.
*/
public void copy1DRangeFrom(int off, int count, float[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy1DRangeFrom");
validateIsFloat32();
- copy1DRangeFromUnchecked(off, count, d);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy1DRangeFromUnchecked(off, count, d, Element.DataType.FLOAT_32, d.length);
}
+
/**
* Copy part of an Allocation into this Allocation.
*
}
}
- void copy2DRangeFromUnchecked(int xoff, int yoff, int w, int h, byte[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFromUnchecked");
- mRS.validate();
- validate2DRange(xoff, yoff, w, h);
- mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID,
- w, h, data, data.length, Element.DataType.SIGNED_8);
- Trace.traceEnd(RenderScript.TRACE_TAG);
- }
-
- void copy2DRangeFromUnchecked(int xoff, int yoff, int w, int h, short[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFromUnchecked");
- mRS.validate();
- validate2DRange(xoff, yoff, w, h);
- mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID,
- w, h, data, data.length * 2, Element.DataType.SIGNED_16);
- Trace.traceEnd(RenderScript.TRACE_TAG);
- }
-
- void copy2DRangeFromUnchecked(int xoff, int yoff, int w, int h, int[] data) {
+ void copy2DRangeFromUnchecked(int xoff, int yoff, int w, int h, Object array,
+ Element.DataType dt, int arrayLen) {
Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFromUnchecked");
mRS.validate();
validate2DRange(xoff, yoff, w, h);
- mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID,
- w, h, data, data.length * 4, Element.DataType.SIGNED_32);
+ mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID, w, h,
+ array, arrayLen * dt.mSize, dt);
Trace.traceEnd(RenderScript.TRACE_TAG);
}
- void copy2DRangeFromUnchecked(int xoff, int yoff, int w, int h, float[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFromUnchecked");
- mRS.validate();
- validate2DRange(xoff, yoff, w, h);
- mRS.nAllocationData2D(getIDSafe(), xoff, yoff, mSelectedLOD, mSelectedFace.mID,
- w, h, data, data.length * 4, Element.DataType.FLOAT_32);
+ /**
+ * Copy from an array into a rectangular region in this Allocation. The
+ * array is assumed to be tightly packed.
+ *
+ * @param xoff X offset of the region to update in this Allocation
+ * @param yoff Y offset of the region to update in this Allocation
+ * @param w Width of the region to update
+ * @param h Height of the region to update
+ * @param data to be placed into the Allocation
+ */
+ public void copy2DRangeFrom(int xoff, int yoff, int w, int h, Object array) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
+ copy2DRangeFromUnchecked(xoff, yoff, w, h, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
Trace.traceEnd(RenderScript.TRACE_TAG);
}
* @param data to be placed into the Allocation
*/
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, byte[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
validateIsInt8();
- copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy2DRangeFromUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_8, data.length);
}
/**
* @param data to be placed into the Allocation
*/
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, short[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
validateIsInt16();
- copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy2DRangeFromUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_16, data.length);
}
/**
* @param data to be placed into the Allocation
*/
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, int[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
validateIsInt32();
- copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy2DRangeFromUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.SIGNED_32, data.length);
}
/**
* @param data to be placed into the Allocation
*/
public void copy2DRangeFrom(int xoff, int yoff, int w, int h, float[] data) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copy2DRangeFrom");
validateIsFloat32();
- copy2DRangeFromUnchecked(xoff, yoff, w, h, data);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copy2DRangeFromUnchecked(xoff, yoff, w, h, data,
+ Element.DataType.FLOAT_32, data.length);
}
/**
* @hide
*
*/
- void copy3DRangeFromUnchecked(int xoff, int yoff, int zoff, int w, int h, int d, byte[] data) {
+ private void copy3DRangeFromUnchecked(int xoff, int yoff, int zoff, int w, int h, int d,
+ Object array, Element.DataType dt, int arrayLen) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copy3DRangeFromUnchecked");
mRS.validate();
validate3DRange(xoff, yoff, zoff, w, h, d);
- mRS.nAllocationData3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
- w, h, d, data, data.length, Element.DataType.SIGNED_8);
- }
-
- /**
- * @hide
- *
- */
- void copy3DRangeFromUnchecked(int xoff, int yoff, int zoff, int w, int h, int d, short[] data) {
- mRS.validate();
- validate3DRange(xoff, yoff, zoff, w, h, d);
- mRS.nAllocationData3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
- w, h, d, data, data.length * 2, Element.DataType.SIGNED_16);
- }
-
- /**
- * @hide
- *
- */
- void copy3DRangeFromUnchecked(int xoff, int yoff, int zoff, int w, int h, int d, int[] data) {
- mRS.validate();
- validate3DRange(xoff, yoff, zoff, w, h, d);
- mRS.nAllocationData3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
- w, h, d, data, data.length * 4, Element.DataType.SIGNED_32);
- }
-
- /**
- * @hide
- *
- */
- void copy3DRangeFromUnchecked(int xoff, int yoff, int zoff, int w, int h, int d, float[] data) {
- mRS.validate();
- validate3DRange(xoff, yoff, zoff, w, h, d);
- mRS.nAllocationData3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD,
- w, h, d, data, data.length * 4, Element.DataType.FLOAT_32);
+ mRS.nAllocationData3D(getIDSafe(), xoff, yoff, zoff, mSelectedLOD, w, h, d,
+ array, arrayLen * dt.mSize, dt);
+ Trace.traceEnd(RenderScript.TRACE_TAG);
}
-
/**
* @hide
* Copy a rectangular region from the array into the allocation.
* @param d Depth of the region to update
* @param data to be placed into the allocation
*/
- public void copy3DRangeFrom(int xoff, int yoff, int zoff, int w, int h, int d, byte[] data) {
- validateIsInt8();
- copy3DRangeFromUnchecked(xoff, yoff, zoff, w, h, d, data);
- }
-
- /**
- * @hide
- *
- */
- public void copy3DRangeFrom(int xoff, int yoff, int zoff, int w, int h, int d, short[] data) {
- validateIsInt16();
- copy3DRangeFromUnchecked(xoff, yoff, zoff, w, h, d, data);
- }
-
- /**
- * @hide
- *
- */
- public void copy3DRangeFrom(int xoff, int yoff, int zoff, int w, int h, int d, int[] data) {
- validateIsInt32();
- copy3DRangeFromUnchecked(xoff, yoff, zoff, w, h, d, data);
- }
-
- /**
- * @hide
- *
- */
- public void copy3DRangeFrom(int xoff, int yoff, int zoff, int w, int h, int d, float[] data) {
- validateIsFloat32();
- copy3DRangeFromUnchecked(xoff, yoff, zoff, w, h, d, data);
+ public void copy3DRangeFrom(int xoff, int yoff, int zoff, int w, int h, int d, Object array) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copy3DRangeFrom");
+ copy3DRangeFromUnchecked(xoff, yoff, zoff, w, h, d, array,
+ validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
+ Trace.traceEnd(RenderScript.TRACE_TAG);
}
/**
Trace.traceEnd(RenderScript.TRACE_TAG);
}
+ private void copyTo(Object array, Element.DataType dt, int arrayLen) {
+ Trace.traceBegin(RenderScript.TRACE_TAG, "copyTo");
+ mRS.validate();
+ mRS.nAllocationRead(getID(mRS), array, dt);
+ Trace.traceEnd(RenderScript.TRACE_TAG);
+ }
+
+ /**
+ * Copy from the Allocation into an array. The array must be at
+ * least as large as the Allocation. The
+ * {@link android.renderscript.Element} must match the component
+ * type of the array passed in.
+ *
+ * @param array The array to be set from the Allocation.
+ */
+ public void copyTo(Object array) {
+ copyTo(array, validateObjectIsPrimitiveArray(array, true),
+ java.lang.reflect.Array.getLength(array));
+ }
+
/**
* Copy from the Allocation into a byte array. The array must be at least
* as large as the Allocation. The allocation must be of an 8 bit integer
* @param d The array to be set from the Allocation.
*/
public void copyTo(byte[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyTo");
validateIsInt8();
- mRS.validate();
- mRS.nAllocationRead(getID(mRS), d, Element.DataType.SIGNED_8);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyTo(d, Element.DataType.SIGNED_8, d.length);
}
/**
* @param d The array to be set from the Allocation.
*/
public void copyTo(short[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyTo");
validateIsInt16();
- mRS.validate();
- mRS.nAllocationRead(getID(mRS), d, Element.DataType.SIGNED_16);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyTo(d, Element.DataType.SIGNED_16, d.length);
}
/**
* @param d The array to be set from the Allocation.
*/
public void copyTo(int[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyTo");
validateIsInt32();
- mRS.validate();
- mRS.nAllocationRead(getID(mRS), d, Element.DataType.SIGNED_32);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyTo(d, Element.DataType.SIGNED_32, d.length);
}
/**
* @param d The array to be set from the Allocation.
*/
public void copyTo(float[] d) {
- Trace.traceBegin(RenderScript.TRACE_TAG, "copyTo");
validateIsFloat32();
- mRS.validate();
- mRS.nAllocationRead(getID(mRS), d, Element.DataType.FLOAT_32);
- Trace.traceEnd(RenderScript.TRACE_TAG);
+ copyTo(d, Element.DataType.FLOAT_32, d.length);
}
/**
mRS.nAllocationResize1D(getID(mRS), dimX);
mRS.finish(); // Necessary because resize is fifoed and update is async.
- int typeID = mRS.nAllocationGetType(getID(mRS));
+ long typeID = mRS.nAllocationGetType(getID(mRS));
mType = new Type(typeID, mRS);
mType.updateFromNative();
updateCacheInfo(mType);
if (type.getID(rs) == 0) {
throw new RSInvalidStateException("Bad Type");
}
- int id = rs.nAllocationCreateTyped(type.getID(rs), mips.mID, usage, 0);
+ long id = rs.nAllocationCreateTyped(type.getID(rs), mips.mID, usage, 0);
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
b.setX(count);
Type t = b.create();
- int id = rs.nAllocationCreateTyped(t.getID(rs), MipmapControl.MIPMAP_NONE.mID, usage, 0);
+ long id = rs.nAllocationCreateTyped(t.getID(rs), MipmapControl.MIPMAP_NONE.mID, usage, 0);
if (id == 0) {
throw new RSRuntimeException("Allocation creation failed.");
}
if (mips == MipmapControl.MIPMAP_NONE &&
t.getElement().isCompatible(Element.RGBA_8888(rs)) &&
usage == (USAGE_SHARED | USAGE_SCRIPT | USAGE_GRAPHICS_TEXTURE)) {
- int id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage);
+ long id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage);
if (id == 0) {
throw new RSRuntimeException("Load failed.");
}
}
- int id = rs.nAllocationCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
+ long id = rs.nAllocationCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
if (id == 0) {
throw new RSRuntimeException("Load failed.");
}
tb.setMipmaps(mips == MipmapControl.MIPMAP_FULL);
Type t = tb.create();
- int id = rs.nAllocationCubeCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
+ long id = rs.nAllocationCubeCreateFromBitmap(t.getID(rs), mips.mID, b, usage);
if(id == 0) {
throw new RSRuntimeException("Load failed for bitmap " + b + " element " + e);
}
*/
public void setOnBufferAvailableListener(OnBufferAvailableListener callback) {
synchronized(mAllocationMap) {
- mAllocationMap.put(new Integer(getID(mRS)), this);
+ mAllocationMap.put(new Long(getID(mRS)), this);
mBufferNotifier = callback;
}
}
static void sendBufferNotification(int id) {
synchronized(mAllocationMap) {
- Allocation a = mAllocationMap.get(new Integer(id));
+ Allocation a = mAllocationMap.get(new Long(id));
if ((a != null) && (a.mBufferNotifier != null)) {
a.mBufferNotifier.onBufferAvailable(a);
package android.renderscript;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.util.TypedValue;
-
/**
* Only intended for use by generated reflected code.
*
**/
public class AllocationAdapter extends Allocation {
- AllocationAdapter(int id, RenderScript rs, Allocation alloc) {
+ AllocationAdapter(long id, RenderScript rs, Allocation alloc) {
super(id, rs, alloc.mType, alloc.mUsage);
mAdaptedAllocation = alloc;
}
- int getID(RenderScript rs) {
+ long getID(RenderScript rs) {
throw new RSInvalidStateException(
"This operation is not supported with adapters at this time.");
}
package android.renderscript;
-import android.util.Log;
-
/**
* BaseObj is the base class for all RenderScript objects owned by a RS context.
* It is responsible for lifetime management and resource tracking. This class
*
**/
public class BaseObj {
- BaseObj(int id, RenderScript rs) {
+ BaseObj(long id, RenderScript rs) {
rs.validate();
mRS = rs;
mID = id;
* @param rs Context to verify against internal context for
* match.
*
- * @return int
+ * @return long
*/
- int getID(RenderScript rs) {
+ long getID(RenderScript rs) {
mRS.validate();
if (mDestroyed) {
throw new RSInvalidStateException("using a destroyed object.");
}
}
- private int mID;
+ private long mID;
private boolean mDestroyed;
private String mName;
RenderScript mRS;
*/
@Override
public int hashCode() {
- return mID;
+ return (int)((mID & 0xfffffff) ^ (mID >> 32));
}
/**
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript byte2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript byte3 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript byte4 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript double2 type back
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript double3 type back
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript double4 type back
package android.renderscript;
-import java.lang.reflect.Field;
-import android.util.Log;
-
/**
* <p>An Element represents one item within an {@link
* android.renderscript.Allocation}. An Element is roughly equivalent to a C
return rs.mElement_MATRIX_2X2;
}
- Element(int id, RenderScript rs, Element[] e, String[] n, int[] as) {
+ Element(long id, RenderScript rs, Element[] e, String[] n, int[] as) {
super(id, rs);
mSize = 0;
mVectorSize = 1;
updateVisibleSubElements();
}
- Element(int id, RenderScript rs, DataType dt, DataKind dk, boolean norm, int size) {
+ Element(long id, RenderScript rs, DataType dt, DataKind dk, boolean norm, int size) {
super(id, rs);
if ((dt != DataType.UNSIGNED_5_6_5) &&
(dt != DataType.UNSIGNED_4_4_4_4) &&
mVectorSize = size;
}
- Element(int id, RenderScript rs) {
+ Element(long id, RenderScript rs) {
super(id, rs);
}
void updateFromNative() {
super.updateFromNative();
+ // FIXME: updateFromNative is broken in JNI for 64-bit
+
// we will pack mType; mKind; mNormalized; mVectorSize; NumSubElements
int[] dataBuffer = new int[5];
mRS.nElementGetNativeData(getID(mRS), dataBuffer);
DataKind dk = DataKind.USER;
boolean norm = false;
int vecSize = 1;
- int id = rs.nElementCreate(dt.mID, dk.mID, norm, vecSize);
+ long id = rs.nElementCreate(dt.mID, dk.mID, norm, vecSize);
return new Element(id, rs, dt, dk, norm, vecSize);
}
case BOOLEAN: {
DataKind dk = DataKind.USER;
boolean norm = false;
- int id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
+ long id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
return new Element(id, rs, dt, dk, norm, size);
}
}
boolean norm = true;
- int id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
+ long id = rs.nElementCreate(dt.mID, dk.mID, norm, size);
return new Element(id, rs, dt, dk, norm, size);
}
java.lang.System.arraycopy(mElementNames, 0, sin, 0, mCount);
java.lang.System.arraycopy(mArraySizes, 0, asin, 0, mCount);
+ // FIXME: broken for 64-bit
int[] ids = new int[ein.length];
for (int ct = 0; ct < ein.length; ct++ ) {
- ids[ct] = ein[ct].getID(mRS);
+ ids[ct] = (int)ein[ct].getID(mRS);
}
- int id = mRS.nElementCreate2(ids, sin, asin);
+ long id = mRS.nElementCreate2(ids, sin, asin);
return new Element(id, mRS, ein, sin, asin);
}
}
package android.renderscript;
-import android.util.Log;
import java.util.BitSet;
/**
public void addObj(BaseObj obj) {
if (obj != null) {
- addI32(obj.getID(null));
+ // FIXME: this is fine for 32-bit but needs a path for 64-bit
+ addI32((int)obj.getID(null));
} else {
addI32(0);
}
package android.renderscript;
import java.io.File;
-import java.io.IOException;
import java.io.InputStream;
import android.content.res.AssetManager;
import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.util.Log;
-import android.util.TypedValue;
/**
* @hide
public static class IndexEntry {
RenderScript mRS;
int mIndex;
- int mID;
+ long mID;
String mName;
EntryType mEntryType;
BaseObj mLoadedObj;
return entry.mLoadedObj;
}
- IndexEntry(RenderScript rs, int index, int id, String name, EntryType type) {
+ IndexEntry(RenderScript rs, int index, long id, String name, EntryType type) {
mRS = rs;
mIndex = index;
mID = id;
IndexEntry[] mFileEntries;
InputStream mInputStream;
- FileA3D(int id, RenderScript rs, InputStream stream) {
+ FileA3D(long id, RenderScript rs, InputStream stream) {
super(id, rs);
mInputStream = stream;
}
*/
static public FileA3D createFromAsset(RenderScript rs, AssetManager mgr, String path) {
rs.validate();
- int fileId = rs.nFileA3DCreateFromAsset(mgr, path);
+ long fileId = rs.nFileA3DCreateFromAsset(mgr, path);
if(fileId == 0) {
throw new RSRuntimeException("Unable to create a3d file from asset " + path);
* @return a3d file containing renderscript objects
*/
static public FileA3D createFromFile(RenderScript rs, String path) {
- int fileId = rs.nFileA3DCreateFromFile(path);
+ long fileId = rs.nFileA3DCreateFromFile(path);
if(fileId == 0) {
throw new RSRuntimeException("Unable to create a3d file from " + path);
throw new RSRuntimeException("Unable to open resource " + id);
}
- int fileId = 0;
+ long fileId = 0;
if (is instanceof AssetManager.AssetInputStream) {
int asset = ((AssetManager.AssetInputStream) is).getAssetInt();
fileId = rs.nFileA3DCreateFromAssetStream(asset);
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript float2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript float2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript float2 type back to the Android system.
package android.renderscript;
import java.io.File;
-import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import android.content.res.AssetManager;
import android.content.res.Resources;
-import android.util.Log;
-import android.util.TypedValue;
/**
* @hide
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript int2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript int3 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript int4 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript long2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript long3 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript long4 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript rs_matrix2x2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript rs_matrix3x3 type back to the Android system.
package android.renderscript;
import java.lang.Math;
-import android.util.Log;
/**
import java.util.Vector;
-import android.util.Log;
-
/**
* @hide
* @deprecated in API 16
Allocation[] mIndexBuffers;
Primitive[] mPrimitives;
- Mesh(int id, RenderScript rs) {
+ Mesh(long id, RenderScript rs) {
super(id, rs);
}
alloc = Allocation.createSized(mRS, entry.e, entry.size, mUsage);
}
vertexBuffers[ct] = alloc;
- vtx[ct] = alloc.getID(mRS);
+ vtx[ct] = (int)alloc.getID(mRS);
}
for(int ct = 0; ct < mIndexTypes.size(); ct ++) {
} else if(entry.e != null) {
alloc = Allocation.createSized(mRS, entry.e, entry.size, mUsage);
}
- int allocID = (alloc == null) ? 0 : alloc.getID(mRS);
+ long allocID = (alloc == null) ? 0 : alloc.getID(mRS);
indexBuffers[ct] = alloc;
primitives[ct] = entry.prim;
- idx[ct] = allocID;
+ idx[ct] = (int)allocID;
prim[ct] = entry.prim.mID;
}
- int id = mRS.nMeshCreate(vtx, idx, prim);
+ long id = mRS.nMeshCreate(vtx, idx, prim);
Mesh newMesh = new Mesh(id, mRS);
newMesh.mVertexBuffers = vertexBuffers;
newMesh.mIndexBuffers = indexBuffers;
for(int ct = 0; ct < mVertexTypeCount; ct ++) {
Entry entry = mVertexTypes[ct];
vertexBuffers[ct] = entry.a;
- vtx[ct] = entry.a.getID(mRS);
+ vtx[ct] = (int)entry.a.getID(mRS);
}
for(int ct = 0; ct < mIndexTypes.size(); ct ++) {
Entry entry = (Entry)mIndexTypes.elementAt(ct);
- int allocID = (entry.a == null) ? 0 : entry.a.getID(mRS);
+ long allocID = (entry.a == null) ? 0 : entry.a.getID(mRS);
indexBuffers[ct] = entry.a;
primitives[ct] = entry.prim;
- idx[ct] = allocID;
+ idx[ct] = (int)allocID;
prim[ct] = entry.prim.mID;
}
- int id = mRS.nMeshCreate(vtx, idx, prim);
+ long id = mRS.nMeshCreate(vtx, idx, prim);
Mesh newMesh = new Mesh(id, mRS);
newMesh.mVertexBuffers = vertexBuffers;
newMesh.mIndexBuffers = indexBuffers;
package android.renderscript;
-import java.util.Vector;
-import android.util.Log;
-
/**
* @hide
*
float mQuality;
boolean mCoverageToAlpha;
- Path(int id, RenderScript rs, Primitive p, Allocation vtx, Allocation loop, float q) {
+ Path(long id, RenderScript rs, Primitive p, Allocation vtx, Allocation loop, float q) {
super(id, rs);
mVertexBuffer = vtx;
mLoopBuffer = loop;
public static Path createStaticPath(RenderScript rs, Primitive p, float quality, Allocation vtx) {
- int id = rs.nPathCreate(p.mID, false, vtx.getID(rs), 0, quality);
+ long id = rs.nPathCreate(p.mID, false, vtx.getID(rs), 0, quality);
Path newPath = new Path(id, rs, p, null, null, quality);
return newPath;
}
int mTextureCount;
String mShader;
- Program(int id, RenderScript rs) {
+ Program(long id, RenderScript rs) {
super(id, rs);
}
a.getType().getID(mRS) != mConstants[slot].getID(mRS)) {
throw new IllegalArgumentException("Allocation type does not match slot type.");
}
- int id = a != null ? a.getID(mRS) : 0;
+ long id = a != null ? a.getID(mRS) : 0;
mRS.nProgramBindConstants(getID(mRS), slot, id);
}
throw new IllegalArgumentException("Cannot bind cubemap to 2d texture slot");
}
- int id = va != null ? va.getID(mRS) : 0;
+ long id = va != null ? va.getID(mRS) : 0;
mRS.nProgramBindTexture(getID(mRS), slot, id);
}
throw new IllegalArgumentException("Slot ID out of range.");
}
- int id = vs != null ? vs.getID(mRS) : 0;
+ long id = vs != null ? vs.getID(mRS) : 0;
mRS.nProgramBindSampler(getID(mRS), slot, id);
}
package android.renderscript;
-import android.util.Log;
-
-
/**
* @hide
* @deprecated in API 16
*
**/
public class ProgramFragment extends Program {
- ProgramFragment(int id, RenderScript rs) {
+ ProgramFragment(long id, RenderScript rs) {
super(id, rs);
}
for (int i=0; i < mInputCount; i++) {
tmp[idx++] = ProgramParam.INPUT.mID;
- tmp[idx++] = mInputs[i].getID(mRS);
+ tmp[idx++] = (int)mInputs[i].getID(mRS);
}
for (int i=0; i < mOutputCount; i++) {
tmp[idx++] = ProgramParam.OUTPUT.mID;
- tmp[idx++] = mOutputs[i].getID(mRS);
+ tmp[idx++] = (int)mOutputs[i].getID(mRS);
}
for (int i=0; i < mConstantCount; i++) {
tmp[idx++] = ProgramParam.CONSTANT.mID;
- tmp[idx++] = mConstants[i].getID(mRS);
+ tmp[idx++] = (int)mConstants[i].getID(mRS);
}
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
- tmp[idx++] = mTextureTypes[i].mID;
+ tmp[idx++] = (int)mTextureTypes[i].mID;
texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
+ long id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
ProgramFragment pf = new ProgramFragment(id, mRS);
initProgram(pf);
return pf;
package android.renderscript;
-import android.util.Log;
-
-
/**
* @hide
* @deprecated in API 16
*
**/
public class ProgramFragmentFixedFunction extends ProgramFragment {
- ProgramFragmentFixedFunction(int id, RenderScript rs) {
+ ProgramFragmentFixedFunction(long id, RenderScript rs) {
super(id, rs);
}
for (int i=0; i < mInputCount; i++) {
tmp[idx++] = ProgramParam.INPUT.mID;
- tmp[idx++] = mInputs[i].getID(mRS);
+ tmp[idx++] = (int)mInputs[i].getID(mRS);
}
for (int i=0; i < mOutputCount; i++) {
tmp[idx++] = ProgramParam.OUTPUT.mID;
- tmp[idx++] = mOutputs[i].getID(mRS);
+ tmp[idx++] = (int)mOutputs[i].getID(mRS);
}
for (int i=0; i < mConstantCount; i++) {
tmp[idx++] = ProgramParam.CONSTANT.mID;
- tmp[idx++] = mConstants[i].getID(mRS);
+ tmp[idx++] = (int)mConstants[i].getID(mRS);
}
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
- tmp[idx++] = mTextureTypes[i].mID;
+ tmp[idx++] = (int)mTextureTypes[i].mID;
texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
+ long id = mRS.nProgramFragmentCreate(mShader, texNames, tmp);
ProgramFragmentFixedFunction pf = new ProgramFragmentFixedFunction(id, mRS);
initProgram(pf);
return pf;
package android.renderscript;
-import android.util.Log;
-
-
/**
* @hide
* @deprecated in API 16
boolean mPointSprite;
CullMode mCullMode;
- ProgramRaster(int id, RenderScript rs) {
+ ProgramRaster(long id, RenderScript rs) {
super(id, rs);
mPointSprite = false;
*/
public ProgramRaster create() {
mRS.validate();
- int id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
+ long id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
ProgramRaster programRaster = new ProgramRaster(id, mRS);
programRaster.mPointSprite = mPointSprite;
programRaster.mCullMode = mCullMode;
package android.renderscript;
-import android.util.Log;
-
-
/**
* @hide
* <p>ProgramStore contains a set of parameters that control how
package android.renderscript;
-import android.graphics.Matrix;
-import android.util.Log;
-
-
/**
* @hide
* @deprecated in API 16
**/
public class ProgramVertex extends Program {
- ProgramVertex(int id, RenderScript rs) {
+ ProgramVertex(long id, RenderScript rs) {
super(id, rs);
}
for (int i=0; i < mInputCount; i++) {
tmp[idx++] = ProgramParam.INPUT.mID;
- tmp[idx++] = mInputs[i].getID(mRS);
+ tmp[idx++] = (int)mInputs[i].getID(mRS);
}
for (int i=0; i < mOutputCount; i++) {
tmp[idx++] = ProgramParam.OUTPUT.mID;
- tmp[idx++] = mOutputs[i].getID(mRS);
+ tmp[idx++] = (int)mOutputs[i].getID(mRS);
}
for (int i=0; i < mConstantCount; i++) {
tmp[idx++] = ProgramParam.CONSTANT.mID;
- tmp[idx++] = mConstants[i].getID(mRS);
+ tmp[idx++] = (int)mConstants[i].getID(mRS);
}
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
- tmp[idx++] = mTextureTypes[i].mID;
+ tmp[idx++] = (int)mTextureTypes[i].mID;
texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
+ long id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
ProgramVertex pv = new ProgramVertex(id, mRS);
initProgram(pv);
return pv;
package android.renderscript;
-import android.graphics.Matrix;
-import android.util.Log;
-
-
/**
* @hide
* @deprecated in API 16
**/
public class ProgramVertexFixedFunction extends ProgramVertex {
- ProgramVertexFixedFunction(int id, RenderScript rs) {
+ ProgramVertexFixedFunction(long id, RenderScript rs) {
super(id, rs);
}
for (int i=0; i < mInputCount; i++) {
tmp[idx++] = ProgramParam.INPUT.mID;
- tmp[idx++] = mInputs[i].getID(mRS);
+ tmp[idx++] = (int)mInputs[i].getID(mRS);
}
for (int i=0; i < mOutputCount; i++) {
tmp[idx++] = ProgramParam.OUTPUT.mID;
- tmp[idx++] = mOutputs[i].getID(mRS);
+ tmp[idx++] = (int)mOutputs[i].getID(mRS);
}
for (int i=0; i < mConstantCount; i++) {
tmp[idx++] = ProgramParam.CONSTANT.mID;
- tmp[idx++] = mConstants[i].getID(mRS);
+ tmp[idx++] = (int)mConstants[i].getID(mRS);
}
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
- tmp[idx++] = mTextureTypes[i].mID;
+ tmp[idx++] = (int)mTextureTypes[i].mID;
texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
+ long id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
ProgramVertexFixedFunction pv = new ProgramVertexFixedFunction(id, mRS);
initProgram(pv);
return pv;
package android.renderscript;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.concurrent.Semaphore;
-
import android.content.Context;
-import android.os.Handler;
-import android.os.Message;
import android.util.AttributeSet;
-import android.util.Log;
-import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
package android.renderscript;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.concurrent.Semaphore;
-
import android.content.Context;
import android.graphics.SurfaceTexture;
-import android.os.Handler;
-import android.os.Message;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.TextureView;
/**
package android.renderscript;
import java.io.File;
-import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.SurfaceTexture;
import android.os.Process;
import android.util.Log;
}
// Non-threadsafe functions.
- native int nDeviceCreate();
- native void nDeviceDestroy(int dev);
- native void nDeviceSetConfig(int dev, int param, int value);
- native int nContextGetUserMessage(int con, int[] data);
- native String nContextGetErrorMessage(int con);
- native int nContextPeekMessage(int con, int[] subID);
- native void nContextInitToClient(int con);
- native void nContextDeinitToClient(int con);
+ native long nDeviceCreate();
+ native void nDeviceDestroy(long dev);
+ native void nDeviceSetConfig(long dev, int param, int value);
+ native int nContextGetUserMessage(long con, int[] data);
+ native String nContextGetErrorMessage(long con);
+ native int nContextPeekMessage(long con, int[] subID);
+ native void nContextInitToClient(long con);
+ native void nContextDeinitToClient(long con);
static File mCacheDir;
// Methods below are wrapped to protect the non-threadsafe
// lockless fifo.
- native int rsnContextCreateGL(int dev, int ver, int sdkVer,
+ native long rsnContextCreateGL(long dev, int ver, int sdkVer,
int colorMin, int colorPref,
int alphaMin, int alphaPref,
int depthMin, int depthPref,
int stencilMin, int stencilPref,
int samplesMin, int samplesPref, float samplesQ, int dpi);
- synchronized int nContextCreateGL(int dev, int ver, int sdkVer,
+ synchronized long nContextCreateGL(long dev, int ver, int sdkVer,
int colorMin, int colorPref,
int alphaMin, int alphaPref,
int depthMin, int depthPref,
stencilMin, stencilPref,
samplesMin, samplesPref, samplesQ, dpi);
}
- native int rsnContextCreate(int dev, int ver, int sdkVer, int contextType);
- synchronized int nContextCreate(int dev, int ver, int sdkVer, int contextType) {
+ native long rsnContextCreate(long dev, int ver, int sdkVer, int contextType);
+ synchronized long nContextCreate(long dev, int ver, int sdkVer, int contextType) {
return rsnContextCreate(dev, ver, sdkVer, contextType);
}
- native void rsnContextDestroy(int con);
+ native void rsnContextDestroy(long con);
synchronized void nContextDestroy() {
validate();
rsnContextDestroy(mContext);
}
- native void rsnContextSetSurface(int con, int w, int h, Surface sur);
+ native void rsnContextSetSurface(long con, int w, int h, Surface sur);
synchronized void nContextSetSurface(int w, int h, Surface sur) {
validate();
rsnContextSetSurface(mContext, w, h, sur);
}
- native void rsnContextSetSurfaceTexture(int con, int w, int h, SurfaceTexture sur);
+ native void rsnContextSetSurfaceTexture(long con, int w, int h, SurfaceTexture sur);
synchronized void nContextSetSurfaceTexture(int w, int h, SurfaceTexture sur) {
validate();
rsnContextSetSurfaceTexture(mContext, w, h, sur);
}
- native void rsnContextSetPriority(int con, int p);
+ native void rsnContextSetPriority(long con, int p);
synchronized void nContextSetPriority(int p) {
validate();
rsnContextSetPriority(mContext, p);
}
- native void rsnContextDump(int con, int bits);
+ native void rsnContextDump(long con, int bits);
synchronized void nContextDump(int bits) {
validate();
rsnContextDump(mContext, bits);
}
- native void rsnContextFinish(int con);
+ native void rsnContextFinish(long con);
synchronized void nContextFinish() {
validate();
rsnContextFinish(mContext);
}
- native void rsnContextSendMessage(int con, int id, int[] data);
+ native void rsnContextSendMessage(long con, int id, int[] data);
synchronized void nContextSendMessage(int id, int[] data) {
validate();
rsnContextSendMessage(mContext, id, data);
}
- native void rsnContextBindRootScript(int con, int script);
+ native void rsnContextBindRootScript(long con, int script);
synchronized void nContextBindRootScript(int script) {
validate();
rsnContextBindRootScript(mContext, script);
}
- native void rsnContextBindSampler(int con, int sampler, int slot);
+ native void rsnContextBindSampler(long con, int sampler, int slot);
synchronized void nContextBindSampler(int sampler, int slot) {
validate();
rsnContextBindSampler(mContext, sampler, slot);
}
- native void rsnContextBindProgramStore(int con, int pfs);
+ native void rsnContextBindProgramStore(long con, int pfs);
synchronized void nContextBindProgramStore(int pfs) {
validate();
rsnContextBindProgramStore(mContext, pfs);
}
- native void rsnContextBindProgramFragment(int con, int pf);
+ native void rsnContextBindProgramFragment(long con, int pf);
synchronized void nContextBindProgramFragment(int pf) {
validate();
rsnContextBindProgramFragment(mContext, pf);
}
- native void rsnContextBindProgramVertex(int con, int pv);
+ native void rsnContextBindProgramVertex(long con, int pv);
synchronized void nContextBindProgramVertex(int pv) {
validate();
rsnContextBindProgramVertex(mContext, pv);
}
- native void rsnContextBindProgramRaster(int con, int pr);
+ native void rsnContextBindProgramRaster(long con, int pr);
synchronized void nContextBindProgramRaster(int pr) {
validate();
rsnContextBindProgramRaster(mContext, pr);
}
- native void rsnContextPause(int con);
+ native void rsnContextPause(long con);
synchronized void nContextPause() {
validate();
rsnContextPause(mContext);
}
- native void rsnContextResume(int con);
+ native void rsnContextResume(long con);
synchronized void nContextResume() {
validate();
rsnContextResume(mContext);
}
- native void rsnAssignName(int con, int obj, byte[] name);
- synchronized void nAssignName(int obj, byte[] name) {
+ native void rsnAssignName(long con, long obj, byte[] name);
+ synchronized void nAssignName(long obj, byte[] name) {
validate();
rsnAssignName(mContext, obj, name);
}
- native String rsnGetName(int con, int obj);
- synchronized String nGetName(int obj) {
+ native String rsnGetName(long con, long obj);
+ synchronized String nGetName(long obj) {
validate();
return rsnGetName(mContext, obj);
}
- native void rsnObjDestroy(int con, int id);
- synchronized void nObjDestroy(int id) {
+ native void rsnObjDestroy(long con, long id);
+ synchronized void nObjDestroy(long id) {
// There is a race condition here. The calling code may be run
// by the gc while teardown is occuring. This protects againts
// deleting dead objects.
}
}
- native int rsnElementCreate(int con, int type, int kind, boolean norm, int vecSize);
- synchronized int nElementCreate(int type, int kind, boolean norm, int vecSize) {
+ native long rsnElementCreate(long con, long type, int kind, boolean norm, int vecSize);
+ synchronized long nElementCreate(long type, int kind, boolean norm, int vecSize) {
validate();
return rsnElementCreate(mContext, type, kind, norm, vecSize);
}
- native int rsnElementCreate2(int con, int[] elements, String[] names, int[] arraySizes);
- synchronized int nElementCreate2(int[] elements, String[] names, int[] arraySizes) {
+ native long rsnElementCreate2(long con, int[]elements, String[] names, int[] arraySizes);
+ synchronized long nElementCreate2(int[] elements, String[] names, int[] arraySizes) {
validate();
return rsnElementCreate2(mContext, elements, names, arraySizes);
}
- native void rsnElementGetNativeData(int con, int id, int[] elementData);
- synchronized void nElementGetNativeData(int id, int[] elementData) {
+ native void rsnElementGetNativeData(long con, long id, int[] elementData);
+ synchronized void nElementGetNativeData(long id, int[] elementData) {
validate();
rsnElementGetNativeData(mContext, id, elementData);
}
- native void rsnElementGetSubElements(int con, int id,
+ native void rsnElementGetSubElements(long con, long id,
int[] IDs, String[] names, int[] arraySizes);
- synchronized void nElementGetSubElements(int id, int[] IDs, String[] names, int[] arraySizes) {
+ synchronized void nElementGetSubElements(long id, int[] IDs, String[] names, int[] arraySizes) {
validate();
rsnElementGetSubElements(mContext, id, IDs, names, arraySizes);
}
- native int rsnTypeCreate(int con, int eid, int x, int y, int z, boolean mips, boolean faces, int yuv);
- synchronized int nTypeCreate(int eid, int x, int y, int z, boolean mips, boolean faces, int yuv) {
+ native long rsnTypeCreate(long con, long eid, int x, int y, int z, boolean mips, boolean faces, int yuv);
+ synchronized long nTypeCreate(long eid, int x, int y, int z, boolean mips, boolean faces, int yuv) {
validate();
return rsnTypeCreate(mContext, eid, x, y, z, mips, faces, yuv);
}
- native void rsnTypeGetNativeData(int con, int id, int[] typeData);
- synchronized void nTypeGetNativeData(int id, int[] typeData) {
+ native void rsnTypeGetNativeData(long con, long id, int[] typeData);
+ synchronized void nTypeGetNativeData(long id, int[] typeData) {
validate();
rsnTypeGetNativeData(mContext, id, typeData);
}
- native int rsnAllocationCreateTyped(int con, int type, int mip, int usage, int pointer);
- synchronized int nAllocationCreateTyped(int type, int mip, int usage, int pointer) {
+ native long rsnAllocationCreateTyped(long con, long type, int mip, int usage, int pointer);
+ synchronized long nAllocationCreateTyped(long type, int mip, int usage, int pointer) {
validate();
return rsnAllocationCreateTyped(mContext, type, mip, usage, pointer);
}
- native int rsnAllocationCreateFromBitmap(int con, int type, int mip, Bitmap bmp, int usage);
- synchronized int nAllocationCreateFromBitmap(int type, int mip, Bitmap bmp, int usage) {
+ native long rsnAllocationCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage);
+ synchronized long nAllocationCreateFromBitmap(long type, int mip, Bitmap bmp, int usage) {
validate();
return rsnAllocationCreateFromBitmap(mContext, type, mip, bmp, usage);
}
- native int rsnAllocationCreateBitmapBackedAllocation(int con, int type, int mip, Bitmap bmp, int usage);
- synchronized int nAllocationCreateBitmapBackedAllocation(int type, int mip, Bitmap bmp, int usage) {
+ native long rsnAllocationCreateBitmapBackedAllocation(long con, long type, int mip, Bitmap bmp, int usage);
+ synchronized long nAllocationCreateBitmapBackedAllocation(long type, int mip, Bitmap bmp, int usage) {
validate();
return rsnAllocationCreateBitmapBackedAllocation(mContext, type, mip, bmp, usage);
}
-
- native int rsnAllocationCubeCreateFromBitmap(int con, int type, int mip, Bitmap bmp, int usage);
- synchronized int nAllocationCubeCreateFromBitmap(int type, int mip, Bitmap bmp, int usage) {
+ native long rsnAllocationCubeCreateFromBitmap(long con, long type, int mip, Bitmap bmp, int usage);
+ synchronized long nAllocationCubeCreateFromBitmap(long type, int mip, Bitmap bmp, int usage) {
validate();
return rsnAllocationCubeCreateFromBitmap(mContext, type, mip, bmp, usage);
}
- native int rsnAllocationCreateBitmapRef(int con, int type, Bitmap bmp);
- synchronized int nAllocationCreateBitmapRef(int type, Bitmap bmp) {
+ native long rsnAllocationCreateBitmapRef(long con, long type, Bitmap bmp);
+ synchronized long nAllocationCreateBitmapRef(long type, Bitmap bmp) {
validate();
return rsnAllocationCreateBitmapRef(mContext, type, bmp);
}
- native int rsnAllocationCreateFromAssetStream(int con, int mips, int assetStream, int usage);
- synchronized int nAllocationCreateFromAssetStream(int mips, int assetStream, int usage) {
+ native long rsnAllocationCreateFromAssetStream(long con, int mips, int assetStream, int usage);
+ synchronized long nAllocationCreateFromAssetStream(int mips, int assetStream, int usage) {
validate();
return rsnAllocationCreateFromAssetStream(mContext, mips, assetStream, usage);
}
- native void rsnAllocationCopyToBitmap(int con, int alloc, Bitmap bmp);
- synchronized void nAllocationCopyToBitmap(int alloc, Bitmap bmp) {
+ native void rsnAllocationCopyToBitmap(long con, long alloc, Bitmap bmp);
+ synchronized void nAllocationCopyToBitmap(long alloc, Bitmap bmp) {
validate();
rsnAllocationCopyToBitmap(mContext, alloc, bmp);
}
- native void rsnAllocationSyncAll(int con, int alloc, int src);
- synchronized void nAllocationSyncAll(int alloc, int src) {
+ native void rsnAllocationSyncAll(long con, long alloc, int src);
+ synchronized void nAllocationSyncAll(long alloc, int src) {
validate();
rsnAllocationSyncAll(mContext, alloc, src);
}
- native Surface rsnAllocationGetSurface(int con, int alloc);
- synchronized Surface nAllocationGetSurface(int alloc) {
+ native Surface rsnAllocationGetSurface(long con, long alloc);
+ synchronized Surface nAllocationGetSurface(long alloc) {
validate();
return rsnAllocationGetSurface(mContext, alloc);
}
- native void rsnAllocationSetSurface(int con, int alloc, Surface sur);
- synchronized void nAllocationSetSurface(int alloc, Surface sur) {
+ native void rsnAllocationSetSurface(long con, long alloc, Surface sur);
+ synchronized void nAllocationSetSurface(long alloc, Surface sur) {
validate();
rsnAllocationSetSurface(mContext, alloc, sur);
}
- native void rsnAllocationIoSend(int con, int alloc);
- synchronized void nAllocationIoSend(int alloc) {
+ native void rsnAllocationIoSend(long con, long alloc);
+ synchronized void nAllocationIoSend(long alloc) {
validate();
rsnAllocationIoSend(mContext, alloc);
}
- native void rsnAllocationIoReceive(int con, int alloc);
- synchronized void nAllocationIoReceive(int alloc) {
+ native void rsnAllocationIoReceive(long con, long alloc);
+ synchronized void nAllocationIoReceive(long alloc) {
validate();
rsnAllocationIoReceive(mContext, alloc);
}
- native void rsnAllocationGenerateMipmaps(int con, int alloc);
- synchronized void nAllocationGenerateMipmaps(int alloc) {
+ native void rsnAllocationGenerateMipmaps(long con, long alloc);
+ synchronized void nAllocationGenerateMipmaps(long alloc) {
validate();
rsnAllocationGenerateMipmaps(mContext, alloc);
}
- native void rsnAllocationCopyFromBitmap(int con, int alloc, Bitmap bmp);
- synchronized void nAllocationCopyFromBitmap(int alloc, Bitmap bmp) {
+ native void rsnAllocationCopyFromBitmap(long con, long alloc, Bitmap bmp);
+ synchronized void nAllocationCopyFromBitmap(long alloc, Bitmap bmp) {
validate();
rsnAllocationCopyFromBitmap(mContext, alloc, bmp);
}
- native void rsnAllocationData1D(int con, int id, int off, int mip, int count, Object d, int sizeBytes, int dt);
- synchronized void nAllocationData1D(int id, int off, int mip, int count, Object d, int sizeBytes, Element.DataType dt) {
+ native void rsnAllocationData1D(long con, long id, int off, int mip, int count, Object d, int sizeBytes, int dt);
+ synchronized void nAllocationData1D(long id, int off, int mip, int count, Object d, int sizeBytes, Element.DataType dt) {
validate();
rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID);
}
- native void rsnAllocationElementData1D(int con, int id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes);
- synchronized void nAllocationElementData1D(int id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes) {
+ native void rsnAllocationElementData1D(long con,long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes);
+ synchronized void nAllocationElementData1D(long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes) {
validate();
rsnAllocationElementData1D(mContext, id, xoff, mip, compIdx, d, sizeBytes);
}
- native void rsnAllocationData2D(int con,
- int dstAlloc, int dstXoff, int dstYoff,
+ native void rsnAllocationData2D(long con,
+ long dstAlloc, int dstXoff, int dstYoff,
int dstMip, int dstFace,
int width, int height,
- int srcAlloc, int srcXoff, int srcYoff,
+ long srcAlloc, int srcXoff, int srcYoff,
int srcMip, int srcFace);
- synchronized void nAllocationData2D(int dstAlloc, int dstXoff, int dstYoff,
+ synchronized void nAllocationData2D(long dstAlloc, int dstXoff, int dstYoff,
int dstMip, int dstFace,
int width, int height,
- int srcAlloc, int srcXoff, int srcYoff,
+ long srcAlloc, int srcXoff, int srcYoff,
int srcMip, int srcFace) {
validate();
rsnAllocationData2D(mContext,
srcMip, srcFace);
}
- native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face,
+ native void rsnAllocationData2D(long con, long id, int xoff, int yoff, int mip, int face,
int w, int h, Object d, int sizeBytes, int dt);
- synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face,
+ synchronized void nAllocationData2D(long id, int xoff, int yoff, int mip, int face,
int w, int h, Object d, int sizeBytes, Element.DataType dt) {
validate();
rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID);
}
- native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, Bitmap b);
- synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, Bitmap b) {
+ native void rsnAllocationData2D(long con, long id, int xoff, int yoff, int mip, int face, Bitmap b);
+ synchronized void nAllocationData2D(long id, int xoff, int yoff, int mip, int face, Bitmap b) {
validate();
rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, b);
}
- native void rsnAllocationData3D(int con,
- int dstAlloc, int dstXoff, int dstYoff, int dstZoff,
+ native void rsnAllocationData3D(long con,
+ long dstAlloc, int dstXoff, int dstYoff, int dstZoff,
int dstMip,
int width, int height, int depth,
- int srcAlloc, int srcXoff, int srcYoff, int srcZoff,
+ long srcAlloc, int srcXoff, int srcYoff, int srcZoff,
int srcMip);
- synchronized void nAllocationData3D(int dstAlloc, int dstXoff, int dstYoff, int dstZoff,
+ synchronized void nAllocationData3D(long dstAlloc, int dstXoff, int dstYoff, int dstZoff,
int dstMip,
int width, int height, int depth,
- int srcAlloc, int srcXoff, int srcYoff, int srcZoff,
+ long srcAlloc, int srcXoff, int srcYoff, int srcZoff,
int srcMip) {
validate();
rsnAllocationData3D(mContext,
srcAlloc, srcXoff, srcYoff, srcZoff, srcMip);
}
- native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip,
+ native void rsnAllocationData3D(long con, long id, int xoff, int yoff, int zoff, int mip,
int w, int h, int depth, Object d, int sizeBytes, int dt);
- synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip,
+ synchronized void nAllocationData3D(long id, int xoff, int yoff, int zoff, int mip,
int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt) {
validate();
rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID);
}
- native void rsnAllocationRead(int con, int id, Object d, int dt);
- synchronized void nAllocationRead(int id, Object d, Element.DataType dt) {
+ native void rsnAllocationRead(long con, long id, Object d, int dt);
+ synchronized void nAllocationRead(long id, Object d, Element.DataType dt) {
validate();
rsnAllocationRead(mContext, id, d, dt.mID);
}
- native void rsnAllocationRead1D(int con, int id, int off, int mip, int count, Object d,
+ native void rsnAllocationRead1D(long con, long id, int off, int mip, int count, Object d,
int sizeBytes, int dt);
- synchronized void nAllocationRead1D(int id, int off, int mip, int count, Object d,
+ synchronized void nAllocationRead1D(long id, int off, int mip, int count, Object d,
int sizeBytes, Element.DataType dt) {
validate();
rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID);
}
- native void rsnAllocationRead2D(int con, int id, int xoff, int yoff, int mip, int face,
+ native void rsnAllocationRead2D(long con, long id, int xoff, int yoff, int mip, int face,
int w, int h, Object d, int sizeBytes, int dt);
- synchronized void nAllocationRead2D(int id, int xoff, int yoff, int mip, int face,
+ synchronized void nAllocationRead2D(long id, int xoff, int yoff, int mip, int face,
int w, int h, Object d, int sizeBytes, Element.DataType dt) {
validate();
rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID);
}
- native int rsnAllocationGetType(int con, int id);
- synchronized int nAllocationGetType(int id) {
+ native long rsnAllocationGetType(long con, long id);
+ synchronized long nAllocationGetType(long id) {
validate();
return rsnAllocationGetType(mContext, id);
}
- native void rsnAllocationResize1D(int con, int id, int dimX);
- synchronized void nAllocationResize1D(int id, int dimX) {
+ native void rsnAllocationResize1D(long con, long id, int dimX);
+ synchronized void nAllocationResize1D(long id, int dimX) {
validate();
rsnAllocationResize1D(mContext, id, dimX);
}
- native int rsnFileA3DCreateFromAssetStream(int con, int assetStream);
- synchronized int nFileA3DCreateFromAssetStream(int assetStream) {
+ native long rsnFileA3DCreateFromAssetStream(long con, int assetStream);
+ synchronized long nFileA3DCreateFromAssetStream(int assetStream) {
validate();
return rsnFileA3DCreateFromAssetStream(mContext, assetStream);
}
- native int rsnFileA3DCreateFromFile(int con, String path);
- synchronized int nFileA3DCreateFromFile(String path) {
+ native long rsnFileA3DCreateFromFile(long con, String path);
+ synchronized long nFileA3DCreateFromFile(String path) {
validate();
return rsnFileA3DCreateFromFile(mContext, path);
}
- native int rsnFileA3DCreateFromAsset(int con, AssetManager mgr, String path);
- synchronized int nFileA3DCreateFromAsset(AssetManager mgr, String path) {
+ native long rsnFileA3DCreateFromAsset(long con, AssetManager mgr, String path);
+ synchronized long nFileA3DCreateFromAsset(AssetManager mgr, String path) {
validate();
return rsnFileA3DCreateFromAsset(mContext, mgr, path);
}
- native int rsnFileA3DGetNumIndexEntries(int con, int fileA3D);
- synchronized int nFileA3DGetNumIndexEntries(int fileA3D) {
+ native int rsnFileA3DGetNumIndexEntries(long con, long fileA3D);
+ synchronized int nFileA3DGetNumIndexEntries(long fileA3D) {
validate();
return rsnFileA3DGetNumIndexEntries(mContext, fileA3D);
}
- native void rsnFileA3DGetIndexEntries(int con, int fileA3D, int numEntries, int[] IDs, String[] names);
- synchronized void nFileA3DGetIndexEntries(int fileA3D, int numEntries, int[] IDs, String[] names) {
+ native void rsnFileA3DGetIndexEntries(long con, long fileA3D, int numEntries, int[] IDs, String[] names);
+ synchronized void nFileA3DGetIndexEntries(long fileA3D, int numEntries, int[] IDs, String[] names) {
validate();
rsnFileA3DGetIndexEntries(mContext, fileA3D, numEntries, IDs, names);
}
- native int rsnFileA3DGetEntryByIndex(int con, int fileA3D, int index);
- synchronized int nFileA3DGetEntryByIndex(int fileA3D, int index) {
+ native int rsnFileA3DGetEntryByIndex(long con, long fileA3D, int index);
+ synchronized int nFileA3DGetEntryByIndex(long fileA3D, int index) {
validate();
return rsnFileA3DGetEntryByIndex(mContext, fileA3D, index);
}
- native int rsnFontCreateFromFile(int con, String fileName, float size, int dpi);
+ native int rsnFontCreateFromFile(long con, String fileName, float size, int dpi);
synchronized int nFontCreateFromFile(String fileName, float size, int dpi) {
validate();
return rsnFontCreateFromFile(mContext, fileName, size, dpi);
}
- native int rsnFontCreateFromAssetStream(int con, String name, float size, int dpi, int assetStream);
+ native int rsnFontCreateFromAssetStream(long con, String name, float size, int dpi, int assetStream);
synchronized int nFontCreateFromAssetStream(String name, float size, int dpi, int assetStream) {
validate();
return rsnFontCreateFromAssetStream(mContext, name, size, dpi, assetStream);
}
- native int rsnFontCreateFromAsset(int con, AssetManager mgr, String path, float size, int dpi);
+ native int rsnFontCreateFromAsset(long con, AssetManager mgr, String path, float size, int dpi);
synchronized int nFontCreateFromAsset(AssetManager mgr, String path, float size, int dpi) {
validate();
return rsnFontCreateFromAsset(mContext, mgr, path, size, dpi);
}
- native void rsnScriptBindAllocation(int con, int script, int alloc, int slot);
- synchronized void nScriptBindAllocation(int script, int alloc, int slot) {
+ native void rsnScriptBindAllocation(long con, long script, long alloc, int slot);
+ synchronized void nScriptBindAllocation(long script, long alloc, int slot) {
validate();
rsnScriptBindAllocation(mContext, script, alloc, slot);
}
- native void rsnScriptSetTimeZone(int con, int script, byte[] timeZone);
- synchronized void nScriptSetTimeZone(int script, byte[] timeZone) {
+ native void rsnScriptSetTimeZone(long con, long script, byte[] timeZone);
+ synchronized void nScriptSetTimeZone(long script, byte[] timeZone) {
validate();
rsnScriptSetTimeZone(mContext, script, timeZone);
}
- native void rsnScriptInvoke(int con, int id, int slot);
- synchronized void nScriptInvoke(int id, int slot) {
+ native void rsnScriptInvoke(long con, long id, int slot);
+ synchronized void nScriptInvoke(long id, int slot) {
validate();
rsnScriptInvoke(mContext, id, slot);
}
- native void rsnScriptForEach(int con, int id, int slot, int ain, int aout, byte[] params);
- native void rsnScriptForEach(int con, int id, int slot, int ain, int aout);
- native void rsnScriptForEachClipped(int con, int id, int slot, int ain, int aout, byte[] params,
+ native void rsnScriptForEach(long con, long id, int slot, long ain, long aout, byte[] params);
+ native void rsnScriptForEach(long con, long id, int slot, long ain, long aout);
+ native void rsnScriptForEachClipped(long con, long id, int slot, long ain, long aout, byte[] params,
int xstart, int xend, int ystart, int yend, int zstart, int zend);
- native void rsnScriptForEachClipped(int con, int id, int slot, int ain, int aout,
+ native void rsnScriptForEachClipped(long con, long id, int slot, long ain, long aout,
int xstart, int xend, int ystart, int yend, int zstart, int zend);
- synchronized void nScriptForEach(int id, int slot, int ain, int aout, byte[] params) {
+ synchronized void nScriptForEach(long id, int slot, long ain, long aout, byte[] params) {
validate();
if (params == null) {
rsnScriptForEach(mContext, id, slot, ain, aout);
}
}
- synchronized void nScriptForEachClipped(int id, int slot, int ain, int aout, byte[] params,
+ synchronized void nScriptForEachClipped(long id, int slot, long ain, long aout, byte[] params,
int xstart, int xend, int ystart, int yend, int zstart, int zend) {
validate();
if (params == null) {
}
}
- native void rsnScriptInvokeV(int con, int id, int slot, byte[] params);
- synchronized void nScriptInvokeV(int id, int slot, byte[] params) {
+ native void rsnScriptInvokeV(long con, long id, int slot, byte[] params);
+ synchronized void nScriptInvokeV(long id, int slot, byte[] params) {
validate();
rsnScriptInvokeV(mContext, id, slot, params);
}
- native void rsnScriptSetVarI(int con, int id, int slot, int val);
- synchronized void nScriptSetVarI(int id, int slot, int val) {
+ native void rsnScriptSetVarI(long con, long id, int slot, int val);
+ synchronized void nScriptSetVarI(long id, int slot, int val) {
validate();
rsnScriptSetVarI(mContext, id, slot, val);
}
- native int rsnScriptGetVarI(int con, int id, int slot);
- synchronized int nScriptGetVarI(int id, int slot) {
+ native int rsnScriptGetVarI(long con, long id, int slot);
+ synchronized int nScriptGetVarI(long id, int slot) {
validate();
return rsnScriptGetVarI(mContext, id, slot);
}
- native void rsnScriptSetVarJ(int con, int id, int slot, long val);
- synchronized void nScriptSetVarJ(int id, int slot, long val) {
+ native void rsnScriptSetVarJ(long con, long id, int slot, long val);
+ synchronized void nScriptSetVarJ(long id, int slot, long val) {
validate();
rsnScriptSetVarJ(mContext, id, slot, val);
}
- native long rsnScriptGetVarJ(int con, int id, int slot);
- synchronized long nScriptGetVarJ(int id, int slot) {
+ native long rsnScriptGetVarJ(long con, long id, int slot);
+ synchronized long nScriptGetVarJ(long id, int slot) {
validate();
return rsnScriptGetVarJ(mContext, id, slot);
}
- native void rsnScriptSetVarF(int con, int id, int slot, float val);
- synchronized void nScriptSetVarF(int id, int slot, float val) {
+ native void rsnScriptSetVarF(long con, long id, int slot, float val);
+ synchronized void nScriptSetVarF(long id, int slot, float val) {
validate();
rsnScriptSetVarF(mContext, id, slot, val);
}
- native float rsnScriptGetVarF(int con, int id, int slot);
- synchronized float nScriptGetVarF(int id, int slot) {
+ native float rsnScriptGetVarF(long con, long id, int slot);
+ synchronized float nScriptGetVarF(long id, int slot) {
validate();
return rsnScriptGetVarF(mContext, id, slot);
}
- native void rsnScriptSetVarD(int con, int id, int slot, double val);
- synchronized void nScriptSetVarD(int id, int slot, double val) {
+ native void rsnScriptSetVarD(long con, long id, int slot, double val);
+ synchronized void nScriptSetVarD(long id, int slot, double val) {
validate();
rsnScriptSetVarD(mContext, id, slot, val);
}
- native double rsnScriptGetVarD(int con, int id, int slot);
- synchronized double nScriptGetVarD(int id, int slot) {
+ native double rsnScriptGetVarD(long con, long id, int slot);
+ synchronized double nScriptGetVarD(long id, int slot) {
validate();
return rsnScriptGetVarD(mContext, id, slot);
}
- native void rsnScriptSetVarV(int con, int id, int slot, byte[] val);
- synchronized void nScriptSetVarV(int id, int slot, byte[] val) {
+ native void rsnScriptSetVarV(long con, long id, int slot, byte[] val);
+ synchronized void nScriptSetVarV(long id, int slot, byte[] val) {
validate();
rsnScriptSetVarV(mContext, id, slot, val);
}
- native void rsnScriptGetVarV(int con, int id, int slot, byte[] val);
- synchronized void nScriptGetVarV(int id, int slot, byte[] val) {
+ native void rsnScriptGetVarV(long con, long id, int slot, byte[] val);
+ synchronized void nScriptGetVarV(long id, int slot, byte[] val) {
validate();
rsnScriptGetVarV(mContext, id, slot, val);
}
- native void rsnScriptSetVarVE(int con, int id, int slot, byte[] val,
- int e, int[] dims);
- synchronized void nScriptSetVarVE(int id, int slot, byte[] val,
- int e, int[] dims) {
+ native void rsnScriptSetVarVE(long con, long id, int slot, byte[] val,
+ long e, int[] dims);
+ synchronized void nScriptSetVarVE(long id, int slot, byte[] val,
+ long e, int[] dims) {
validate();
rsnScriptSetVarVE(mContext, id, slot, val, e, dims);
}
- native void rsnScriptSetVarObj(int con, int id, int slot, int val);
- synchronized void nScriptSetVarObj(int id, int slot, int val) {
+ native void rsnScriptSetVarObj(long con, long id, int slot, long val);
+ synchronized void nScriptSetVarObj(long id, int slot, long val) {
validate();
rsnScriptSetVarObj(mContext, id, slot, val);
}
- native int rsnScriptCCreate(int con, String resName, String cacheDir,
+ native int rsnScriptCCreate(long con, String resName, String cacheDir,
byte[] script, int length);
synchronized int nScriptCCreate(String resName, String cacheDir, byte[] script, int length) {
validate();
return rsnScriptCCreate(mContext, resName, cacheDir, script, length);
}
- native int rsnScriptIntrinsicCreate(int con, int id, int eid);
- synchronized int nScriptIntrinsicCreate(int id, int eid) {
+ native long rsnScriptIntrinsicCreate(long con, int id, long eid);
+ synchronized long nScriptIntrinsicCreate(int id, long eid) {
validate();
return rsnScriptIntrinsicCreate(mContext, id, eid);
}
- native int rsnScriptKernelIDCreate(int con, int sid, int slot, int sig);
- synchronized int nScriptKernelIDCreate(int sid, int slot, int sig) {
+ native long rsnScriptKernelIDCreate(long con, long sid, int slot, int sig);
+ synchronized long nScriptKernelIDCreate(long sid, int slot, int sig) {
validate();
return rsnScriptKernelIDCreate(mContext, sid, slot, sig);
}
- native int rsnScriptFieldIDCreate(int con, int sid, int slot);
- synchronized int nScriptFieldIDCreate(int sid, int slot) {
+ native long rsnScriptFieldIDCreate(long con, long sid, int slot);
+ synchronized long nScriptFieldIDCreate(long sid, int slot) {
validate();
return rsnScriptFieldIDCreate(mContext, sid, slot);
}
- native int rsnScriptGroupCreate(int con, int[] kernels, int[] src, int[] dstk, int[] dstf, int[] types);
- synchronized int nScriptGroupCreate(int[] kernels, int[] src, int[] dstk, int[] dstf, int[] types) {
+ native long rsnScriptGroupCreate(long con, int[] kernels, int[] src, int[] dstk, int[] dstf, int[] types);
+ synchronized long nScriptGroupCreate(int[] kernels, int[] src, int[] dstk, int[] dstf, int[] types) {
validate();
return rsnScriptGroupCreate(mContext, kernels, src, dstk, dstf, types);
}
- native void rsnScriptGroupSetInput(int con, int group, int kernel, int alloc);
- synchronized void nScriptGroupSetInput(int group, int kernel, int alloc) {
+ native void rsnScriptGroupSetInput(long con, long group, long kernel, long alloc);
+ synchronized void nScriptGroupSetInput(long group, long kernel, long alloc) {
validate();
rsnScriptGroupSetInput(mContext, group, kernel, alloc);
}
- native void rsnScriptGroupSetOutput(int con, int group, int kernel, int alloc);
- synchronized void nScriptGroupSetOutput(int group, int kernel, int alloc) {
+ native void rsnScriptGroupSetOutput(long con, long group, long kernel, long alloc);
+ synchronized void nScriptGroupSetOutput(long group, long kernel, long alloc) {
validate();
rsnScriptGroupSetOutput(mContext, group, kernel, alloc);
}
- native void rsnScriptGroupExecute(int con, int group);
- synchronized void nScriptGroupExecute(int group) {
+ native void rsnScriptGroupExecute(long con, long group);
+ synchronized void nScriptGroupExecute(long group) {
validate();
rsnScriptGroupExecute(mContext, group);
}
- native int rsnSamplerCreate(int con, int magFilter, int minFilter,
+ native int rsnSamplerCreate(long con, int magFilter, int minFilter,
int wrapS, int wrapT, int wrapR, float aniso);
synchronized int nSamplerCreate(int magFilter, int minFilter,
int wrapS, int wrapT, int wrapR, float aniso) {
return rsnSamplerCreate(mContext, magFilter, minFilter, wrapS, wrapT, wrapR, aniso);
}
- native int rsnProgramStoreCreate(int con, boolean r, boolean g, boolean b, boolean a,
+ native int rsnProgramStoreCreate(long con, boolean r, boolean g, boolean b, boolean a,
boolean depthMask, boolean dither,
int srcMode, int dstMode, int depthFunc);
synchronized int nProgramStoreCreate(boolean r, boolean g, boolean b, boolean a,
dstMode, depthFunc);
}
- native int rsnProgramRasterCreate(int con, boolean pointSprite, int cullMode);
- synchronized int nProgramRasterCreate(boolean pointSprite, int cullMode) {
+ native long rsnProgramRasterCreate(long con, boolean pointSprite, int cullMode);
+ synchronized long nProgramRasterCreate(boolean pointSprite, int cullMode) {
validate();
return rsnProgramRasterCreate(mContext, pointSprite, cullMode);
}
- native void rsnProgramBindConstants(int con, int pv, int slot, int mID);
- synchronized void nProgramBindConstants(int pv, int slot, int mID) {
+ native void rsnProgramBindConstants(long con, long pv, int slot, long mID);
+ synchronized void nProgramBindConstants(long pv, int slot, long mID) {
validate();
rsnProgramBindConstants(mContext, pv, slot, mID);
}
- native void rsnProgramBindTexture(int con, int vpf, int slot, int a);
- synchronized void nProgramBindTexture(int vpf, int slot, int a) {
+ native void rsnProgramBindTexture(long con, long vpf, int slot, long a);
+ synchronized void nProgramBindTexture(long vpf, int slot, long a) {
validate();
rsnProgramBindTexture(mContext, vpf, slot, a);
}
- native void rsnProgramBindSampler(int con, int vpf, int slot, int s);
- synchronized void nProgramBindSampler(int vpf, int slot, int s) {
+ native void rsnProgramBindSampler(long con, long vpf, int slot, long s);
+ synchronized void nProgramBindSampler(long vpf, int slot, long s) {
validate();
rsnProgramBindSampler(mContext, vpf, slot, s);
}
- native int rsnProgramFragmentCreate(int con, String shader, String[] texNames, int[] params);
- synchronized int nProgramFragmentCreate(String shader, String[] texNames, int[] params) {
+ native long rsnProgramFragmentCreate(long con, String shader, String[] texNames, int[] params);
+ synchronized long nProgramFragmentCreate(String shader, String[] texNames, int[] params) {
validate();
return rsnProgramFragmentCreate(mContext, shader, texNames, params);
}
- native int rsnProgramVertexCreate(int con, String shader, String[] texNames, int[] params);
- synchronized int nProgramVertexCreate(String shader, String[] texNames, int[] params) {
+ native long rsnProgramVertexCreate(long con, String shader, String[] texNames, int[] params);
+ synchronized long nProgramVertexCreate(String shader, String[] texNames, int[] params) {
validate();
return rsnProgramVertexCreate(mContext, shader, texNames, params);
}
- native int rsnMeshCreate(int con, int[] vtx, int[] idx, int[] prim);
- synchronized int nMeshCreate(int[] vtx, int[] idx, int[] prim) {
+ native long rsnMeshCreate(long con, int[] vtx, int[] idx, int[] prim);
+ synchronized long nMeshCreate(int[] vtx, int[] idx, int[] prim) {
validate();
return rsnMeshCreate(mContext, vtx, idx, prim);
}
- native int rsnMeshGetVertexBufferCount(int con, int id);
- synchronized int nMeshGetVertexBufferCount(int id) {
+ native int rsnMeshGetVertexBufferCount(long con, long id);
+ synchronized int nMeshGetVertexBufferCount(long id) {
validate();
return rsnMeshGetVertexBufferCount(mContext, id);
}
- native int rsnMeshGetIndexCount(int con, int id);
- synchronized int nMeshGetIndexCount(int id) {
+ native int rsnMeshGetIndexCount(long con, long id);
+ synchronized int nMeshGetIndexCount(long id) {
validate();
return rsnMeshGetIndexCount(mContext, id);
}
- native void rsnMeshGetVertices(int con, int id, int[] vtxIds, int vtxIdCount);
- synchronized void nMeshGetVertices(int id, int[] vtxIds, int vtxIdCount) {
+ native void rsnMeshGetVertices(long con, long id, int[] vtxIds, int vtxIdCount);
+ synchronized void nMeshGetVertices(long id, int[] vtxIds, int vtxIdCount) {
validate();
rsnMeshGetVertices(mContext, id, vtxIds, vtxIdCount);
}
- native void rsnMeshGetIndices(int con, int id, int[] idxIds, int[] primitives, int vtxIdCount);
- synchronized void nMeshGetIndices(int id, int[] idxIds, int[] primitives, int vtxIdCount) {
+ native void rsnMeshGetIndices(long con, long id, int[] idxIds, int[] primitives, int vtxIdCount);
+ synchronized void nMeshGetIndices(long id, int[] idxIds, int[] primitives, int vtxIdCount) {
validate();
rsnMeshGetIndices(mContext, id, idxIds, primitives, vtxIdCount);
}
- native int rsnPathCreate(int con, int prim, boolean isStatic, int vtx, int loop, float q);
- synchronized int nPathCreate(int prim, boolean isStatic, int vtx, int loop, float q) {
+ native long rsnPathCreate(long con, int prim, boolean isStatic, long vtx, int loop, float q);
+ synchronized long nPathCreate(int prim, boolean isStatic, long vtx, int loop, float q) {
validate();
return rsnPathCreate(mContext, prim, isStatic, vtx, loop, q);
}
- int mDev;
- int mContext;
+ long mDev;
+ long mContext;
@SuppressWarnings({"FieldCanBeLocal"})
MessageThread mMessageThread;
return mContext != 0;
}
- int safeID(BaseObj o) {
+ long safeID(BaseObj o) {
if(o != null) {
return o.getID(this);
}
package android.renderscript;
-import java.lang.reflect.Field;
-
import android.content.Context;
-import android.graphics.PixelFormat;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.SurfaceTexture;
-import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
-import android.view.SurfaceView;
/**
* @hide
*/
public void bindRootScript(Script s) {
validate();
- nContextBindRootScript(safeID(s));
+ nContextBindRootScript((int)safeID(s));
}
/**
*/
public void bindProgramStore(ProgramStore p) {
validate();
- nContextBindProgramStore(safeID(p));
+ nContextBindProgramStore((int)safeID(p));
}
/**
*/
public void bindProgramFragment(ProgramFragment p) {
validate();
- nContextBindProgramFragment(safeID(p));
+ nContextBindProgramFragment((int)safeID(p));
}
/**
*/
public void bindProgramRaster(ProgramRaster p) {
validate();
- nContextBindProgramRaster(safeID(p));
+ nContextBindProgramRaster((int)safeID(p));
}
/**
*/
public void bindProgramVertex(ProgramVertex p) {
validate();
- nContextBindProgramVertex(safeID(p));
+ nContextBindProgramVertex((int)safeID(p));
}
}
package android.renderscript;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import android.content.res.Resources;
-import android.os.Bundle;
-import android.util.Log;
-
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-
/**
* Sampler object that defines how Allocations can be read as textures within a
* kernel. Samplers are used in conjunction with the {@code rsSample} runtime
Script mScript;
int mSlot;
int mSig;
- KernelID(int id, RenderScript rs, Script s, int slot, int sig) {
+ KernelID(long id, RenderScript rs, Script s, int slot, int sig) {
super(id, rs);
mScript = s;
mSlot = slot;
return k;
}
- int id = mRS.nScriptKernelIDCreate(getID(mRS), slot, sig);
+ long id = mRS.nScriptKernelIDCreate(getID(mRS), slot, sig);
if (id == 0) {
throw new RSDriverException("Failed to create KernelID");
}
public static final class FieldID extends BaseObj {
Script mScript;
int mSlot;
- FieldID(int id, RenderScript rs, Script s, int slot) {
+ FieldID(long id, RenderScript rs, Script s, int slot) {
super(id, rs);
mScript = s;
mSlot = slot;
return f;
}
- int id = mRS.nScriptFieldIDCreate(getID(mRS), slot);
+ long id = mRS.nScriptFieldIDCreate(getID(mRS), slot);
if (id == 0) {
throw new RSDriverException("Failed to create FieldID");
}
throw new RSIllegalArgumentException(
"At least one of ain or aout is required to be non-null.");
}
- int in_id = 0;
+ long in_id = 0;
if (ain != null) {
in_id = ain.getID(mRS);
}
- int out_id = 0;
+ long out_id = 0;
if (aout != null) {
out_id = aout.getID(mRS);
}
forEach(slot, ain, aout, v);
return;
}
- int in_id = 0;
+ long in_id = 0;
if (ain != null) {
in_id = ain.getID(mRS);
}
- int out_id = 0;
+ long out_id = 0;
if (aout != null) {
out_id = aout.getID(mRS);
}
mRS.nScriptForEachClipped(getID(mRS), slot, in_id, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend);
}
- Script(int id, RenderScript rs) {
+ Script(long id, RenderScript rs) {
super(id, rs);
}
package android.renderscript;
-import android.content.Context;
import android.content.res.Resources;
-import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Map.Entry;
-import java.util.HashMap;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
/**
* The superclass for all user-defined scripts. This is only
package android.renderscript;
-import java.lang.reflect.Method;
import java.util.ArrayList;
/**
}
- ScriptGroup(int id, RenderScript rs) {
+ ScriptGroup(long id, RenderScript rs) {
super(id, rs);
}
* @return ScriptGroup The new ScriptGroup
*/
public ScriptGroup create() {
+ // FIXME: this is broken for 64-bit
if (mNodes.size() == 0) {
throw new RSInvalidStateException("Empty script groups are not allowed");
Node n = mNodes.get(ct);
for (int ct2=0; ct2 < n.mKernels.size(); ct2++) {
final Script.KernelID kid = n.mKernels.get(ct2);
- kernels[idx++] = kid.getID(mRS);
+ kernels[idx++] = (int)kid.getID(mRS);
boolean hasInput = false;
boolean hasOutput = false;
for (int ct=0; ct < mLines.size(); ct++) {
ConnectLine cl = mLines.get(ct);
- src[ct] = cl.mFrom.getID(mRS);
+ src[ct] = (int)cl.mFrom.getID(mRS);
if (cl.mToK != null) {
- dstk[ct] = cl.mToK.getID(mRS);
+ dstk[ct] = (int)cl.mToK.getID(mRS);
}
if (cl.mToF != null) {
- dstf[ct] = cl.mToF.getID(mRS);
+ dstf[ct] = (int)cl.mToF.getID(mRS);
}
- types[ct] = cl.mAllocationType.getID(mRS);
+ types[ct] = (int)cl.mAllocationType.getID(mRS);
}
- int id = mRS.nScriptGroupCreate(kernels, src, dstk, dstf, types);
+ long id = mRS.nScriptGroupCreate(kernels, src, dstk, dstf, types);
if (id == 0) {
throw new RSRuntimeException("Object creation error, should not happen.");
}
* Not intended for direct use.
**/
public abstract class ScriptIntrinsic extends Script {
- ScriptIntrinsic(int id, RenderScript rs) {
+ ScriptIntrinsic(long id, RenderScript rs) {
super(id, rs);
}
}
package android.renderscript;
-import android.util.Log;
-
/**
*
* Intrinsic for converting RGB to RGBA by using a 3D lookup table. The
private Allocation mLUT;
private Element mElement;
- private ScriptIntrinsic3DLUT(int id, RenderScript rs, Element e) {
+ private ScriptIntrinsic3DLUT(long id, RenderScript rs, Element e) {
super(id, rs);
mElement = e;
}
* @return ScriptIntrinsic3DLUT
*/
public static ScriptIntrinsic3DLUT create(RenderScript rs, Element e) {
- int id = rs.nScriptIntrinsicCreate(8, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(8, e.getID(rs));
if (!e.isCompatible(Element.U8_4(rs))) {
throw new RSIllegalArgumentException("Element must be compatible with uchar4.");
* Intrinsic kernels for blending two {@link android.renderscript.Allocation} objects.
**/
public class ScriptIntrinsicBlend extends ScriptIntrinsic {
- ScriptIntrinsicBlend(int id, RenderScript rs) {
+ ScriptIntrinsicBlend(long id, RenderScript rs) {
super(id, rs);
}
*/
public static ScriptIntrinsicBlend create(RenderScript rs, Element e) {
// 7 comes from RS_SCRIPT_INTRINSIC_ID_BLEND in rsDefines.h
- int id = rs.nScriptIntrinsicCreate(7, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(7, e.getID(rs));
return new ScriptIntrinsicBlend(id, rs);
}
package android.renderscript;
-import android.content.Context;
-import android.content.res.Resources;
-import android.util.Log;
-
/**
* Intrinsic Gausian blur filter. Applies a gaussian blur of the
* specified radius to all elements of an allocation.
private final float[] mValues = new float[9];
private Allocation mInput;
- private ScriptIntrinsicBlur(int id, RenderScript rs) {
+ private ScriptIntrinsicBlur(long id, RenderScript rs) {
super(id, rs);
}
if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
throw new RSIllegalArgumentException("Unsuported element type.");
}
- int id = rs.nScriptIntrinsicCreate(5, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(5, e.getID(rs));
ScriptIntrinsicBlur sib = new ScriptIntrinsicBlur(id, rs);
sib.setRadius(5.f);
return sib;
package android.renderscript;
-import android.util.Log;
-
/**
* Intrinsic for applying a color matrix to allocations.
*
private final Matrix4f mMatrix = new Matrix4f();
private final Float4 mAdd = new Float4();
- private ScriptIntrinsicColorMatrix(int id, RenderScript rs) {
+ private ScriptIntrinsicColorMatrix(long id, RenderScript rs) {
super(id, rs);
}
* @return ScriptIntrinsicColorMatrix
*/
public static ScriptIntrinsicColorMatrix create(RenderScript rs) {
- int id = rs.nScriptIntrinsicCreate(2, 0);
+ long id = rs.nScriptIntrinsicCreate(2, 0);
return new ScriptIntrinsicColorMatrix(id, rs);
}
package android.renderscript;
-import android.util.Log;
-
/**
* Intrinsic for applying a 3x3 convolve to an allocation.
*
private final float[] mValues = new float[9];
private Allocation mInput;
- private ScriptIntrinsicConvolve3x3(int id, RenderScript rs) {
+ private ScriptIntrinsicConvolve3x3(long id, RenderScript rs) {
super(id, rs);
}
!e.isCompatible(Element.F32_4(rs))) {
throw new RSIllegalArgumentException("Unsuported element type.");
}
- int id = rs.nScriptIntrinsicCreate(1, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(1, e.getID(rs));
ScriptIntrinsicConvolve3x3 si = new ScriptIntrinsicConvolve3x3(id, rs);
si.setCoefficients(f);
return si;
package android.renderscript;
-import android.util.Log;
-
/**
* Intrinsic for applying a 5x5 convolve to an allocation.
*
private final float[] mValues = new float[25];
private Allocation mInput;
- private ScriptIntrinsicConvolve5x5(int id, RenderScript rs) {
+ private ScriptIntrinsicConvolve5x5(long id, RenderScript rs) {
super(id, rs);
}
throw new RSIllegalArgumentException("Unsuported element type.");
}
- int id = rs.nScriptIntrinsicCreate(4, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(4, e.getID(rs));
return new ScriptIntrinsicConvolve5x5(id, rs);
}
package android.renderscript;
-import android.content.Context;
-import android.content.res.Resources;
-import android.util.Log;
-
/**
* Intrinsic Histogram filter.
*
public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
private Allocation mOut;
- private ScriptIntrinsicHistogram(int id, RenderScript rs) {
+ private ScriptIntrinsicHistogram(long id, RenderScript rs) {
super(id, rs);
}
(!e.isCompatible(Element.U8(rs)))) {
throw new RSIllegalArgumentException("Unsuported element type.");
}
- int id = rs.nScriptIntrinsicCreate(9, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(9, e.getID(rs));
ScriptIntrinsicHistogram sib = new ScriptIntrinsicHistogram(id, rs);
return sib;
}
package android.renderscript;
-import android.util.Log;
-
/**
* Intrinsic for applying a per-channel lookup table. Each
* channel of the input has an independant lookup table. The
private final byte mCache[] = new byte[1024];
private boolean mDirty = true;
- private ScriptIntrinsicLUT(int id, RenderScript rs) {
+ private ScriptIntrinsicLUT(long id, RenderScript rs) {
super(id, rs);
mTables = Allocation.createSized(rs, Element.U8(rs), 1024);
for (int ct=0; ct < 256; ct++) {
* @return ScriptIntrinsicLUT
*/
public static ScriptIntrinsicLUT create(RenderScript rs, Element e) {
- int id = rs.nScriptIntrinsicCreate(3, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(3, e.getID(rs));
return new ScriptIntrinsicLUT(id, rs);
}
public final class ScriptIntrinsicYuvToRGB extends ScriptIntrinsic {
private Allocation mInput;
- ScriptIntrinsicYuvToRGB(int id, RenderScript rs) {
+ ScriptIntrinsicYuvToRGB(long id, RenderScript rs) {
super(id, rs);
}
*/
public static ScriptIntrinsicYuvToRGB create(RenderScript rs, Element e) {
// 6 comes from RS_SCRIPT_INTRINSIC_YUV_TO_RGB in rsDefines.h
- int id = rs.nScriptIntrinsicCreate(6, e.getID(rs));
+ long id = rs.nScriptIntrinsicCreate(6, e.getID(rs));
ScriptIntrinsicYuvToRGB si = new ScriptIntrinsicYuvToRGB(id, rs);
return si;
}
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript Short2 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript short3 type back to the Android system.
package android.renderscript;
-import java.lang.Math;
-import android.util.Log;
-
/**
* Class for exposing the native RenderScript short4 type back to the Android system.
package android.renderscript;
-
-import java.lang.reflect.Field;
-
-import android.graphics.ImageFormat;
-import android.util.Log;
-
/**
* <p>A Type describes the {@link android.renderscript.Element} and dimensions used for an {@link
* android.renderscript.Allocation} or a parallel operation. Types are created through {@link
}
- Type(int id, RenderScript rs) {
+ Type(long id, RenderScript rs) {
super(id, rs);
}
@Override
void updateFromNative() {
+ // FIXME: rsaTypeGetNativeData needs 32-bit and 64-bit paths
+
// We have 6 integer to obtain mDimX; mDimY; mDimZ;
// mDimLOD; mDimFaces; mElement;
int[] dataBuffer = new int[6];
- mRS.nTypeGetNativeData(getID(mRS), dataBuffer);
+ mRS.nTypeGetNativeData((int)getID(mRS), dataBuffer);
mDimX = dataBuffer[0];
mDimY = dataBuffer[1];
throw new RSInvalidStateException("Dimension must be >= 1.");
}
- int id = rs.nTypeCreate(e.getID(rs), dimX, 0, 0, false, false, 0);
+ long id = rs.nTypeCreate(e.getID(rs), dimX, 0, 0, false, false, 0);
Type t = new Type(id, rs);
t.mElement = e;
t.mDimX = dimX;
throw new RSInvalidStateException("Dimension must be >= 1.");
}
- int id = rs.nTypeCreate(e.getID(rs), dimX, dimY, 0, false, false, 0);
+ long id = rs.nTypeCreate(e.getID(rs), dimX, dimY, 0, false, false, 0);
Type t = new Type(id, rs);
t.mElement = e;
t.mDimX = dimX;
throw new RSInvalidStateException("Dimension must be >= 1.");
}
- int id = rs.nTypeCreate(e.getID(rs), dimX, dimY, dimZ, false, false, 0);
+ long id = rs.nTypeCreate(e.getID(rs), dimX, dimY, dimZ, false, false, 0);
Type t = new Type(id, rs);
t.mElement = e;
t.mDimX = dimX;
}
}
- int id = mRS.nTypeCreate(mElement.getID(mRS),
+ long id = mRS.nTypeCreate(mElement.getID(mRS),
mDimX, mDimY, mDimZ, mDimMipmaps, mDimFaces, mYuv);
Type t = new Type(id, mRS);
t.mElement = mElement;
$(rs_generated_include_dir) \
$(call include-path-for, corecg graphics)
-LOCAL_CFLAGS +=
+LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_LDLIBS := -lpthread
LOCAL_ADDITIONAL_DEPENDENCIES := $(addprefix $(rs_generated_include_dir)/,rsgApiFuncDecl.h)
static void _nInit(JNIEnv *_env, jclass _this)
{
- gContextId = _env->GetFieldID(_this, "mContext", "I");
+ gContextId = _env->GetFieldID(_this, "mContext", "J");
jclass bitmapClass = _env->FindClass("android/graphics/Bitmap");
gNativeBitmapID = _env->GetFieldID(bitmapClass, "mNativeBitmap", "I");
// ---------------------------------------------------------------------------
static void
-nContextFinish(JNIEnv *_env, jobject _this, RsContext con)
+nContextFinish(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextFinish, con(%p)", con);
- rsContextFinish(con);
+ rsContextFinish((RsContext)con);
}
static void
-nAssignName(JNIEnv *_env, jobject _this, RsContext con, jint obj, jbyteArray str)
+nAssignName(JNIEnv *_env, jobject _this, jlong con, jlong obj, jbyteArray str)
{
LOG_API("nAssignName, con(%p), obj(%p)", con, (void *)obj);
jint len = _env->GetArrayLength(str);
jbyte * cptr = (jbyte *) _env->GetPrimitiveArrayCritical(str, 0);
- rsAssignName(con, (void *)obj, (const char *)cptr, len);
+ rsAssignName((RsContext)con, (void *)obj, (const char *)cptr, len);
_env->ReleasePrimitiveArrayCritical(str, cptr, JNI_ABORT);
}
static jstring
-nGetName(JNIEnv *_env, jobject _this, RsContext con, jint obj)
+nGetName(JNIEnv *_env, jobject _this, jlong con, jlong obj)
{
LOG_API("nGetName, con(%p), obj(%p)", con, (void *)obj);
const char *name = NULL;
- rsaGetName(con, (void *)obj, &name);
+ rsaGetName((RsContext)con, (void *)obj, &name);
if(name == NULL || strlen(name) == 0) {
return NULL;
}
}
static void
-nObjDestroy(JNIEnv *_env, jobject _this, RsContext con, jint obj)
+nObjDestroy(JNIEnv *_env, jobject _this, jlong con, jlong obj)
{
LOG_API("nObjDestroy, con(%p) obj(%p)", con, (void *)obj);
- rsObjDestroy(con, (void *)obj);
+ rsObjDestroy((RsContext)con, (void *)obj);
}
// ---------------------------------------------------------------------------
-static jint
+static jlong
nDeviceCreate(JNIEnv *_env, jobject _this)
{
LOG_API("nDeviceCreate");
return rsDeviceSetConfig((RsDevice)dev, (RsDeviceParam)p, value);
}
-static jint
+static jlong
nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jint sdkVer, jint ct)
{
LOG_API("nContextCreate");
return (jint)rsContextCreate((RsDevice)dev, ver, sdkVer, (RsContextType)ct, 0);
}
-static jint
+static jlong
nContextCreateGL(JNIEnv *_env, jobject _this, jint dev, jint ver, jint sdkVer,
int colorMin, int colorPref,
int alphaMin, int alphaPref,
}
static void
-nContextSetPriority(JNIEnv *_env, jobject _this, RsContext con, jint p)
+nContextSetPriority(JNIEnv *_env, jobject _this, jlong con, jint p)
{
LOG_API("ContextSetPriority, con(%p), priority(%i)", con, p);
- rsContextSetPriority(con, p);
+ rsContextSetPriority((RsContext)con, p);
}
static void
-nContextSetSurface(JNIEnv *_env, jobject _this, RsContext con, jint width, jint height, jobject wnd)
+nContextSetSurface(JNIEnv *_env, jobject _this, jlong con, jint width, jint height, jobject wnd)
{
LOG_API("nContextSetSurface, con(%p), width(%i), height(%i), surface(%p)", con, width, height, (Surface *)wnd);
window = android_view_Surface_getNativeWindow(_env, wnd).get();
}
- rsContextSetSurface(con, width, height, window);
+ rsContextSetSurface((RsContext)con, width, height, window);
}
static void
-nContextDestroy(JNIEnv *_env, jobject _this, RsContext con)
+nContextDestroy(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextDestroy, con(%p)", con);
- rsContextDestroy(con);
+ rsContextDestroy((RsContext)con);
}
static void
-nContextDump(JNIEnv *_env, jobject _this, RsContext con, jint bits)
+nContextDump(JNIEnv *_env, jobject _this, jlong con, jint bits)
{
LOG_API("nContextDump, con(%p) bits(%i)", (RsContext)con, bits);
rsContextDump((RsContext)con, bits);
}
static void
-nContextPause(JNIEnv *_env, jobject _this, RsContext con)
+nContextPause(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextPause, con(%p)", con);
- rsContextPause(con);
+ rsContextPause((RsContext)con);
}
static void
-nContextResume(JNIEnv *_env, jobject _this, RsContext con)
+nContextResume(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextResume, con(%p)", con);
- rsContextResume(con);
+ rsContextResume((RsContext)con);
}
static jstring
-nContextGetErrorMessage(JNIEnv *_env, jobject _this, RsContext con)
+nContextGetErrorMessage(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextGetErrorMessage, con(%p)", con);
char buf[1024];
size_t receiveLen;
uint32_t subID;
- int id = rsContextGetMessage(con,
+ int id = rsContextGetMessage((RsContext)con,
buf, sizeof(buf),
&receiveLen, sizeof(receiveLen),
&subID, sizeof(subID));
}
static jint
-nContextGetUserMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray data)
+nContextGetUserMessage(JNIEnv *_env, jobject _this, jlong con, jintArray data)
{
jint len = _env->GetArrayLength(data);
LOG_API("nContextGetMessage, con(%p), len(%i)", con, len);
jint *ptr = _env->GetIntArrayElements(data, NULL);
size_t receiveLen;
uint32_t subID;
- int id = rsContextGetMessage(con,
+ int id = rsContextGetMessage((RsContext)con,
ptr, len * 4,
&receiveLen, sizeof(receiveLen),
&subID, sizeof(subID));
}
static jint
-nContextPeekMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray auxData)
+nContextPeekMessage(JNIEnv *_env, jobject _this, jlong con, jintArray auxData)
{
LOG_API("nContextPeekMessage, con(%p)", con);
jint *auxDataPtr = _env->GetIntArrayElements(auxData, NULL);
size_t receiveLen;
uint32_t subID;
- int id = rsContextPeekMessage(con, &receiveLen, sizeof(receiveLen),
+ int id = rsContextPeekMessage((RsContext)con, &receiveLen, sizeof(receiveLen),
&subID, sizeof(subID));
auxDataPtr[0] = (jint)subID;
auxDataPtr[1] = (jint)receiveLen;
return id;
}
-static void nContextInitToClient(JNIEnv *_env, jobject _this, RsContext con)
+static void nContextInitToClient(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextInitToClient, con(%p)", con);
- rsContextInitToClient(con);
+ rsContextInitToClient((RsContext)con);
}
-static void nContextDeinitToClient(JNIEnv *_env, jobject _this, RsContext con)
+static void nContextDeinitToClient(JNIEnv *_env, jobject _this, jlong con)
{
LOG_API("nContextDeinitToClient, con(%p)", con);
- rsContextDeinitToClient(con);
+ rsContextDeinitToClient((RsContext)con);
}
static void
-nContextSendMessage(JNIEnv *_env, jobject _this, RsContext con, jint id, jintArray data)
+nContextSendMessage(JNIEnv *_env, jobject _this, jlong con, jint id, jintArray data)
{
jint *ptr = NULL;
jint len = 0;
jint *ptr = _env->GetIntArrayElements(data, NULL);
}
LOG_API("nContextSendMessage, con(%p), id(%i), len(%i)", con, id, len);
- rsContextSendMessage(con, id, (const uint8_t *)ptr, len * sizeof(int));
+ rsContextSendMessage((RsContext)con, id, (const uint8_t *)ptr, len * sizeof(int));
if (data) {
_env->ReleaseIntArrayElements(data, ptr, JNI_ABORT);
}
-static jint
-nElementCreate(JNIEnv *_env, jobject _this, RsContext con, jint type, jint kind, jboolean norm, jint size)
+static jlong
+nElementCreate(JNIEnv *_env, jobject _this, jlong con, jlong type, jint kind, jboolean norm, jint size)
{
LOG_API("nElementCreate, con(%p), type(%i), kind(%i), norm(%i), size(%i)", con, type, kind, norm, size);
- return (jint)rsElementCreate(con, (RsDataType)type, (RsDataKind)kind, norm, size);
+ return (jlong)rsElementCreate((RsContext)con, (RsDataType)type, (RsDataKind)kind, norm, size);
}
-static jint
-nElementCreate2(JNIEnv *_env, jobject _this, RsContext con,
+static jlong
+nElementCreate2(JNIEnv *_env, jobject _this, jlong con,
jintArray _ids, jobjectArray _names, jintArray _arraySizes)
{
int fieldCount = _env->GetArrayLength(_ids);
const char **nameArray = names.c_str();
size_t *sizeArray = names.c_str_len();
- jint id = (jint)rsElementCreate2(con,
+ jlong id = (jlong)rsElementCreate2((RsContext)con,
(RsElement *)ids, fieldCount,
nameArray, fieldCount * sizeof(size_t), sizeArray,
(const uint32_t *)arraySizes, fieldCount);
}
static void
-nElementGetNativeData(JNIEnv *_env, jobject _this, RsContext con, jint id, jintArray _elementData)
+nElementGetNativeData(JNIEnv *_env, jobject _this, jlong con, jlong id, jintArray _elementData)
{
int dataSize = _env->GetArrayLength(_elementData);
LOG_API("nElementGetNativeData, con(%p)", con);
assert(dataSize == 5);
uint32_t elementData[5];
- rsaElementGetNativeData(con, (RsElement)id, elementData, dataSize);
+ rsaElementGetNativeData((RsContext)con, (RsElement)id, elementData, dataSize);
for(jint i = 0; i < dataSize; i ++) {
_env->SetIntArrayRegion(_elementData, i, 1, (const jint*)&elementData[i]);
static void
-nElementGetSubElements(JNIEnv *_env, jobject _this, RsContext con, jint id,
+nElementGetSubElements(JNIEnv *_env, jobject _this, jlong con, jlong id,
jintArray _IDs,
jobjectArray _names,
jintArray _arraySizes)
const char **names = (const char **)malloc((uint32_t)dataSize * sizeof(const char *));
uint32_t *arraySizes = (uint32_t *)malloc((uint32_t)dataSize * sizeof(uint32_t));
- rsaElementGetSubElements(con, (RsElement)id, ids, names, arraySizes, (uint32_t)dataSize);
+ rsaElementGetSubElements((RsContext)con, (RsElement)id, ids, names, arraySizes, (uint32_t)dataSize);
for(jint i = 0; i < dataSize; i++) {
_env->SetObjectArrayElement(_names, i, _env->NewStringUTF(names[i]));
// -----------------------------------
-static int
-nTypeCreate(JNIEnv *_env, jobject _this, RsContext con, RsElement eid,
+static jlong
+nTypeCreate(JNIEnv *_env, jobject _this, jlong con, jlong eid,
jint dimx, jint dimy, jint dimz, jboolean mips, jboolean faces, jint yuv)
{
LOG_API("nTypeCreate, con(%p) eid(%p), x(%i), y(%i), z(%i), mips(%i), faces(%i), yuv(%i)",
con, eid, dimx, dimy, dimz, mips, faces, yuv);
- jint id = (jint)rsTypeCreate(con, (RsElement)eid, dimx, dimy, dimz, mips, faces, yuv);
- return (jint)id;
+ return (jlong)rsTypeCreate((RsContext)con, (RsElement)eid, dimx, dimy, dimz, mips, faces, yuv);
}
static void
-nTypeGetNativeData(JNIEnv *_env, jobject _this, RsContext con, jint id, jintArray _typeData)
+nTypeGetNativeData(JNIEnv *_env, jobject _this, jlong con, jlong id, jintArray _typeData)
{
// We are packing 6 items: mDimX; mDimY; mDimZ;
// mDimLOD; mDimFaces; mElement; into typeData
LOG_API("nTypeCreate, con(%p)", con);
uint32_t typeData[6];
- rsaTypeGetNativeData(con, (RsType)id, typeData, 6);
+ rsaTypeGetNativeData((RsContext)con, (RsType)id, typeData, 6);
for(jint i = 0; i < elementCount; i ++) {
_env->SetIntArrayRegion(_typeData, i, 1, (const jint*)&typeData[i]);
// -----------------------------------
-static jint
-nAllocationCreateTyped(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mips, jint usage, jint pointer)
+static jlong
+nAllocationCreateTyped(JNIEnv *_env, jobject _this, jlong con, jlong type, jint mips, jint usage, jint pointer)
{
LOG_API("nAllocationCreateTyped, con(%p), type(%p), mip(%i), usage(%i), ptr(%p)", con, (RsElement)type, mips, usage, (void *)pointer);
- return (jint) rsAllocationCreateTyped(con, (RsType)type, (RsAllocationMipmapControl)mips, (uint32_t)usage, (uint32_t)pointer);
+ return (jint) rsAllocationCreateTyped((RsContext)con, (RsType)type, (RsAllocationMipmapControl)mips, (uint32_t)usage, (uint32_t)pointer);
}
static void
-nAllocationSyncAll(JNIEnv *_env, jobject _this, RsContext con, jint a, jint bits)
+nAllocationSyncAll(JNIEnv *_env, jobject _this, jlong con, jlong a, jint bits)
{
LOG_API("nAllocationSyncAll, con(%p), a(%p), bits(0x%08x)", con, (RsAllocation)a, bits);
- rsAllocationSyncAll(con, (RsAllocation)a, (RsAllocationUsageType)bits);
+ rsAllocationSyncAll((RsContext)con, (RsAllocation)a, (RsAllocationUsageType)bits);
}
static jobject
-nAllocationGetSurface(JNIEnv *_env, jobject _this, RsContext con, jint a)
+nAllocationGetSurface(JNIEnv *_env, jobject _this, jlong con, jlong a)
{
LOG_API("nAllocationGetSurface, con(%p), a(%p)", con, (RsAllocation)a);
- IGraphicBufferProducer *v = (IGraphicBufferProducer *)rsAllocationGetSurface(con, (RsAllocation)a);
+ IGraphicBufferProducer *v = (IGraphicBufferProducer *)rsAllocationGetSurface((RsContext)con, (RsAllocation)a);
sp<IGraphicBufferProducer> bp = v;
v->decStrong(NULL);
}
static void
-nAllocationSetSurface(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc, jobject sur)
+nAllocationSetSurface(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jobject sur)
{
LOG_API("nAllocationSetSurface, con(%p), alloc(%p), surface(%p)",
con, alloc, (Surface *)sur);
s = android_view_Surface_getSurface(_env, sur);
}
- rsAllocationSetSurface(con, alloc, static_cast<ANativeWindow *>(s.get()));
+ rsAllocationSetSurface((RsContext)con, (RsAllocation)alloc, static_cast<ANativeWindow *>(s.get()));
}
static void
-nAllocationIoSend(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc)
+nAllocationIoSend(JNIEnv *_env, jobject _this, jlong con, jlong alloc)
{
LOG_API("nAllocationIoSend, con(%p), alloc(%p)", con, alloc);
- rsAllocationIoSend(con, alloc);
+ rsAllocationIoSend((RsContext)con, (RsAllocation)alloc);
}
static void
-nAllocationIoReceive(JNIEnv *_env, jobject _this, RsContext con, RsAllocation alloc)
+nAllocationIoReceive(JNIEnv *_env, jobject _this, jlong con, jlong alloc)
{
LOG_API("nAllocationIoReceive, con(%p), alloc(%p)", con, alloc);
- rsAllocationIoReceive(con, alloc);
+ rsAllocationIoReceive((RsContext)con, (RsAllocation)alloc);
}
static void
-nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, RsContext con, jint alloc)
+nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, jlong con, jlong alloc)
{
LOG_API("nAllocationGenerateMipmaps, con(%p), a(%p)", con, (RsAllocation)alloc);
- rsAllocationGenerateMipmaps(con, (RsAllocation)alloc);
+ rsAllocationGenerateMipmaps((RsContext)con, (RsAllocation)alloc);
}
-static int
-nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mip, jobject jbitmap, jint usage)
+static jlong
+nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong type, jint mip, jobject jbitmap, jint usage)
{
SkBitmap const * nativeBitmap =
(SkBitmap const *)_env->GetIntField(jbitmap, gNativeBitmapID);
bitmap.lockPixels();
const void* ptr = bitmap.getPixels();
- jint id = (jint)rsAllocationCreateFromBitmap(con,
+ jlong id = (jlong)rsAllocationCreateFromBitmap((RsContext)con,
(RsType)type, (RsAllocationMipmapControl)mip,
ptr, bitmap.getSize(), usage);
bitmap.unlockPixels();
return id;
}
-static int
-nAllocationCreateBitmapBackedAllocation(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mip, jobject jbitmap, jint usage)
+static jlong
+nAllocationCreateBitmapBackedAllocation(JNIEnv *_env, jobject _this, jlong con, jlong type, jint mip, jobject jbitmap, jint usage)
{
SkBitmap const * nativeBitmap =
(SkBitmap const *)_env->GetIntField(jbitmap, gNativeBitmapID);
bitmap.lockPixels();
const void* ptr = bitmap.getPixels();
- jint id = (jint)rsAllocationCreateTyped(con,
+ jlong id = (jlong)rsAllocationCreateTyped((RsContext)con,
(RsType)type, (RsAllocationMipmapControl)mip,
(uint32_t)usage, (size_t)ptr);
bitmap.unlockPixels();
return id;
}
-static int
-nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mip, jobject jbitmap, jint usage)
+static jlong
+nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong type, jint mip, jobject jbitmap, jint usage)
{
SkBitmap const * nativeBitmap =
(SkBitmap const *)_env->GetIntField(jbitmap, gNativeBitmapID);
bitmap.lockPixels();
const void* ptr = bitmap.getPixels();
- jint id = (jint)rsAllocationCubeCreateFromBitmap(con,
+ jlong id = (jlong)rsAllocationCubeCreateFromBitmap((RsContext)con,
(RsType)type, (RsAllocationMipmapControl)mip,
ptr, bitmap.getSize(), usage);
bitmap.unlockPixels();
}
static void
-nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap)
+nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jobject jbitmap)
{
SkBitmap const * nativeBitmap =
(SkBitmap const *)_env->GetIntField(jbitmap, gNativeBitmapID);
bitmap.lockPixels();
const void* ptr = bitmap.getPixels();
- rsAllocation2DData(con, (RsAllocation)alloc, 0, 0,
+ rsAllocation2DData((RsContext)con, (RsAllocation)alloc, 0, 0,
0, RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X,
w, h, ptr, bitmap.getSize(), 0);
bitmap.unlockPixels();
}
static void
-nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap)
+nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jobject jbitmap)
{
SkBitmap const * nativeBitmap =
(SkBitmap const *)_env->GetIntField(jbitmap, gNativeBitmapID);
bitmap.lockPixels();
void* ptr = bitmap.getPixels();
- rsAllocationCopyToBitmap(con, (RsAllocation)alloc, ptr, bitmap.getSize());
+ rsAllocationCopyToBitmap((RsContext)con, (RsAllocation)alloc, ptr, bitmap.getSize());
bitmap.unlockPixels();
bitmap.notifyPixelsChanged();
}
static void
-nAllocationData1D(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jint offset, jint lod,
+nAllocationData1D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint offset, jint lod,
jint count, jobject data, int sizeBytes, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
LOG_API("nAllocation1DData, con(%p), adapter(%p), offset(%i), count(%i), len(%i), sizeBytes(%i), dataType(%i)",
con, alloc, offset, count, len, sizeBytes, dataType);
- PER_ARRAY_TYPE(NULL, rsAllocation1DData, con, alloc, offset, lod, count, ptr, sizeBytes);
+ PER_ARRAY_TYPE(NULL, rsAllocation1DData, (RsContext)con, alloc, offset, lod, count, ptr, sizeBytes);
}
static void
// native void rsnAllocationElementData1D(int con, int id, int xoff, int compIdx, byte[] d, int sizeBytes);
-nAllocationElementData1D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint compIdx, jbyteArray data, int sizeBytes)
+nAllocationElementData1D(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jint offset, jint lod, jint compIdx, jbyteArray data, int sizeBytes)
{
jint len = _env->GetArrayLength(data);
LOG_API("nAllocationElementData1D, con(%p), alloc(%p), offset(%i), comp(%i), len(%i), sizeBytes(%i)", con, (RsAllocation)alloc, offset, compIdx, len, sizeBytes);
jbyte *ptr = _env->GetByteArrayElements(data, NULL);
- rsAllocation1DElementData(con, (RsAllocation)alloc, offset, lod, ptr, sizeBytes, compIdx);
+ rsAllocation1DElementData((RsContext)con, (RsAllocation)alloc, offset, lod, ptr, sizeBytes, compIdx);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}
static void
-nAllocationData2D(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jint xoff, jint yoff, jint lod, jint _face,
+nAllocationData2D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint lod, jint _face,
jint w, jint h, jobject data, int sizeBytes, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
RsAllocationCubemapFace face = (RsAllocationCubemapFace)_face;
LOG_API("nAllocation2DData, con(%p), adapter(%p), xoff(%i), yoff(%i), w(%i), h(%i), len(%i) type(%i)",
con, alloc, xoff, yoff, w, h, sizeBytes, dataType);
- PER_ARRAY_TYPE(NULL, rsAllocation2DData, con, alloc, xoff, yoff, lod, face, w, h, ptr, sizeBytes, 0);
+ PER_ARRAY_TYPE(NULL, rsAllocation2DData, (RsContext)con, alloc, xoff, yoff, lod, face, w, h, ptr, sizeBytes, 0);
}
static void
-nAllocationData2D_alloc(JNIEnv *_env, jobject _this, RsContext con,
- jint dstAlloc, jint dstXoff, jint dstYoff,
+nAllocationData2D_alloc(JNIEnv *_env, jobject _this, jlong con,
+ jlong dstAlloc, jint dstXoff, jint dstYoff,
jint dstMip, jint dstFace,
jint width, jint height,
- jint srcAlloc, jint srcXoff, jint srcYoff,
+ jlong srcAlloc, jint srcXoff, jint srcYoff,
jint srcMip, jint srcFace)
{
LOG_API("nAllocation2DData_s, con(%p), dstAlloc(%p), dstXoff(%i), dstYoff(%i),"
con, (RsAllocation)dstAlloc, dstXoff, dstYoff, dstMip, dstFace,
width, height, (RsAllocation)srcAlloc, srcXoff, srcYoff, srcMip, srcFace);
- rsAllocationCopy2DRange(con,
+ rsAllocationCopy2DRange((RsContext)con,
(RsAllocation)dstAlloc,
dstXoff, dstYoff,
dstMip, dstFace,
}
static void
-nAllocationData3D(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jint xoff, jint yoff, jint zoff, jint lod,
+nAllocationData3D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint zoff, jint lod,
jint w, jint h, jint d, jobject data, int sizeBytes, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
LOG_API("nAllocation3DData, con(%p), alloc(%p), xoff(%i), yoff(%i), zoff(%i), lod(%i), w(%i), h(%i), d(%i), sizeBytes(%i)",
con, (RsAllocation)alloc, xoff, yoff, zoff, lod, w, h, d, sizeBytes);
- PER_ARRAY_TYPE(NULL, rsAllocation3DData, con, alloc, xoff, yoff, zoff, lod, w, h, d, ptr, sizeBytes, 0);
+ PER_ARRAY_TYPE(NULL, rsAllocation3DData, (RsContext)con, alloc, xoff, yoff, zoff, lod, w, h, d, ptr, sizeBytes, 0);
}
static void
-nAllocationData3D_alloc(JNIEnv *_env, jobject _this, RsContext con,
- jint dstAlloc, jint dstXoff, jint dstYoff, jint dstZoff,
+nAllocationData3D_alloc(JNIEnv *_env, jobject _this, jlong con,
+ jlong dstAlloc, jint dstXoff, jint dstYoff, jint dstZoff,
jint dstMip,
jint width, jint height, jint depth,
- jint srcAlloc, jint srcXoff, jint srcYoff, jint srcZoff,
+ jlong srcAlloc, jint srcXoff, jint srcYoff, jint srcZoff,
jint srcMip)
{
LOG_API("nAllocationData3D_alloc, con(%p), dstAlloc(%p), dstXoff(%i), dstYoff(%i),"
con, (RsAllocation)dstAlloc, dstXoff, dstYoff, dstMip, dstFace,
width, height, (RsAllocation)srcAlloc, srcXoff, srcYoff, srcMip, srcFace);
- rsAllocationCopy3DRange(con,
+ rsAllocationCopy3DRange((RsContext)con,
(RsAllocation)dstAlloc,
dstXoff, dstYoff, dstZoff, dstMip,
width, height, depth,
static void
-nAllocationRead(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jobject data, int dataType)
+nAllocationRead(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jobject data, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
LOG_API("nAllocationRead, con(%p), alloc(%p)", con, (RsAllocation)alloc);
- PER_ARRAY_TYPE(0, rsAllocationRead, con, alloc, ptr, len * typeBytes);
+ PER_ARRAY_TYPE(0, rsAllocationRead, (RsContext)con, alloc, ptr, len * typeBytes);
}
static void
-nAllocationRead1D(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jint offset, jint lod,
+nAllocationRead1D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint offset, jint lod,
jint count, jobject data, int sizeBytes, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
LOG_API("nAllocation1DRead, con(%p), adapter(%p), offset(%i), count(%i), len(%i), sizeBytes(%i), dataType(%i)",
con, alloc, offset, count, len, sizeBytes, dataType);
- PER_ARRAY_TYPE(0, rsAllocation1DRead, con, alloc, offset, lod, count, ptr, sizeBytes);
+ PER_ARRAY_TYPE(0, rsAllocation1DRead, (RsContext)con, alloc, offset, lod, count, ptr, sizeBytes);
}
static void
-nAllocationRead2D(JNIEnv *_env, jobject _this, RsContext con, jint _alloc, jint xoff, jint yoff, jint lod, jint _face,
+nAllocationRead2D(JNIEnv *_env, jobject _this, jlong con, jlong _alloc, jint xoff, jint yoff, jint lod, jint _face,
jint w, jint h, jobject data, int sizeBytes, int dataType)
{
RsAllocation *alloc = (RsAllocation *)_alloc;
RsAllocationCubemapFace face = (RsAllocationCubemapFace)_face;
LOG_API("nAllocation2DRead, con(%p), adapter(%p), xoff(%i), yoff(%i), w(%i), h(%i), len(%i) type(%i)",
con, alloc, xoff, yoff, w, h, sizeBytes, dataType);
- PER_ARRAY_TYPE(0, rsAllocation2DRead, con, alloc, xoff, yoff, lod, face, w, h, ptr, sizeBytes, 0);
+ PER_ARRAY_TYPE(0, rsAllocation2DRead, (RsContext)con, alloc, xoff, yoff, lod, face, w, h, ptr, sizeBytes, 0);
}
-static jint
-nAllocationGetType(JNIEnv *_env, jobject _this, RsContext con, jint a)
+static jlong
+nAllocationGetType(JNIEnv *_env, jobject _this, jlong con, jlong a)
{
LOG_API("nAllocationGetType, con(%p), a(%p)", con, (RsAllocation)a);
- return (jint) rsaAllocationGetType(con, (RsAllocation)a);
+ return (jlong) rsaAllocationGetType((RsContext)con, (RsAllocation)a);
}
static void
-nAllocationResize1D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint dimX)
+nAllocationResize1D(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jint dimX)
{
LOG_API("nAllocationResize1D, con(%p), alloc(%p), sizeX(%i)", con, (RsAllocation)alloc, dimX);
- rsAllocationResize1D(con, (RsAllocation)alloc, dimX);
+ rsAllocationResize1D((RsContext)con, (RsAllocation)alloc, dimX);
}
// -----------------------------------
-static int
-nFileA3DCreateFromAssetStream(JNIEnv *_env, jobject _this, RsContext con, jint native_asset)
+static jlong
+nFileA3DCreateFromAssetStream(JNIEnv *_env, jobject _this, jlong con, jlong native_asset)
{
ALOGV("______nFileA3D %u", (uint32_t) native_asset);
Asset* asset = reinterpret_cast<Asset*>(native_asset);
- jint id = (jint)rsaFileA3DCreateFromMemory(con, asset->getBuffer(false), asset->getLength());
+ jlong id = (jlong)rsaFileA3DCreateFromMemory((RsContext)con, asset->getBuffer(false), asset->getLength());
return id;
}
-static int
-nFileA3DCreateFromAsset(JNIEnv *_env, jobject _this, RsContext con, jobject _assetMgr, jstring _path)
+static jlong
+nFileA3DCreateFromAsset(JNIEnv *_env, jobject _this, jlong con, jobject _assetMgr, jstring _path)
{
AssetManager* mgr = assetManagerForJavaObject(_env, _assetMgr);
if (mgr == NULL) {
return 0;
}
- jint id = (jint)rsaFileA3DCreateFromAsset(con, asset);
+ jlong id = (jlong)rsaFileA3DCreateFromAsset((RsContext)con, asset);
return id;
}
-static int
-nFileA3DCreateFromFile(JNIEnv *_env, jobject _this, RsContext con, jstring fileName)
+static jlong
+nFileA3DCreateFromFile(JNIEnv *_env, jobject _this, jlong con, jstring fileName)
{
AutoJavaStringToUTF8 fileNameUTF(_env, fileName);
- jint id = (jint)rsaFileA3DCreateFromFile(con, fileNameUTF.c_str());
+ jlong id = (jlong)rsaFileA3DCreateFromFile((RsContext)con, fileNameUTF.c_str());
return id;
}
-static int
-nFileA3DGetNumIndexEntries(JNIEnv *_env, jobject _this, RsContext con, jint fileA3D)
+static jint
+nFileA3DGetNumIndexEntries(JNIEnv *_env, jobject _this, jlong con, jlong fileA3D)
{
int32_t numEntries = 0;
- rsaFileA3DGetNumIndexEntries(con, &numEntries, (RsFile)fileA3D);
+ rsaFileA3DGetNumIndexEntries((RsContext)con, &numEntries, (RsFile)fileA3D);
return numEntries;
}
static void
-nFileA3DGetIndexEntries(JNIEnv *_env, jobject _this, RsContext con, jint fileA3D, jint numEntries, jintArray _ids, jobjectArray _entries)
+nFileA3DGetIndexEntries(JNIEnv *_env, jobject _this, jlong con, jlong fileA3D, jint numEntries, jintArray _ids, jobjectArray _entries)
{
ALOGV("______nFileA3D %u", (uint32_t) fileA3D);
RsFileIndexEntry *fileEntries = (RsFileIndexEntry*)malloc((uint32_t)numEntries * sizeof(RsFileIndexEntry));
- rsaFileA3DGetIndexEntries(con, fileEntries, (uint32_t)numEntries, (RsFile)fileA3D);
+ rsaFileA3DGetIndexEntries((RsContext)con, fileEntries, (uint32_t)numEntries, (RsFile)fileA3D);
for(jint i = 0; i < numEntries; i ++) {
_env->SetObjectArrayElement(_entries, i, _env->NewStringUTF(fileEntries[i].objectName));
}
static int
-nFileA3DGetEntryByIndex(JNIEnv *_env, jobject _this, RsContext con, jint fileA3D, jint index)
+nFileA3DGetEntryByIndex(JNIEnv *_env, jobject _this, jlong con, jlong fileA3D, jint index)
{
ALOGV("______nFileA3D %u", (uint32_t) fileA3D);
- jint id = (jint)rsaFileA3DGetEntryByIndex(con, (uint32_t)index, (RsFile)fileA3D);
+ jint id = (jint)rsaFileA3DGetEntryByIndex((RsContext)con, (uint32_t)index, (RsFile)fileA3D);
return id;
}
// -----------------------------------
static int
-nFontCreateFromFile(JNIEnv *_env, jobject _this, RsContext con,
+nFontCreateFromFile(JNIEnv *_env, jobject _this, jlong con,
jstring fileName, jfloat fontSize, jint dpi)
{
AutoJavaStringToUTF8 fileNameUTF(_env, fileName);
- jint id = (jint)rsFontCreateFromFile(con,
+ jint id = (jint)rsFontCreateFromFile((RsContext)con,
fileNameUTF.c_str(), fileNameUTF.length(),
fontSize, dpi);
}
static int
-nFontCreateFromAssetStream(JNIEnv *_env, jobject _this, RsContext con,
+nFontCreateFromAssetStream(JNIEnv *_env, jobject _this, jlong con,
jstring name, jfloat fontSize, jint dpi, jint native_asset)
{
Asset* asset = reinterpret_cast<Asset*>(native_asset);
AutoJavaStringToUTF8 nameUTF(_env, name);
- jint id = (jint)rsFontCreateFromMemory(con,
+ jint id = (jint)rsFontCreateFromMemory((RsContext)con,
nameUTF.c_str(), nameUTF.length(),
fontSize, dpi,
asset->getBuffer(false), asset->getLength());
}
static int
-nFontCreateFromAsset(JNIEnv *_env, jobject _this, RsContext con, jobject _assetMgr, jstring _path,
+nFontCreateFromAsset(JNIEnv *_env, jobject _this, jlong con, jobject _assetMgr, jstring _path,
jfloat fontSize, jint dpi)
{
AssetManager* mgr = assetManagerForJavaObject(_env, _assetMgr);
return 0;
}
- jint id = (jint)rsFontCreateFromMemory(con,
+ jint id = (jint)rsFontCreateFromMemory((RsContext)con,
str.c_str(), str.length(),
fontSize, dpi,
asset->getBuffer(false), asset->getLength());
// -----------------------------------
static void
-nScriptBindAllocation(JNIEnv *_env, jobject _this, RsContext con, jint script, jint alloc, jint slot)
+nScriptBindAllocation(JNIEnv *_env, jobject _this, jlong con, jlong script, jlong alloc, jint slot)
{
LOG_API("nScriptBindAllocation, con(%p), script(%p), alloc(%p), slot(%i)", con, (RsScript)script, (RsAllocation)alloc, slot);
- rsScriptBindAllocation(con, (RsScript)script, (RsAllocation)alloc, slot);
+ rsScriptBindAllocation((RsContext)con, (RsScript)script, (RsAllocation)alloc, slot);
}
static void
-nScriptSetVarI(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val)
+nScriptSetVarI(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jint val)
{
LOG_API("nScriptSetVarI, con(%p), s(%p), slot(%i), val(%i)", con, (void *)script, slot, val);
- rsScriptSetVarI(con, (RsScript)script, slot, val);
+ rsScriptSetVarI((RsContext)con, (RsScript)script, slot, val);
}
static jint
-nScriptGetVarI(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+nScriptGetVarI(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot)
{
LOG_API("nScriptGetVarI, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
int value = 0;
- rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+ rsScriptGetVarV((RsContext)con, (RsScript)script, slot, &value, sizeof(value));
return value;
}
static void
-nScriptSetVarObj(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val)
+nScriptSetVarObj(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jlong val)
{
LOG_API("nScriptSetVarObj, con(%p), s(%p), slot(%i), val(%i)", con, (void *)script, slot, val);
- rsScriptSetVarObj(con, (RsScript)script, slot, (RsObjectBase)val);
+ rsScriptSetVarObj((RsContext)con, (RsScript)script, slot, (RsObjectBase)val);
}
static void
-nScriptSetVarJ(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jlong val)
+nScriptSetVarJ(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jlong val)
{
LOG_API("nScriptSetVarJ, con(%p), s(%p), slot(%i), val(%lli)", con, (void *)script, slot, val);
- rsScriptSetVarJ(con, (RsScript)script, slot, val);
+ rsScriptSetVarJ((RsContext)con, (RsScript)script, slot, val);
}
static jlong
-nScriptGetVarJ(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+nScriptGetVarJ(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot)
{
LOG_API("nScriptGetVarJ, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jlong value = 0;
- rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+ rsScriptGetVarV((RsContext)con, (RsScript)script, slot, &value, sizeof(value));
return value;
}
static void
-nScriptSetVarF(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, float val)
+nScriptSetVarF(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, float val)
{
LOG_API("nScriptSetVarF, con(%p), s(%p), slot(%i), val(%f)", con, (void *)script, slot, val);
- rsScriptSetVarF(con, (RsScript)script, slot, val);
+ rsScriptSetVarF((RsContext)con, (RsScript)script, slot, val);
}
static jfloat
-nScriptGetVarF(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+nScriptGetVarF(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot)
{
LOG_API("nScriptGetVarF, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jfloat value = 0;
- rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+ rsScriptGetVarV((RsContext)con, (RsScript)script, slot, &value, sizeof(value));
return value;
}
static void
-nScriptSetVarD(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, double val)
+nScriptSetVarD(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, double val)
{
LOG_API("nScriptSetVarD, con(%p), s(%p), slot(%i), val(%lf)", con, (void *)script, slot, val);
- rsScriptSetVarD(con, (RsScript)script, slot, val);
+ rsScriptSetVarD((RsContext)con, (RsScript)script, slot, val);
}
static jdouble
-nScriptGetVarD(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot)
+nScriptGetVarD(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot)
{
LOG_API("nScriptGetVarD, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jdouble value = 0;
- rsScriptGetVarV(con, (RsScript)script, slot, &value, sizeof(value));
+ rsScriptGetVarV((RsContext)con, (RsScript)script, slot, &value, sizeof(value));
return value;
}
static void
-nScriptSetVarV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
+nScriptSetVarV(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jbyteArray data)
{
LOG_API("nScriptSetVarV, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(data);
jbyte *ptr = _env->GetByteArrayElements(data, NULL);
- rsScriptSetVarV(con, (RsScript)script, slot, ptr, len);
+ rsScriptSetVarV((RsContext)con, (RsScript)script, slot, ptr, len);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}
static void
-nScriptGetVarV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
+nScriptGetVarV(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jbyteArray data)
{
LOG_API("nScriptSetVarV, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(data);
jbyte *ptr = _env->GetByteArrayElements(data, NULL);
- rsScriptGetVarV(con, (RsScript)script, slot, ptr, len);
+ rsScriptGetVarV((RsContext)con, (RsScript)script, slot, ptr, len);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}
static void
-nScriptSetVarVE(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data, jint elem, jintArray dims)
+nScriptSetVarVE(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jbyteArray data, jlong elem, jintArray dims)
{
LOG_API("nScriptSetVarVE, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(data);
jbyte *ptr = _env->GetByteArrayElements(data, NULL);
jint dimsLen = _env->GetArrayLength(dims) * sizeof(int);
jint *dimsPtr = _env->GetIntArrayElements(dims, NULL);
- rsScriptSetVarVE(con, (RsScript)script, slot, ptr, len, (RsElement)elem,
+ rsScriptSetVarVE((RsContext)con, (RsScript)script, slot, ptr, len, (RsElement)elem,
(const size_t*) dimsPtr, dimsLen);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
_env->ReleaseIntArrayElements(dims, dimsPtr, JNI_ABORT);
static void
-nScriptSetTimeZone(JNIEnv *_env, jobject _this, RsContext con, jint script, jbyteArray timeZone)
+nScriptSetTimeZone(JNIEnv *_env, jobject _this, jlong con, jlong script, jbyteArray timeZone)
{
LOG_API("nScriptCSetTimeZone, con(%p), s(%p), timeZone(%s)", con, (void *)script, (const char *)timeZone);
jbyte* timeZone_ptr;
timeZone_ptr = (jbyte *) _env->GetPrimitiveArrayCritical(timeZone, (jboolean *)0);
- rsScriptSetTimeZone(con, (RsScript)script, (const char *)timeZone_ptr, length);
+ rsScriptSetTimeZone((RsContext)con, (RsScript)script, (const char *)timeZone_ptr, length);
if (timeZone_ptr) {
_env->ReleasePrimitiveArrayCritical(timeZone, timeZone_ptr, 0);
}
static void
-nScriptInvoke(JNIEnv *_env, jobject _this, RsContext con, jint obj, jint slot)
+nScriptInvoke(JNIEnv *_env, jobject _this, jlong con, jlong obj, jint slot)
{
LOG_API("nScriptInvoke, con(%p), script(%p)", con, (void *)obj);
- rsScriptInvoke(con, (RsScript)obj, slot);
+ rsScriptInvoke((RsContext)con, (RsScript)obj, slot);
}
static void
-nScriptInvokeV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
+nScriptInvokeV(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, jbyteArray data)
{
LOG_API("nScriptInvokeV, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(data);
jbyte *ptr = _env->GetByteArrayElements(data, NULL);
- rsScriptInvokeV(con, (RsScript)script, slot, ptr, len);
+ rsScriptInvokeV((RsContext)con, (RsScript)script, slot, ptr, len);
_env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}
static void
-nScriptForEach(JNIEnv *_env, jobject _this, RsContext con,
- jint script, jint slot, jint ain, jint aout)
+nScriptForEach(JNIEnv *_env, jobject _this, jlong con,
+ jlong script, jint slot, jlong ain, jlong aout)
{
LOG_API("nScriptForEach, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
- rsScriptForEach(con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, NULL, 0, NULL, 0);
+ rsScriptForEach((RsContext)con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, NULL, 0, NULL, 0);
}
static void
-nScriptForEachV(JNIEnv *_env, jobject _this, RsContext con,
- jint script, jint slot, jint ain, jint aout, jbyteArray params)
+nScriptForEachV(JNIEnv *_env, jobject _this, jlong con,
+ jlong script, jint slot, jlong ain, jlong aout, jbyteArray params)
{
LOG_API("nScriptForEach, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(params);
jbyte *ptr = _env->GetByteArrayElements(params, NULL);
- rsScriptForEach(con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, ptr, len, NULL, 0);
+ rsScriptForEach((RsContext)con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, ptr, len, NULL, 0);
_env->ReleaseByteArrayElements(params, ptr, JNI_ABORT);
}
static void
-nScriptForEachClipped(JNIEnv *_env, jobject _this, RsContext con,
- jint script, jint slot, jint ain, jint aout,
+nScriptForEachClipped(JNIEnv *_env, jobject _this, jlong con,
+ jlong script, jint slot, jlong ain, jlong aout,
jint xstart, jint xend,
jint ystart, jint yend, jint zstart, jint zend)
{
sc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
sc.arrayStart = 0;
sc.arrayEnd = 0;
- rsScriptForEach(con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, NULL, 0, &sc, sizeof(sc));
+ rsScriptForEach((RsContext)con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, NULL, 0, &sc, sizeof(sc));
}
static void
-nScriptForEachClippedV(JNIEnv *_env, jobject _this, RsContext con,
- jint script, jint slot, jint ain, jint aout,
+nScriptForEachClippedV(JNIEnv *_env, jobject _this, jlong con,
+ jlong script, jint slot, jlong ain, jlong aout,
jbyteArray params, jint xstart, jint xend,
jint ystart, jint yend, jint zstart, jint zend)
{
sc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
sc.arrayStart = 0;
sc.arrayEnd = 0;
- rsScriptForEach(con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, ptr, len, &sc, sizeof(sc));
+ rsScriptForEach((RsContext)con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, ptr, len, &sc, sizeof(sc));
_env->ReleaseByteArrayElements(params, ptr, JNI_ABORT);
}
// -----------------------------------
static jint
-nScriptCCreate(JNIEnv *_env, jobject _this, RsContext con,
+nScriptCCreate(JNIEnv *_env, jobject _this, jlong con,
jstring resName, jstring cacheDir,
jbyteArray scriptRef, jint length)
{
script_ptr = (jbyte *)
_env->GetPrimitiveArrayCritical(scriptRef, (jboolean *)0);
- //rsScriptCSetText(con, (const char *)script_ptr, length);
+ //rsScriptCSetText((RsContext)con, (const char *)script_ptr, length);
- ret = (jint)rsScriptCCreate(con,
+ ret = (jint)rsScriptCCreate((RsContext)con,
resNameUTF.c_str(), resNameUTF.length(),
cacheDirUTF.c_str(), cacheDirUTF.length(),
(const char *)script_ptr, length);
return ret;
}
-static jint
-nScriptIntrinsicCreate(JNIEnv *_env, jobject _this, RsContext con, jint id, jint eid)
+static jlong
+nScriptIntrinsicCreate(JNIEnv *_env, jobject _this, jlong con, jint id, jlong eid)
{
LOG_API("nScriptIntrinsicCreate, con(%p) id(%i) element(%p)", con, id, (void *)eid);
- return (jint)rsScriptIntrinsicCreate(con, id, (RsElement)eid);
+ return (jlong)rsScriptIntrinsicCreate((RsContext)con, id, (RsElement)eid);
}
-static jint
-nScriptKernelIDCreate(JNIEnv *_env, jobject _this, RsContext con, jint sid, jint slot, jint sig)
+static jlong
+nScriptKernelIDCreate(JNIEnv *_env, jobject _this, jlong con, jlong sid, jint slot, jint sig)
{
LOG_API("nScriptKernelIDCreate, con(%p) script(%p), slot(%i), sig(%i)", con, (void *)sid, slot, sig);
- return (jint)rsScriptKernelIDCreate(con, (RsScript)sid, slot, sig);
+ return (jint)rsScriptKernelIDCreate((RsContext)con, (RsScript)sid, slot, sig);
}
-static jint
-nScriptFieldIDCreate(JNIEnv *_env, jobject _this, RsContext con, jint sid, jint slot)
+static jlong
+nScriptFieldIDCreate(JNIEnv *_env, jobject _this, jlong con, jlong sid, jint slot)
{
LOG_API("nScriptFieldIDCreate, con(%p) script(%p), slot(%i)", con, (void *)sid, slot);
- return (jint)rsScriptFieldIDCreate(con, (RsScript)sid, slot);
+ return (jint)rsScriptFieldIDCreate((RsContext)con, (RsScript)sid, slot);
}
-static jint
-nScriptGroupCreate(JNIEnv *_env, jobject _this, RsContext con, jintArray _kernels, jintArray _src,
+static jlong
+nScriptGroupCreate(JNIEnv *_env, jobject _this, jlong con, jintArray _kernels, jintArray _src,
jintArray _dstk, jintArray _dstf, jintArray _types)
{
LOG_API("nScriptGroupCreate, con(%p)", con);
jint typesLen = _env->GetArrayLength(_types) * sizeof(int);
jint *typesPtr = _env->GetIntArrayElements(_types, NULL);
- int id = (int)rsScriptGroupCreate(con,
+ int id = (int)rsScriptGroupCreate((RsContext)con,
(RsScriptKernelID *)kernelsPtr, kernelsLen,
(RsScriptKernelID *)srcPtr, srcLen,
(RsScriptKernelID *)dstkPtr, dstkLen,
}
static void
-nScriptGroupSetInput(JNIEnv *_env, jobject _this, RsContext con, jint gid, jint kid, jint alloc)
+nScriptGroupSetInput(JNIEnv *_env, jobject _this, jlong con, jlong gid, jlong kid, jlong alloc)
{
LOG_API("nScriptGroupSetInput, con(%p) group(%p), kernelId(%p), alloc(%p)", con,
(void *)gid, (void *)kid, (void *)alloc);
- rsScriptGroupSetInput(con, (RsScriptGroup)gid, (RsScriptKernelID)kid, (RsAllocation)alloc);
+ rsScriptGroupSetInput((RsContext)con, (RsScriptGroup)gid, (RsScriptKernelID)kid, (RsAllocation)alloc);
}
static void
-nScriptGroupSetOutput(JNIEnv *_env, jobject _this, RsContext con, jint gid, jint kid, jint alloc)
+nScriptGroupSetOutput(JNIEnv *_env, jobject _this, jlong con, jlong gid, jlong kid, jlong alloc)
{
LOG_API("nScriptGroupSetOutput, con(%p) group(%p), kernelId(%p), alloc(%p)", con,
(void *)gid, (void *)kid, (void *)alloc);
- rsScriptGroupSetOutput(con, (RsScriptGroup)gid, (RsScriptKernelID)kid, (RsAllocation)alloc);
+ rsScriptGroupSetOutput((RsContext)con, (RsScriptGroup)gid, (RsScriptKernelID)kid, (RsAllocation)alloc);
}
static void
-nScriptGroupExecute(JNIEnv *_env, jobject _this, RsContext con, jint gid)
+nScriptGroupExecute(JNIEnv *_env, jobject _this, jlong con, jlong gid)
{
LOG_API("nScriptGroupSetOutput, con(%p) group(%p)", con, (void *)gid);
- rsScriptGroupExecute(con, (RsScriptGroup)gid);
+ rsScriptGroupExecute((RsContext)con, (RsScriptGroup)gid);
}
// ---------------------------------------------------------------------------
static jint
-nProgramStoreCreate(JNIEnv *_env, jobject _this, RsContext con,
+nProgramStoreCreate(JNIEnv *_env, jobject _this, jlong con,
jboolean colorMaskR, jboolean colorMaskG, jboolean colorMaskB, jboolean colorMaskA,
jboolean depthMask, jboolean ditherEnable,
jint srcFunc, jint destFunc,
jint depthFunc)
{
LOG_API("nProgramStoreCreate, con(%p)", con);
- return (jint)rsProgramStoreCreate(con, colorMaskR, colorMaskG, colorMaskB, colorMaskA,
+ return (jint)rsProgramStoreCreate((RsContext)con, colorMaskR, colorMaskG, colorMaskB, colorMaskA,
depthMask, ditherEnable, (RsBlendSrcFunc)srcFunc,
(RsBlendDstFunc)destFunc, (RsDepthFunc)depthFunc);
}
// ---------------------------------------------------------------------------
static void
-nProgramBindConstants(JNIEnv *_env, jobject _this, RsContext con, jint vpv, jint slot, jint a)
+nProgramBindConstants(JNIEnv *_env, jobject _this, jlong con, jlong vpv, jint slot, jlong a)
{
LOG_API("nProgramBindConstants, con(%p), vpf(%p), sloat(%i), a(%p)", con, (RsProgramVertex)vpv, slot, (RsAllocation)a);
- rsProgramBindConstants(con, (RsProgram)vpv, slot, (RsAllocation)a);
+ rsProgramBindConstants((RsContext)con, (RsProgram)vpv, slot, (RsAllocation)a);
}
static void
-nProgramBindTexture(JNIEnv *_env, jobject _this, RsContext con, jint vpf, jint slot, jint a)
+nProgramBindTexture(JNIEnv *_env, jobject _this, jlong con, jlong vpf, jint slot, jlong a)
{
LOG_API("nProgramBindTexture, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramFragment)vpf, slot, (RsAllocation)a);
- rsProgramBindTexture(con, (RsProgramFragment)vpf, slot, (RsAllocation)a);
+ rsProgramBindTexture((RsContext)con, (RsProgramFragment)vpf, slot, (RsAllocation)a);
}
static void
-nProgramBindSampler(JNIEnv *_env, jobject _this, RsContext con, jint vpf, jint slot, jint a)
+nProgramBindSampler(JNIEnv *_env, jobject _this, jlong con, jlong vpf, jint slot, jlong a)
{
LOG_API("nProgramBindSampler, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramFragment)vpf, slot, (RsSampler)a);
- rsProgramBindSampler(con, (RsProgramFragment)vpf, slot, (RsSampler)a);
+ rsProgramBindSampler((RsContext)con, (RsProgramFragment)vpf, slot, (RsSampler)a);
}
// ---------------------------------------------------------------------------
-static jint
-nProgramFragmentCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader,
+static jlong
+nProgramFragmentCreate(JNIEnv *_env, jobject _this, jlong con, jstring shader,
jobjectArray texNames, jintArray params)
{
AutoJavaStringToUTF8 shaderUTF(_env, shader);
LOG_API("nProgramFragmentCreate, con(%p), paramLen(%i)", con, paramLen);
- jint ret = (jint)rsProgramFragmentCreate(con, shaderUTF.c_str(), shaderUTF.length(),
+ jlong ret = (jlong)rsProgramFragmentCreate((RsContext)con, shaderUTF.c_str(), shaderUTF.length(),
nameArray, texCount, sizeArray,
(uint32_t *)paramPtr, paramLen);
// ---------------------------------------------------------------------------
-static jint
-nProgramVertexCreate(JNIEnv *_env, jobject _this, RsContext con, jstring shader,
+static jlong
+nProgramVertexCreate(JNIEnv *_env, jobject _this, jlong con, jstring shader,
jobjectArray texNames, jintArray params)
{
AutoJavaStringToUTF8 shaderUTF(_env, shader);
const char ** nameArray = names.c_str();
size_t* sizeArray = names.c_str_len();
- jint ret = (jint)rsProgramVertexCreate(con, shaderUTF.c_str(), shaderUTF.length(),
+ jlong ret = (jlong)rsProgramVertexCreate((RsContext)con, shaderUTF.c_str(), shaderUTF.length(),
nameArray, texCount, sizeArray,
(uint32_t *)paramPtr, paramLen);
// ---------------------------------------------------------------------------
-static jint
-nProgramRasterCreate(JNIEnv *_env, jobject _this, RsContext con, jboolean pointSprite, jint cull)
+static jlong
+nProgramRasterCreate(JNIEnv *_env, jobject _this, jlong con, jboolean pointSprite, jint cull)
{
LOG_API("nProgramRasterCreate, con(%p), pointSprite(%i), cull(%i)", con, pointSprite, cull);
- return (jint)rsProgramRasterCreate(con, pointSprite, (RsCullMode)cull);
+ return (jint)rsProgramRasterCreate((RsContext)con, pointSprite, (RsCullMode)cull);
}
// ---------------------------------------------------------------------------
static void
-nContextBindRootScript(JNIEnv *_env, jobject _this, RsContext con, jint script)
+nContextBindRootScript(JNIEnv *_env, jobject _this, jlong con, jint script)
{
LOG_API("nContextBindRootScript, con(%p), script(%p)", con, (RsScript)script);
- rsContextBindRootScript(con, (RsScript)script);
+ rsContextBindRootScript((RsContext)con, (RsScript)script);
}
static void
-nContextBindProgramStore(JNIEnv *_env, jobject _this, RsContext con, jint pfs)
+nContextBindProgramStore(JNIEnv *_env, jobject _this, jlong con, jint pfs)
{
LOG_API("nContextBindProgramStore, con(%p), pfs(%p)", con, (RsProgramStore)pfs);
- rsContextBindProgramStore(con, (RsProgramStore)pfs);
+ rsContextBindProgramStore((RsContext)con, (RsProgramStore)pfs);
}
static void
-nContextBindProgramFragment(JNIEnv *_env, jobject _this, RsContext con, jint pf)
+nContextBindProgramFragment(JNIEnv *_env, jobject _this, jlong con, jint pf)
{
LOG_API("nContextBindProgramFragment, con(%p), pf(%p)", con, (RsProgramFragment)pf);
- rsContextBindProgramFragment(con, (RsProgramFragment)pf);
+ rsContextBindProgramFragment((RsContext)con, (RsProgramFragment)pf);
}
static void
-nContextBindProgramVertex(JNIEnv *_env, jobject _this, RsContext con, jint pf)
+nContextBindProgramVertex(JNIEnv *_env, jobject _this, jlong con, jint pf)
{
LOG_API("nContextBindProgramVertex, con(%p), pf(%p)", con, (RsProgramVertex)pf);
- rsContextBindProgramVertex(con, (RsProgramVertex)pf);
+ rsContextBindProgramVertex((RsContext)con, (RsProgramVertex)pf);
}
static void
-nContextBindProgramRaster(JNIEnv *_env, jobject _this, RsContext con, jint pf)
+nContextBindProgramRaster(JNIEnv *_env, jobject _this, jlong con, jint pf)
{
LOG_API("nContextBindProgramRaster, con(%p), pf(%p)", con, (RsProgramRaster)pf);
- rsContextBindProgramRaster(con, (RsProgramRaster)pf);
+ rsContextBindProgramRaster((RsContext)con, (RsProgramRaster)pf);
}
// ---------------------------------------------------------------------------
static jint
-nSamplerCreate(JNIEnv *_env, jobject _this, RsContext con, jint magFilter, jint minFilter,
+nSamplerCreate(JNIEnv *_env, jobject _this, jlong con, jint magFilter, jint minFilter,
jint wrapS, jint wrapT, jint wrapR, jfloat aniso)
{
LOG_API("nSamplerCreate, con(%p)", con);
- return (jint)rsSamplerCreate(con,
+ return (jint)rsSamplerCreate((RsContext)con,
(RsSamplerValue)magFilter,
(RsSamplerValue)minFilter,
(RsSamplerValue)wrapS,
// ---------------------------------------------------------------------------
-//native int rsnPathCreate(int con, int prim, boolean isStatic, int vtx, int loop, float q);
-static jint
-nPathCreate(JNIEnv *_env, jobject _this, RsContext con, jint prim, jboolean isStatic, jint _vtx, jint _loop, jfloat q) {
+static jlong
+nPathCreate(JNIEnv *_env, jobject _this, jlong con, jint prim, jboolean isStatic, jlong _vtx, jint _loop, jfloat q) {
LOG_API("nPathCreate, con(%p)", con);
- int id = (int)rsPathCreate(con, (RsPathPrimitive)prim, isStatic,
- (RsAllocation)_vtx,
- (RsAllocation)_loop, q);
+ jlong id = (jlong)rsPathCreate((RsContext)con, (RsPathPrimitive)prim, isStatic,
+ (RsAllocation)_vtx,
+ (RsAllocation)_loop, q);
return id;
}
-static jint
-nMeshCreate(JNIEnv *_env, jobject _this, RsContext con, jintArray _vtx, jintArray _idx, jintArray _prim)
+static jlong
+nMeshCreate(JNIEnv *_env, jobject _this, jlong con, jintArray _vtx, jintArray _idx, jintArray _prim)
{
LOG_API("nMeshCreate, con(%p)", con);
jint primLen = _env->GetArrayLength(_prim);
jint *primPtr = _env->GetIntArrayElements(_prim, NULL);
- int id = (int)rsMeshCreate(con,
+ int id = (int)rsMeshCreate((RsContext)con,
(RsAllocation *)vtxPtr, vtxLen,
(RsAllocation *)idxPtr, idxLen,
(uint32_t *)primPtr, primLen);
}
static jint
-nMeshGetVertexBufferCount(JNIEnv *_env, jobject _this, RsContext con, jint mesh)
+nMeshGetVertexBufferCount(JNIEnv *_env, jobject _this, jlong con, jlong mesh)
{
LOG_API("nMeshGetVertexBufferCount, con(%p), Mesh(%p)", con, (RsMesh)mesh);
jint vtxCount = 0;
- rsaMeshGetVertexBufferCount(con, (RsMesh)mesh, &vtxCount);
+ rsaMeshGetVertexBufferCount((RsContext)con, (RsMesh)mesh, &vtxCount);
return vtxCount;
}
static jint
-nMeshGetIndexCount(JNIEnv *_env, jobject _this, RsContext con, jint mesh)
+nMeshGetIndexCount(JNIEnv *_env, jobject _this, jlong con, jlong mesh)
{
LOG_API("nMeshGetIndexCount, con(%p), Mesh(%p)", con, (RsMesh)mesh);
jint idxCount = 0;
- rsaMeshGetIndexCount(con, (RsMesh)mesh, &idxCount);
+ rsaMeshGetIndexCount((RsContext)con, (RsMesh)mesh, &idxCount);
return idxCount;
}
static void
-nMeshGetVertices(JNIEnv *_env, jobject _this, RsContext con, jint mesh, jintArray _ids, int numVtxIDs)
+nMeshGetVertices(JNIEnv *_env, jobject _this, jlong con, jlong mesh, jintArray _ids, int numVtxIDs)
{
LOG_API("nMeshGetVertices, con(%p), Mesh(%p)", con, (RsMesh)mesh);
RsAllocation *allocs = (RsAllocation*)malloc((uint32_t)numVtxIDs * sizeof(RsAllocation));
- rsaMeshGetVertices(con, (RsMesh)mesh, allocs, (uint32_t)numVtxIDs);
+ rsaMeshGetVertices((RsContext)con, (RsMesh)mesh, allocs, (uint32_t)numVtxIDs);
for(jint i = 0; i < numVtxIDs; i ++) {
_env->SetIntArrayRegion(_ids, i, 1, (const jint*)&allocs[i]);
}
static void
-nMeshGetIndices(JNIEnv *_env, jobject _this, RsContext con, jint mesh, jintArray _idxIds, jintArray _primitives, int numIndices)
+nMeshGetIndices(JNIEnv *_env, jobject _this, jlong con, jlong mesh, jintArray _idxIds, jintArray _primitives, int numIndices)
{
LOG_API("nMeshGetVertices, con(%p), Mesh(%p)", con, (RsMesh)mesh);
RsAllocation *allocs = (RsAllocation*)malloc((uint32_t)numIndices * sizeof(RsAllocation));
uint32_t *prims= (uint32_t*)malloc((uint32_t)numIndices * sizeof(uint32_t));
- rsaMeshGetIndices(con, (RsMesh)mesh, allocs, prims, (uint32_t)numIndices);
+ rsaMeshGetIndices((RsContext)con, (RsMesh)mesh, allocs, prims, (uint32_t)numIndices);
for(jint i = 0; i < numIndices; i ++) {
_env->SetIntArrayRegion(_idxIds, i, 1, (const jint*)&allocs[i]);
static JNINativeMethod methods[] = {
{"_nInit", "()V", (void*)_nInit },
-{"nDeviceCreate", "()I", (void*)nDeviceCreate },
-{"nDeviceDestroy", "(I)V", (void*)nDeviceDestroy },
-{"nDeviceSetConfig", "(III)V", (void*)nDeviceSetConfig },
-{"nContextGetUserMessage", "(I[I)I", (void*)nContextGetUserMessage },
-{"nContextGetErrorMessage", "(I)Ljava/lang/String;", (void*)nContextGetErrorMessage },
-{"nContextPeekMessage", "(I[I)I", (void*)nContextPeekMessage },
+{"nDeviceCreate", "()J", (void*)nDeviceCreate },
+{"nDeviceDestroy", "(J)V", (void*)nDeviceDestroy },
+{"nDeviceSetConfig", "(JII)V", (void*)nDeviceSetConfig },
+{"nContextGetUserMessage", "(J[I)I", (void*)nContextGetUserMessage },
+{"nContextGetErrorMessage", "(J)Ljava/lang/String;", (void*)nContextGetErrorMessage },
+{"nContextPeekMessage", "(J[I)I", (void*)nContextPeekMessage },
-{"nContextInitToClient", "(I)V", (void*)nContextInitToClient },
-{"nContextDeinitToClient", "(I)V", (void*)nContextDeinitToClient },
+{"nContextInitToClient", "(J)V", (void*)nContextInitToClient },
+{"nContextDeinitToClient", "(J)V", (void*)nContextDeinitToClient },
// All methods below are thread protected in java.
-{"rsnContextCreate", "(IIII)I", (void*)nContextCreate },
-{"rsnContextCreateGL", "(IIIIIIIIIIIIIFI)I", (void*)nContextCreateGL },
-{"rsnContextFinish", "(I)V", (void*)nContextFinish },
-{"rsnContextSetPriority", "(II)V", (void*)nContextSetPriority },
-{"rsnContextSetSurface", "(IIILandroid/view/Surface;)V", (void*)nContextSetSurface },
-{"rsnContextDestroy", "(I)V", (void*)nContextDestroy },
-{"rsnContextDump", "(II)V", (void*)nContextDump },
-{"rsnContextPause", "(I)V", (void*)nContextPause },
-{"rsnContextResume", "(I)V", (void*)nContextResume },
-{"rsnContextSendMessage", "(II[I)V", (void*)nContextSendMessage },
-{"rsnAssignName", "(II[B)V", (void*)nAssignName },
-{"rsnGetName", "(II)Ljava/lang/String;", (void*)nGetName },
-{"rsnObjDestroy", "(II)V", (void*)nObjDestroy },
-
-{"rsnFileA3DCreateFromFile", "(ILjava/lang/String;)I", (void*)nFileA3DCreateFromFile },
-{"rsnFileA3DCreateFromAssetStream", "(II)I", (void*)nFileA3DCreateFromAssetStream },
-{"rsnFileA3DCreateFromAsset", "(ILandroid/content/res/AssetManager;Ljava/lang/String;)I", (void*)nFileA3DCreateFromAsset },
-{"rsnFileA3DGetNumIndexEntries", "(II)I", (void*)nFileA3DGetNumIndexEntries },
-{"rsnFileA3DGetIndexEntries", "(III[I[Ljava/lang/String;)V", (void*)nFileA3DGetIndexEntries },
-{"rsnFileA3DGetEntryByIndex", "(III)I", (void*)nFileA3DGetEntryByIndex },
-
-{"rsnFontCreateFromFile", "(ILjava/lang/String;FI)I", (void*)nFontCreateFromFile },
-{"rsnFontCreateFromAssetStream", "(ILjava/lang/String;FII)I", (void*)nFontCreateFromAssetStream },
-{"rsnFontCreateFromAsset", "(ILandroid/content/res/AssetManager;Ljava/lang/String;FI)I", (void*)nFontCreateFromAsset },
-
-{"rsnElementCreate", "(IIIZI)I", (void*)nElementCreate },
-{"rsnElementCreate2", "(I[I[Ljava/lang/String;[I)I", (void*)nElementCreate2 },
-{"rsnElementGetNativeData", "(II[I)V", (void*)nElementGetNativeData },
-{"rsnElementGetSubElements", "(II[I[Ljava/lang/String;[I)V", (void*)nElementGetSubElements },
-
-{"rsnTypeCreate", "(IIIIIZZI)I", (void*)nTypeCreate },
-{"rsnTypeGetNativeData", "(II[I)V", (void*)nTypeGetNativeData },
-
-{"rsnAllocationCreateTyped", "(IIIII)I", (void*)nAllocationCreateTyped },
-{"rsnAllocationCreateFromBitmap", "(IIILandroid/graphics/Bitmap;I)I", (void*)nAllocationCreateFromBitmap },
-{"rsnAllocationCreateBitmapBackedAllocation", "(IIILandroid/graphics/Bitmap;I)I", (void*)nAllocationCreateBitmapBackedAllocation },
-{"rsnAllocationCubeCreateFromBitmap","(IIILandroid/graphics/Bitmap;I)I", (void*)nAllocationCubeCreateFromBitmap },
-
-{"rsnAllocationCopyFromBitmap", "(IILandroid/graphics/Bitmap;)V", (void*)nAllocationCopyFromBitmap },
-{"rsnAllocationCopyToBitmap", "(IILandroid/graphics/Bitmap;)V", (void*)nAllocationCopyToBitmap },
-
-{"rsnAllocationSyncAll", "(III)V", (void*)nAllocationSyncAll },
-{"rsnAllocationGetSurface", "(II)Landroid/view/Surface;", (void*)nAllocationGetSurface },
-{"rsnAllocationSetSurface", "(IILandroid/view/Surface;)V", (void*)nAllocationSetSurface },
-{"rsnAllocationIoSend", "(II)V", (void*)nAllocationIoSend },
-{"rsnAllocationIoReceive", "(II)V", (void*)nAllocationIoReceive },
-{"rsnAllocationData1D", "(IIIIILjava/lang/Object;II)V", (void*)nAllocationData1D },
-{"rsnAllocationElementData1D", "(IIIII[BI)V", (void*)nAllocationElementData1D },
-{"rsnAllocationData2D", "(IIIIIIIILjava/lang/Object;II)V", (void*)nAllocationData2D },
-{"rsnAllocationData2D", "(IIIIIIIIIIIII)V", (void*)nAllocationData2D_alloc },
-{"rsnAllocationData3D", "(IIIIIIIIILjava/lang/Object;II)V", (void*)nAllocationData3D },
-{"rsnAllocationData3D", "(IIIIIIIIIIIIII)V", (void*)nAllocationData3D_alloc },
-{"rsnAllocationRead", "(IILjava/lang/Object;I)V", (void*)nAllocationRead },
-{"rsnAllocationRead1D", "(IIIIILjava/lang/Object;II)V", (void*)nAllocationRead1D },
-{"rsnAllocationRead2D", "(IIIIIIIILjava/lang/Object;II)V", (void*)nAllocationRead2D },
-{"rsnAllocationGetType", "(II)I", (void*)nAllocationGetType},
-{"rsnAllocationResize1D", "(III)V", (void*)nAllocationResize1D },
-{"rsnAllocationGenerateMipmaps", "(II)V", (void*)nAllocationGenerateMipmaps },
-
-{"rsnScriptBindAllocation", "(IIII)V", (void*)nScriptBindAllocation },
-{"rsnScriptSetTimeZone", "(II[B)V", (void*)nScriptSetTimeZone },
-{"rsnScriptInvoke", "(III)V", (void*)nScriptInvoke },
-{"rsnScriptInvokeV", "(III[B)V", (void*)nScriptInvokeV },
-{"rsnScriptForEach", "(IIIII)V", (void*)nScriptForEach },
-{"rsnScriptForEach", "(IIIII[B)V", (void*)nScriptForEachV },
-{"rsnScriptForEachClipped", "(IIIIIIIIIII)V", (void*)nScriptForEachClipped },
-{"rsnScriptForEachClipped", "(IIIII[BIIIIII)V", (void*)nScriptForEachClippedV },
-{"rsnScriptSetVarI", "(IIII)V", (void*)nScriptSetVarI },
-{"rsnScriptGetVarI", "(III)I", (void*)nScriptGetVarI },
-{"rsnScriptSetVarJ", "(IIIJ)V", (void*)nScriptSetVarJ },
-{"rsnScriptGetVarJ", "(III)J", (void*)nScriptGetVarJ },
-{"rsnScriptSetVarF", "(IIIF)V", (void*)nScriptSetVarF },
-{"rsnScriptGetVarF", "(III)F", (void*)nScriptGetVarF },
-{"rsnScriptSetVarD", "(IIID)V", (void*)nScriptSetVarD },
-{"rsnScriptGetVarD", "(III)D", (void*)nScriptGetVarD },
-{"rsnScriptSetVarV", "(III[B)V", (void*)nScriptSetVarV },
-{"rsnScriptGetVarV", "(III[B)V", (void*)nScriptGetVarV },
-{"rsnScriptSetVarVE", "(III[BI[I)V", (void*)nScriptSetVarVE },
-{"rsnScriptSetVarObj", "(IIII)V", (void*)nScriptSetVarObj },
-
-{"rsnScriptCCreate", "(ILjava/lang/String;Ljava/lang/String;[BI)I", (void*)nScriptCCreate },
-{"rsnScriptIntrinsicCreate", "(III)I", (void*)nScriptIntrinsicCreate },
-{"rsnScriptKernelIDCreate", "(IIII)I", (void*)nScriptKernelIDCreate },
-{"rsnScriptFieldIDCreate", "(III)I", (void*)nScriptFieldIDCreate },
-{"rsnScriptGroupCreate", "(I[I[I[I[I[I)I", (void*)nScriptGroupCreate },
-{"rsnScriptGroupSetInput", "(IIII)V", (void*)nScriptGroupSetInput },
-{"rsnScriptGroupSetOutput", "(IIII)V", (void*)nScriptGroupSetOutput },
-{"rsnScriptGroupExecute", "(II)V", (void*)nScriptGroupExecute },
-
-{"rsnProgramStoreCreate", "(IZZZZZZIII)I", (void*)nProgramStoreCreate },
-
-{"rsnProgramBindConstants", "(IIII)V", (void*)nProgramBindConstants },
-{"rsnProgramBindTexture", "(IIII)V", (void*)nProgramBindTexture },
-{"rsnProgramBindSampler", "(IIII)V", (void*)nProgramBindSampler },
-
-{"rsnProgramFragmentCreate", "(ILjava/lang/String;[Ljava/lang/String;[I)I", (void*)nProgramFragmentCreate },
-{"rsnProgramRasterCreate", "(IZI)I", (void*)nProgramRasterCreate },
-{"rsnProgramVertexCreate", "(ILjava/lang/String;[Ljava/lang/String;[I)I", (void*)nProgramVertexCreate },
-
-{"rsnContextBindRootScript", "(II)V", (void*)nContextBindRootScript },
-{"rsnContextBindProgramStore", "(II)V", (void*)nContextBindProgramStore },
-{"rsnContextBindProgramFragment", "(II)V", (void*)nContextBindProgramFragment },
-{"rsnContextBindProgramVertex", "(II)V", (void*)nContextBindProgramVertex },
-{"rsnContextBindProgramRaster", "(II)V", (void*)nContextBindProgramRaster },
-
-{"rsnSamplerCreate", "(IIIIIIF)I", (void*)nSamplerCreate },
-
-{"rsnPathCreate", "(IIZIIF)I", (void*)nPathCreate },
-{"rsnMeshCreate", "(I[I[I[I)I", (void*)nMeshCreate },
-
-{"rsnMeshGetVertexBufferCount", "(II)I", (void*)nMeshGetVertexBufferCount },
-{"rsnMeshGetIndexCount", "(II)I", (void*)nMeshGetIndexCount },
-{"rsnMeshGetVertices", "(II[II)V", (void*)nMeshGetVertices },
-{"rsnMeshGetIndices", "(II[I[II)V", (void*)nMeshGetIndices },
+{"rsnContextCreate", "(JIII)J", (void*)nContextCreate },
+{"rsnContextCreateGL", "(JIIIIIIIIIIIIFI)J", (void*)nContextCreateGL },
+{"rsnContextFinish", "(J)V", (void*)nContextFinish },
+{"rsnContextSetPriority", "(JI)V", (void*)nContextSetPriority },
+{"rsnContextSetSurface", "(JIILandroid/view/Surface;)V", (void*)nContextSetSurface },
+{"rsnContextDestroy", "(J)V", (void*)nContextDestroy },
+{"rsnContextDump", "(JI)V", (void*)nContextDump },
+{"rsnContextPause", "(J)V", (void*)nContextPause },
+{"rsnContextResume", "(J)V", (void*)nContextResume },
+{"rsnContextSendMessage", "(JI[I)V", (void*)nContextSendMessage },
+{"rsnAssignName", "(JJ[B)V", (void*)nAssignName },
+{"rsnGetName", "(JJ)Ljava/lang/String;", (void*)nGetName },
+{"rsnObjDestroy", "(JJ)V", (void*)nObjDestroy },
+
+{"rsnFileA3DCreateFromFile", "(JLjava/lang/String;)J", (void*)nFileA3DCreateFromFile },
+{"rsnFileA3DCreateFromAssetStream", "(JI)J", (void*)nFileA3DCreateFromAssetStream },
+{"rsnFileA3DCreateFromAsset", "(JLandroid/content/res/AssetManager;Ljava/lang/String;)J", (void*)nFileA3DCreateFromAsset },
+{"rsnFileA3DGetNumIndexEntries", "(JJ)I", (void*)nFileA3DGetNumIndexEntries },
+{"rsnFileA3DGetIndexEntries", "(JJI[I[Ljava/lang/String;)V", (void*)nFileA3DGetIndexEntries },
+{"rsnFileA3DGetEntryByIndex", "(JJI)I", (void*)nFileA3DGetEntryByIndex },
+
+{"rsnFontCreateFromFile", "(JLjava/lang/String;FI)I", (void*)nFontCreateFromFile },
+{"rsnFontCreateFromAssetStream", "(JLjava/lang/String;FII)I", (void*)nFontCreateFromAssetStream },
+{"rsnFontCreateFromAsset", "(JLandroid/content/res/AssetManager;Ljava/lang/String;FI)I", (void*)nFontCreateFromAsset },
+
+{"rsnElementCreate", "(JJIZI)J", (void*)nElementCreate },
+{"rsnElementCreate2", "(J[I[Ljava/lang/String;[I)J", (void*)nElementCreate2 },
+{"rsnElementGetNativeData", "(JJ[I)V", (void*)nElementGetNativeData },
+{"rsnElementGetSubElements", "(JJ[I[Ljava/lang/String;[I)V", (void*)nElementGetSubElements },
+
+{"rsnTypeCreate", "(JJIIIZZI)J", (void*)nTypeCreate },
+{"rsnTypeGetNativeData", "(JJ[I)V", (void*)nTypeGetNativeData },
+
+{"rsnAllocationCreateTyped", "(JJIII)J", (void*)nAllocationCreateTyped },
+{"rsnAllocationCreateFromBitmap", "(JJILandroid/graphics/Bitmap;I)J", (void*)nAllocationCreateFromBitmap },
+{"rsnAllocationCreateBitmapBackedAllocation", "(JJILandroid/graphics/Bitmap;I)J", (void*)nAllocationCreateBitmapBackedAllocation },
+{"rsnAllocationCubeCreateFromBitmap","(JJILandroid/graphics/Bitmap;I)J", (void*)nAllocationCubeCreateFromBitmap },
+
+{"rsnAllocationCopyFromBitmap", "(JJLandroid/graphics/Bitmap;)V", (void*)nAllocationCopyFromBitmap },
+{"rsnAllocationCopyToBitmap", "(JJLandroid/graphics/Bitmap;)V", (void*)nAllocationCopyToBitmap },
+
+{"rsnAllocationSyncAll", "(JJI)V", (void*)nAllocationSyncAll },
+{"rsnAllocationGetSurface", "(JJ)Landroid/view/Surface;", (void*)nAllocationGetSurface },
+{"rsnAllocationSetSurface", "(JJLandroid/view/Surface;)V", (void*)nAllocationSetSurface },
+{"rsnAllocationIoSend", "(JJ)V", (void*)nAllocationIoSend },
+{"rsnAllocationIoReceive", "(JJ)V", (void*)nAllocationIoReceive },
+{"rsnAllocationData1D", "(JJIIILjava/lang/Object;II)V", (void*)nAllocationData1D },
+{"rsnAllocationElementData1D", "(JJIII[BI)V", (void*)nAllocationElementData1D },
+{"rsnAllocationData2D", "(JJIIIIIILjava/lang/Object;II)V", (void*)nAllocationData2D },
+{"rsnAllocationData2D", "(JJIIIIIIJIIII)V", (void*)nAllocationData2D_alloc },
+{"rsnAllocationData3D", "(JJIIIIIIILjava/lang/Object;II)V", (void*)nAllocationData3D },
+{"rsnAllocationData3D", "(JJIIIIIIIJIIII)V", (void*)nAllocationData3D_alloc },
+{"rsnAllocationRead", "(JJLjava/lang/Object;I)V", (void*)nAllocationRead },
+{"rsnAllocationRead1D", "(JJIIILjava/lang/Object;II)V", (void*)nAllocationRead1D },
+{"rsnAllocationRead2D", "(JJIIIIIILjava/lang/Object;II)V", (void*)nAllocationRead2D },
+{"rsnAllocationGetType", "(JJ)J", (void*)nAllocationGetType},
+{"rsnAllocationResize1D", "(JJI)V", (void*)nAllocationResize1D },
+{"rsnAllocationGenerateMipmaps", "(JJ)V", (void*)nAllocationGenerateMipmaps },
+
+{"rsnScriptBindAllocation", "(JJJI)V", (void*)nScriptBindAllocation },
+{"rsnScriptSetTimeZone", "(JJ[B)V", (void*)nScriptSetTimeZone },
+{"rsnScriptInvoke", "(JJI)V", (void*)nScriptInvoke },
+{"rsnScriptInvokeV", "(JJI[B)V", (void*)nScriptInvokeV },
+{"rsnScriptForEach", "(JJIJJ)V", (void*)nScriptForEach },
+{"rsnScriptForEach", "(JJIJJ[B)V", (void*)nScriptForEachV },
+{"rsnScriptForEachClipped", "(JJIJJIIIIII)V", (void*)nScriptForEachClipped },
+{"rsnScriptForEachClipped", "(JJIJJ[BIIIIII)V", (void*)nScriptForEachClippedV },
+{"rsnScriptSetVarI", "(JJII)V", (void*)nScriptSetVarI },
+{"rsnScriptGetVarI", "(JJI)I", (void*)nScriptGetVarI },
+{"rsnScriptSetVarJ", "(JJIJ)V", (void*)nScriptSetVarJ },
+{"rsnScriptGetVarJ", "(JJI)J", (void*)nScriptGetVarJ },
+{"rsnScriptSetVarF", "(JJIF)V", (void*)nScriptSetVarF },
+{"rsnScriptGetVarF", "(JJI)F", (void*)nScriptGetVarF },
+{"rsnScriptSetVarD", "(JJID)V", (void*)nScriptSetVarD },
+{"rsnScriptGetVarD", "(JJI)D", (void*)nScriptGetVarD },
+{"rsnScriptSetVarV", "(JJI[B)V", (void*)nScriptSetVarV },
+{"rsnScriptGetVarV", "(JJI[B)V", (void*)nScriptGetVarV },
+{"rsnScriptSetVarVE", "(JJI[BJ[I)V", (void*)nScriptSetVarVE },
+{"rsnScriptSetVarObj", "(JJIJ)V", (void*)nScriptSetVarObj },
+
+{"rsnScriptCCreate", "(JLjava/lang/String;Ljava/lang/String;[BI)I", (void*)nScriptCCreate },
+{"rsnScriptIntrinsicCreate", "(JIJ)J", (void*)nScriptIntrinsicCreate },
+{"rsnScriptKernelIDCreate", "(JJII)J", (void*)nScriptKernelIDCreate },
+{"rsnScriptFieldIDCreate", "(JJI)J", (void*)nScriptFieldIDCreate },
+{"rsnScriptGroupCreate", "(J[I[I[I[I[I)J", (void*)nScriptGroupCreate },
+{"rsnScriptGroupSetInput", "(JJJJ)V", (void*)nScriptGroupSetInput },
+{"rsnScriptGroupSetOutput", "(JJJJ)V", (void*)nScriptGroupSetOutput },
+{"rsnScriptGroupExecute", "(JJ)V", (void*)nScriptGroupExecute },
+
+{"rsnProgramStoreCreate", "(JZZZZZZIII)I", (void*)nProgramStoreCreate },
+
+{"rsnProgramBindConstants", "(JJIJ)V", (void*)nProgramBindConstants },
+{"rsnProgramBindTexture", "(JJIJ)V", (void*)nProgramBindTexture },
+{"rsnProgramBindSampler", "(JJIJ)V", (void*)nProgramBindSampler },
+
+{"rsnProgramFragmentCreate", "(JLjava/lang/String;[Ljava/lang/String;[I)J", (void*)nProgramFragmentCreate },
+{"rsnProgramRasterCreate", "(JZI)J", (void*)nProgramRasterCreate },
+{"rsnProgramVertexCreate", "(JLjava/lang/String;[Ljava/lang/String;[I)J", (void*)nProgramVertexCreate },
+
+{"rsnContextBindRootScript", "(JI)V", (void*)nContextBindRootScript },
+{"rsnContextBindProgramStore", "(JI)V", (void*)nContextBindProgramStore },
+{"rsnContextBindProgramFragment", "(JI)V", (void*)nContextBindProgramFragment },
+{"rsnContextBindProgramVertex", "(JI)V", (void*)nContextBindProgramVertex },
+{"rsnContextBindProgramRaster", "(JI)V", (void*)nContextBindProgramRaster },
+
+{"rsnSamplerCreate", "(JIIIIIF)I", (void*)nSamplerCreate },
+
+{"rsnPathCreate", "(JIZJIF)J", (void*)nPathCreate },
+{"rsnMeshCreate", "(J[I[I[I)J", (void*)nMeshCreate },
+
+{"rsnMeshGetVertexBufferCount", "(JJ)I", (void*)nMeshGetVertexBufferCount },
+{"rsnMeshGetIndexCount", "(JJ)I", (void*)nMeshGetIndexCount },
+{"rsnMeshGetVertices", "(JJ[II)V", (void*)nMeshGetVertices },
+{"rsnMeshGetIndices", "(JJ[I[II)V", (void*)nMeshGetIndices },
};
import java.security.cert.X509Certificate;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.DSAParameterSpec;
-import java.security.spec.ECParameterSpec;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.RSAKeyGenParameterSpec;
import java.security.spec.X509EncodedKeySpec;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.io.ObjectOutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
*/
package android.security;
-import android.content.Intent;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
/**
* The KeyChainAliasCallback is the callback for {@link
* KeyChain#choosePrivateKeyAlias}.
package android.security;
import android.content.Context;
-import android.security.KeyPairGeneratorSpec.Builder;
import java.security.KeyPairGenerator;
-import java.security.PrivateKey;
import java.security.KeyStore.ProtectionParameter;
-import java.security.cert.Certificate;
/**
* This provides the optional parameters that can be specified for
import android.os.Environment;
import android.os.FileUtils;
-import android.os.Process;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
setViewProperties<T>(renderer, handler, level + 1);
- if (mClipToBounds && renderer.quickRejectNoScissor(0, 0, mWidth, mHeight)) {
+ if (mClipToBounds && renderer.quickRejectConservative(0, 0, mWidth, mHeight)) {
DISPLAY_LIST_LOGD("%*sRestoreToCount %d", (level + 1) * 2, "", restoreTo);
handler(mRestoreToCountOp->reinit(restoreTo), PROPERTY_SAVECOUNT, mClipToBounds);
renderer.restoreToCount(restoreTo);
}
inline float strokeWidthOutset() {
- float width = mPaint->getStrokeWidth();
- if (width == 0) return 0.5f; // account for hairline
- return width * 0.5f;
+ // since anything AA stroke with less than 1.0 pixel width is drawn with an alpha-reduced
+ // 1.0 stroke, treat 1.0 as minimum.
+
+ // TODO: it would be nice if this could take scale into account, but scale isn't stable
+ // since higher levels of the view hierarchy can change scale out from underneath it.
+ return fmaxf(mPaint->getStrokeWidth(), 1) * 0.5f;
}
protected:
void DisplayListRenderer::addDrawOp(DrawOp* op) {
Rect localBounds;
if (op->getLocalBounds(mDrawModifiers, localBounds)) {
- bool rejected = quickRejectNoScissor(localBounds.left, localBounds.top,
+ bool rejected = quickRejectConservative(localBounds.left, localBounds.top,
localBounds.right, localBounds.bottom);
op->setQuickRejected(rejected);
}
renderer->setupDrawShader();
renderer->setupDrawBlending(true, mode);
renderer->setupDrawProgram();
- renderer->setupDrawModelView(x, y, x, y, pureTranslate, true);
+ renderer->setupDrawModelView(kModelViewMode_Translate, false,
+ 0.0f, 0.0f, 0.0f, 0.0f, pureTranslate);
// Calling setupDrawTexture with the name 0 will enable the
// uv attributes and increase the texture unit count
// texture binding will be performed by the font renderer as
const bool fboLayer = current->flags & Snapshot::kFlagIsFboLayer;
bool clipRequired = false;
- quickRejectNoScissor(rect, &clipRequired); // safely ignore return, should never be rejected
+ calculateQuickRejectForScissor(rect.left, rect.top, rect.right, rect.bottom,
+ &clipRequired, false); // safely ignore return, should never be rejected
mCaches.setScissorEnabled(mScissorOptimizationDisabled || clipRequired);
if (fboLayer) {
const float y = (int) floorf(rect.top + currentTransform().getTranslateY() + 0.5f);
layer->setFilter(GL_NEAREST);
- setupDrawModelView(x, y, x + rect.getWidth(), y + rect.getHeight(), true);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false,
+ x, y, x + rect.getWidth(), y + rect.getHeight(), true);
} else {
layer->setFilter(GL_LINEAR);
- setupDrawModelView(rect.left, rect.top, rect.right, rect.bottom);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false,
+ rect.left, rect.top, rect.right, rect.bottom);
}
setupDrawTextureTransformUniforms(layer->getTexTransform());
setupDrawMesh(&mMeshVertices[0].x, &mMeshVertices[0].u);
const float y = (int) floorf(rect.top + currentTransform().getTranslateY() + 0.5f);
layer->setFilter(GL_NEAREST);
- setupDrawModelViewTranslate(x, y, x + rect.getWidth(), y + rect.getHeight(), true);
+ setupDrawModelView(kModelViewMode_Translate, false,
+ x, y, x + rect.getWidth(), y + rect.getHeight(), true);
} else {
layer->setFilter(GL_LINEAR);
- setupDrawModelViewTranslate(rect.left, rect.top, rect.right, rect.bottom);
+ setupDrawModelView(kModelViewMode_Translate, false,
+ rect.left, rect.top, rect.right, rect.bottom);
}
setupDrawMeshIndices(&mesh[0].x, &mesh[0].u);
}
}
-void OpenGLRenderer::drawIndexedQuads(Vertex* mesh, GLsizei quadsCount) {
+void OpenGLRenderer::issueIndexedQuadDraw(Vertex* mesh, GLsizei quadsCount) {
GLsizei elementsCount = quadsCount * 6;
while (elementsCount > 0) {
GLsizei drawCount = min(elementsCount, (GLsizei) gMaxNumberOfQuads * 6);
setupDrawBlending(true, SkXfermode::kClear_Mode);
setupDrawProgram();
setupDrawPureColorUniforms();
- setupDrawModelViewTranslate(0.0f, 0.0f, 0.0f, 0.0f, true);
+ setupDrawModelView(kModelViewMode_Translate, false,
+ 0.0f, 0.0f, 0.0f, 0.0f, true);
- drawIndexedQuads(&mesh[0], count);
+ issueIndexedQuadDraw(&mesh[0], count);
if (scissorChanged) mCaches.enableScissor();
} else {
return mSnapshot->getLocalClip();
}
-bool OpenGLRenderer::quickRejectNoScissor(float left, float top, float right, float bottom,
- bool snapOut, bool* clipRequired) {
+/**
+ * Calculates whether content drawn within the passed bounds would be outside of, or intersect with
+ * the clipRect. Does not modify the scissor.
+ *
+ * @param clipRequired if not null, will be set to true if element intersects clip
+ * (and wasn't rejected)
+ *
+ * @param snapOut if set, the geometry will be treated as having an AA ramp.
+ * See Rect::snapGeometryToPixelBoundaries()
+ */
+bool OpenGLRenderer::calculateQuickRejectForScissor(float left, float top,
+ float right, float bottom, bool* clipRequired, bool snapOut) const {
if (mSnapshot->isIgnored() || bottom <= top || right <= left) {
return true;
}
if (!clipRect.intersects(r)) return true;
+ // clip is required if geometry intersects clip rect
if (clipRequired) *clipRequired = !clipRect.contains(r);
return false;
}
-bool OpenGLRenderer::quickRejectPreStroke(float left, float top, float right, float bottom,
+/**
+ * Returns false if drawing won't be clipped out.
+ *
+ * Makes the decision conservatively, by rounding out the mapped rect before comparing with the
+ * clipRect. To be used when perfect, pixel accuracy is not possible (esp. with tessellation) but
+ * rejection is still desired.
+ *
+ * This function, unlike quickRejectSetupScissor, should be used where precise geometry information
+ * isn't known (esp. when geometry adjusts based on scale). Generally, this will be first pass
+ * rejection where precise rejection isn't important, or precise information isn't available.
+ */
+bool OpenGLRenderer::quickRejectConservative(float left, float top,
+ float right, float bottom) const {
+ if (mSnapshot->isIgnored() || bottom <= top || right <= left) {
+ return true;
+ }
+
+ Rect r(left, top, right, bottom);
+ currentTransform().mapRect(r);
+ r.roundOut(); // rounded out to be conservative
+
+ Rect clipRect(*mSnapshot->clipRect);
+ clipRect.snapToPixelBoundaries();
+
+ if (!clipRect.intersects(r)) return true;
+
+ return false;
+}
+
+/**
+ * Returns false and sets scissor enable based upon bounds if drawing won't be clipped out.
+ *
+ * @param paint if not null, the bounds will be expanded to account for stroke depending on paint
+ * style, and tessellated AA ramp
+ */
+bool OpenGLRenderer::quickRejectSetupScissor(float left, float top, float right, float bottom,
SkPaint* paint) {
- // AA geometry will likely have a ramp around it (not accounted for in local bounds). Snap out
- // the final mapped rect to ensure correct clipping behavior for the ramp.
- bool snapOut = paint->isAntiAlias();
+ bool clipRequired = false;
+ bool snapOut = paint && paint->isAntiAlias();
- if (paint->getStyle() != SkPaint::kFill_Style) {
+ if (paint && paint->getStyle() != SkPaint::kFill_Style) {
float outset = paint->getStrokeWidth() * 0.5f;
- return quickReject(left - outset, top - outset, right + outset, bottom + outset, snapOut);
- } else {
- return quickReject(left, top, right, bottom, snapOut);
+ left -= outset;
+ top -= outset;
+ right += outset;
+ bottom += outset;
}
-}
-bool OpenGLRenderer::quickReject(float left, float top, float right, float bottom, bool snapOut) {
- bool clipRequired = false;
- if (quickRejectNoScissor(left, top, right, bottom, snapOut, &clipRequired)) {
+ if (calculateQuickRejectForScissor(left, top, right, bottom, &clipRequired, snapOut)) {
return true;
}
if (!isDeferred()) {
+ // not quick rejected, so enable the scissor if clipRequired
mCaches.setScissorEnabled(mScissorOptimizationDisabled || clipRequired);
}
return false;
///////////////////////////////////////////////////////////////////////////////
void OpenGLRenderer::setupDraw(bool clear) {
- // TODO: It would be best if we could do this before quickReject()
+ // TODO: It would be best if we could do this before quickRejectSetupScissor()
// changes the scissor test state
if (clear) clearLayerRegions();
// Make sure setScissor & setStencil happen at the beginning of
mTrackDirtyRegions = false;
}
-void OpenGLRenderer::setupDrawModelViewTranslate(float left, float top, float right, float bottom,
- bool ignoreTransform) {
+void OpenGLRenderer::setupDrawModelView(ModelViewMode mode, bool offset,
+ float left, float top, float right, float bottom, bool ignoreTransform) {
mModelView.loadTranslate(left, top, 0.0f);
- if (!ignoreTransform) {
- mCaches.currentProgram->set(mOrthoMatrix, mModelView, currentTransform());
- if (mTrackDirtyRegions) dirtyLayer(left, top, right, bottom, currentTransform());
- } else {
- mCaches.currentProgram->set(mOrthoMatrix, mModelView, mat4::identity());
- if (mTrackDirtyRegions) dirtyLayer(left, top, right, bottom);
- }
-}
-
-void OpenGLRenderer::setupDrawModelViewIdentity(bool offset) {
- mCaches.currentProgram->set(mOrthoMatrix, mat4::identity(), currentTransform(), offset);
-}
-
-void OpenGLRenderer::setupDrawModelView(float left, float top, float right, float bottom,
- bool ignoreTransform, bool ignoreModelView) {
- if (!ignoreModelView) {
- mModelView.loadTranslate(left, top, 0.0f);
+ if (mode == kModelViewMode_TranslateAndScale) {
mModelView.scale(right - left, bottom - top, 1.0f);
- } else {
- mModelView.loadIdentity();
}
+
bool dirty = right - left > 0.0f && bottom - top > 0.0f;
if (!ignoreTransform) {
- mCaches.currentProgram->set(mOrthoMatrix, mModelView, currentTransform());
- if (mTrackDirtyRegions && dirty) {
- dirtyLayer(left, top, right, bottom, currentTransform());
- }
+ mCaches.currentProgram->set(mOrthoMatrix, mModelView, currentTransform(), offset);
+ if (dirty && mTrackDirtyRegions) dirtyLayer(left, top, right, bottom, currentTransform());
} else {
- mCaches.currentProgram->set(mOrthoMatrix, mModelView, mat4::identity());
- if (mTrackDirtyRegions && dirty) dirtyLayer(left, top, right, bottom);
+ mCaches.currentProgram->set(mOrthoMatrix, mModelView, mat4::identity(), offset);
+ if (dirty && mTrackDirtyRegions) dirtyLayer(left, top, right, bottom);
}
}
void OpenGLRenderer::setupDrawShaderUniforms(bool ignoreTransform) {
if (mDrawModifiers.mShader) {
if (ignoreTransform) {
- mModelView.loadInverse(currentTransform());
+ // if ignoreTransform=true was passed to setupDrawModelView, undo currentTransform()
+ // because it was built into modelView / the geometry, and the SkiaShader needs to
+ // compensate.
+ mat4 modelViewWithoutTransform;
+ modelViewWithoutTransform.loadInverse(currentTransform());
+ modelViewWithoutTransform.multiply(mModelView);
+ mModelView.load(modelViewWithoutTransform);
}
mDrawModifiers.mShader->setupProgram(mCaches.currentProgram,
mModelView, *mSnapshot, &mTextureUnit);
}
}
-void OpenGLRenderer::setupDrawShaderIdentityUniforms() {
- if (mDrawModifiers.mShader) {
- mDrawModifiers.mShader->setupProgram(mCaches.currentProgram,
- mat4::identity(), *mSnapshot, &mTextureUnit);
- }
-}
-
void OpenGLRenderer::setupDrawColorFilterUniforms() {
if (mDrawModifiers.mColorFilter) {
mDrawModifiers.mColorFilter->setupProgram(mCaches.currentProgram);
drawAlpha8TextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
texture->id, paint != NULL, color, alpha, mode,
&vertices[0].x, &vertices[0].u,
- GL_TRIANGLES, bitmapCount * 6, true, true, false);
+ GL_TRIANGLES, bitmapCount * 6, true,
+ kModelViewMode_Translate, false);
} else {
drawTextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
texture->id, alpha / 255.0f, mode, texture->blend,
&vertices[0].x, &vertices[0].u,
- GL_TRIANGLES, bitmapCount * 6, false, true, 0, true, false);
+ GL_TRIANGLES, bitmapCount * 6, false, true, 0,
+ kModelViewMode_Translate, false);
}
return DrawGlInfo::kStatusDrew;
const float right = left + bitmap->width();
const float bottom = top + bitmap->height();
- if (quickReject(left, top, right, bottom)) {
+ if (quickRejectSetupScissor(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
const mat4 transform(*matrix);
transform.mapRect(r);
- if (quickReject(r.left, r.top, r.right, r.bottom)) {
+ if (quickRejectSetupScissor(r.left, r.top, r.right, r.bottom)) {
return DrawGlInfo::kStatusDone;
}
const float right = left + bitmap->width();
const float bottom = top + bitmap->height();
- if (quickReject(left, top, right, bottom)) {
+ if (quickRejectSetupScissor(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
}
}
- if (quickReject(left, top, right, bottom)) {
+ if (quickRejectSetupScissor(left, top, right, bottom)) {
if (cleanupColors) delete[] colors;
return DrawGlInfo::kStatusDone;
}
setupDrawBlending(true, mode, false);
setupDrawProgram();
setupDrawDirtyRegionsDisabled();
- setupDrawModelView(0.0f, 0.0f, 1.0f, 1.0f, false);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false, 0.0f, 0.0f, 1.0f, 1.0f);
setupDrawTexture(texture->id);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
float srcLeft, float srcTop, float srcRight, float srcBottom,
float dstLeft, float dstTop, float dstRight, float dstBottom,
SkPaint* paint) {
- if (quickReject(dstLeft, dstTop, dstRight, dstBottom)) {
+ if (quickRejectSetupScissor(dstLeft, dstTop, dstRight, dstBottom)) {
return DrawGlInfo::kStatusDone;
}
status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
float left, float top, float right, float bottom, SkPaint* paint) {
- if (quickReject(left, top, right, bottom)) {
+ if (quickRejectSetupScissor(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, const Patch* mesh, AssetAtlas::Entry* entry,
float left, float top, float right, float bottom, SkPaint* paint) {
- if (quickReject(left, top, right, bottom)) {
+ if (quickRejectSetupScissor(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
}
}
+ bool ignoreTransform = false;
if (CC_LIKELY(pureTranslate)) {
const float x = (int) floorf(left + currentTransform().getTranslateX() + 0.5f);
const float y = (int) floorf(top + currentTransform().getTranslateY() + 0.5f);
right = x + right - left;
bottom = y + bottom - top;
- drawIndexedTextureMesh(x, y, right, bottom, texture->id, alpha / 255.0f,
- mode, texture->blend, (GLvoid*) mesh->offset, (GLvoid*) mesh->textureOffset,
- GL_TRIANGLES, mesh->indexCount, false, true,
- mCaches.patchCache.getMeshBuffer(), true, !mesh->hasEmptyQuads);
- } else {
- drawIndexedTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f,
- mode, texture->blend, (GLvoid*) mesh->offset, (GLvoid*) mesh->textureOffset,
- GL_TRIANGLES, mesh->indexCount, false, false,
- mCaches.patchCache.getMeshBuffer(), true, !mesh->hasEmptyQuads);
+ left = x;
+ top = y;
+ ignoreTransform = true;
}
+ drawIndexedTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f,
+ mode, texture->blend, (GLvoid*) mesh->offset, (GLvoid*) mesh->textureOffset,
+ GL_TRIANGLES, mesh->indexCount, false, ignoreTransform,
+ mCaches.patchCache.getMeshBuffer(), kModelViewMode_Translate, !mesh->hasEmptyQuads);
}
return DrawGlInfo::kStatusDrew;
drawIndexedTextureMesh(0.0f, 0.0f, 1.0f, 1.0f, texture->id, alpha / 255.0f,
mode, texture->blend, &vertices[0].x, &vertices[0].u,
- GL_TRIANGLES, indexCount, false, true, 0, true, false);
+ GL_TRIANGLES, indexCount, false, true, 0, kModelViewMode_Translate, false);
return DrawGlInfo::kStatusDrew;
}
status_t OpenGLRenderer::drawVertexBuffer(const VertexBuffer& vertexBuffer, SkPaint* paint,
bool useOffset) {
+ // not missing call to quickReject/dirtyLayer, always done at a higher level
+
if (!vertexBuffer.getVertexCount()) {
// no vertices to draw
return DrawGlInfo::kStatusDone;
setupDrawShader();
setupDrawBlending(isAA, mode);
setupDrawProgram();
- setupDrawModelViewIdentity(useOffset);
+ setupDrawModelView(kModelViewMode_Translate, useOffset, 0, 0, 0, 0);
setupDrawColorUniforms();
setupDrawColorFilterUniforms();
- setupDrawShaderIdentityUniforms();
+ setupDrawShaderUniforms();
void* vertices = vertexBuffer.getBuffer();
bool force = mCaches.unbindMeshBuffer();
if (hasLayer()) {
SkRect bounds = path.getBounds();
- PathTessellator::expandBoundsForStroke(bounds, paint, false);
+ PathTessellator::expandBoundsForStroke(bounds, paint);
dirtyLayer(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, currentTransform());
}
SkRect bounds;
PathTessellator::tessellateLines(points, count, paint, mSnapshot->transform, bounds, buffer);
- if (quickReject(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) {
+ // can't pass paint, since style would be checked for outset. outset done by tessellation.
+ if (quickRejectSetupScissor(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) {
return DrawGlInfo::kStatusDone;
}
SkRect bounds;
PathTessellator::tessellatePoints(points, count, paint, mSnapshot->transform, bounds, buffer);
- if (quickReject(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) {
+ // can't pass paint, since style would be checked for outset. outset done by tessellation.
+ if (quickRejectSetupScissor(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) {
return DrawGlInfo::kStatusDone;
}
status_t OpenGLRenderer::drawRoundRect(float left, float top, float right, float bottom,
float rx, float ry, SkPaint* p) {
- if (mSnapshot->isIgnored() || quickRejectPreStroke(left, top, right, bottom, p) ||
+ if (mSnapshot->isIgnored() || quickRejectSetupScissor(left, top, right, bottom, p) ||
(p->getAlpha() == 0 && getXfermode(p->getXfermode()) != SkXfermode::kClear_Mode)) {
return DrawGlInfo::kStatusDone;
}
}
status_t OpenGLRenderer::drawCircle(float x, float y, float radius, SkPaint* p) {
- if (mSnapshot->isIgnored() || quickRejectPreStroke(x - radius, y - radius,
+ if (mSnapshot->isIgnored() || quickRejectSetupScissor(x - radius, y - radius,
x + radius, y + radius, p) ||
(p->getAlpha() == 0 && getXfermode(p->getXfermode()) != SkXfermode::kClear_Mode)) {
return DrawGlInfo::kStatusDone;
status_t OpenGLRenderer::drawOval(float left, float top, float right, float bottom,
SkPaint* p) {
- if (mSnapshot->isIgnored() || quickRejectPreStroke(left, top, right, bottom, p) ||
+ if (mSnapshot->isIgnored() || quickRejectSetupScissor(left, top, right, bottom, p) ||
(p->getAlpha() == 0 && getXfermode(p->getXfermode()) != SkXfermode::kClear_Mode)) {
return DrawGlInfo::kStatusDone;
}
status_t OpenGLRenderer::drawArc(float left, float top, float right, float bottom,
float startAngle, float sweepAngle, bool useCenter, SkPaint* p) {
- if (mSnapshot->isIgnored() || quickRejectPreStroke(left, top, right, bottom, p) ||
+ if (mSnapshot->isIgnored() || quickRejectSetupScissor(left, top, right, bottom, p) ||
(p->getAlpha() == 0 && getXfermode(p->getXfermode()) != SkXfermode::kClear_Mode)) {
return DrawGlInfo::kStatusDone;
}
#define SkPaintDefaults_MiterLimit SkIntToScalar(4)
status_t OpenGLRenderer::drawRect(float left, float top, float right, float bottom, SkPaint* p) {
- if (mSnapshot->isIgnored() || quickRejectPreStroke(left, top, right, bottom, p) ||
+ if (mSnapshot->isIgnored() || quickRejectSetupScissor(left, top, right, bottom, p) ||
(p->getAlpha() == 0 && getXfermode(p->getXfermode()) != SkXfermode::kClear_Mode)) {
return DrawGlInfo::kStatusDone;
}
setupDrawShader();
setupDrawBlending(true, mode);
setupDrawProgram();
- setupDrawModelView(sx, sy, sx + shadow->width, sy + shadow->height);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false,
+ sx, sy, sx + shadow->width, sy + shadow->height);
setupDrawTexture(shadow->id);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
// The checks for corner-case ignorable text and quick rejection is only done for immediate
// drawing as ops from DeferredDisplayList are already filtered for these
if (text == NULL || count == 0 || mSnapshot->isIgnored() || canSkipText(paint) ||
- quickReject(bounds)) {
+ quickRejectSetupScissor(bounds)) {
return DrawGlInfo::kStatusDone;
}
}
}
bool clipRequired = false;
- const bool rejected = quickRejectNoScissor(x, y,
- x + layer->layer.getWidth(), y + layer->layer.getHeight(), false, &clipRequired);
+ const bool rejected = calculateQuickRejectForScissor(x, y,
+ x + layer->layer.getWidth(), y + layer->layer.getHeight(), &clipRequired, false);
if (rejected) {
if (transform && !transform->isIdentity()) {
int ty = (int) floorf(y + currentTransform().getTranslateY() + 0.5f);
layer->setFilter(GL_NEAREST);
- setupDrawModelViewTranslate(tx, ty,
+ setupDrawModelView(kModelViewMode_Translate, false, tx, ty,
tx + layer->layer.getWidth(), ty + layer->layer.getHeight(), true);
} else {
layer->setFilter(GL_LINEAR);
- setupDrawModelViewTranslate(x, y,
+ setupDrawModelView(kModelViewMode_Translate, false, x, y,
x + layer->layer.getWidth(), y + layer->layer.getHeight());
}
void OpenGLRenderer::drawPathTexture(const PathTexture* texture,
float x, float y, SkPaint* paint) {
- if (quickReject(x, y, x + texture->width, y + texture->height)) {
+ if (quickRejectSetupScissor(x, y, x + texture->width, y + texture->height)) {
return;
}
setupDrawShader();
setupDrawBlending(true, mode);
setupDrawProgram();
- setupDrawModelView(x, y, x + texture->width, y + texture->height);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false,
+ x, y, x + texture->width, y + texture->height);
setupDrawTexture(texture->id);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
bottom = fmaxf(bottom, b);
}
- if (clip && quickReject(left, top, right, bottom)) {
+ if (clip && quickRejectSetupScissor(left, top, right, bottom)) {
return DrawGlInfo::kStatusDone;
}
setupDrawBlending(mode);
setupDrawProgram();
setupDrawDirtyRegionsDisabled();
- setupDrawModelView(0.0f, 0.0f, 1.0f, 1.0f, ignoreTransform, true);
+ setupDrawModelView(kModelViewMode_Translate, false,
+ 0.0f, 0.0f, 0.0f, 0.0f, ignoreTransform);
setupDrawColorUniforms();
setupDrawShaderUniforms();
setupDrawColorFilterUniforms();
dirtyLayer(left, top, right, bottom, currentTransform());
}
- drawIndexedQuads(&mesh[0], count / 4);
+ issueIndexedQuadDraw(&mesh[0], count / 4);
return DrawGlInfo::kStatusDrew;
}
setupDrawColorFilter();
setupDrawBlending(mode);
setupDrawProgram();
- setupDrawModelView(left, top, right, bottom, ignoreTransform);
+ setupDrawModelView(kModelViewMode_TranslateAndScale, false,
+ left, top, right, bottom, ignoreTransform);
setupDrawColorUniforms();
setupDrawShaderUniforms(ignoreTransform);
setupDrawColorFilterUniforms();
void OpenGLRenderer::drawTextureMesh(float left, float top, float right, float bottom,
GLuint texture, float alpha, SkXfermode::Mode mode, bool blend,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
- bool swapSrcDst, bool ignoreTransform, GLuint vbo, bool ignoreScale, bool dirty) {
+ bool swapSrcDst, bool ignoreTransform, GLuint vbo,
+ ModelViewMode modelViewMode, bool dirty) {
setupDraw();
setupDrawWithTexture();
setupDrawBlending(blend, mode, swapSrcDst);
setupDrawProgram();
if (!dirty) setupDrawDirtyRegionsDisabled();
- if (!ignoreScale) {
- setupDrawModelView(left, top, right, bottom, ignoreTransform);
- } else {
- setupDrawModelViewTranslate(left, top, right, bottom, ignoreTransform);
- }
+ setupDrawModelView(modelViewMode, false, left, top, right, bottom, ignoreTransform);
setupDrawTexture(texture);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
void OpenGLRenderer::drawIndexedTextureMesh(float left, float top, float right, float bottom,
GLuint texture, float alpha, SkXfermode::Mode mode, bool blend,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
- bool swapSrcDst, bool ignoreTransform, GLuint vbo, bool ignoreScale, bool dirty) {
+ bool swapSrcDst, bool ignoreTransform, GLuint vbo,
+ ModelViewMode modelViewMode, bool dirty) {
setupDraw();
setupDrawWithTexture();
setupDrawBlending(blend, mode, swapSrcDst);
setupDrawProgram();
if (!dirty) setupDrawDirtyRegionsDisabled();
- if (!ignoreScale) {
- setupDrawModelView(left, top, right, bottom, ignoreTransform);
- } else {
- setupDrawModelViewTranslate(left, top, right, bottom, ignoreTransform);
- }
+ setupDrawModelView(modelViewMode, false, left, top, right, bottom, ignoreTransform);
setupDrawTexture(texture);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
void OpenGLRenderer::drawAlpha8TextureMesh(float left, float top, float right, float bottom,
GLuint texture, bool hasColor, int color, int alpha, SkXfermode::Mode mode,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
- bool ignoreTransform, bool ignoreScale, bool dirty) {
+ bool ignoreTransform, ModelViewMode modelViewMode, bool dirty) {
setupDraw();
setupDrawWithTexture(true);
setupDrawBlending(true, mode);
setupDrawProgram();
if (!dirty) setupDrawDirtyRegionsDisabled();
- if (!ignoreScale) {
- setupDrawModelView(left, top, right, bottom, ignoreTransform);
- } else {
- setupDrawModelViewTranslate(left, top, right, bottom, ignoreTransform);
- }
+ setupDrawModelView(modelViewMode, false, left, top, right, bottom, ignoreTransform);
setupDrawTexture(texture);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
- setupDrawShaderUniforms();
+ setupDrawShaderUniforms(ignoreTransform);
setupDrawMesh(vertices, texCoords);
glDrawArrays(drawMode, 0, elementsCount);
kClipSide_ConservativeFull = 0x1F
};
+/**
+ * Defines additional transformation that should be applied by the model view matrix, beyond that of
+ * the currentTransform()
+ */
+enum ModelViewMode {
+ /**
+ * Used when the model view should simply translate geometry passed to the shader. The resulting
+ * matrix will be a simple translation.
+ */
+ kModelViewMode_Translate = 0,
+
+ /**
+ * Used when the model view should translate and scale geometry. The resulting matrix will be a
+ * translation + scale. This is frequently used together with VBO 0, the (0,0,1,1) rect.
+ */
+ kModelViewMode_TranslateAndScale = 1,
+};
+
///////////////////////////////////////////////////////////////////////////////
// Renderer
///////////////////////////////////////////////////////////////////////////////
ANDROID_API const Rect& getClipBounds();
- /**
- * Performs a quick reject but adjust the bounds to account for stroke width if necessary,
- * and handling snapOut for AA geometry.
- */
- bool quickRejectPreStroke(float left, float top, float right, float bottom, SkPaint* paint);
-
- /**
- * Returns false and sets scissor based upon bounds if drawing won't be clipped out
- */
- bool quickReject(float left, float top, float right, float bottom, bool snapOut = false);
- bool quickReject(const Rect& bounds) {
- return quickReject(bounds.left, bounds.top, bounds.right, bounds.bottom);
- }
-
- /**
- * Same as quickReject, without the scissor, instead returning clipRequired through pointer.
- * clipRequired will be only set if not rejected
- */
- ANDROID_API bool quickRejectNoScissor(float left, float top, float right, float bottom,
- bool snapOut = false, bool* clipRequired = NULL);
- bool quickRejectNoScissor(const Rect& bounds, bool* clipRequired = NULL) {
- return quickRejectNoScissor(bounds.left, bounds.top, bounds.right, bounds.bottom,
- clipRequired);
- }
+ ANDROID_API bool quickRejectConservative(float left, float top,
+ float right, float bottom) const;
virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
virtual bool clipPath(SkPath* path, SkRegion::Op op);
*/
void attachStencilBufferToLayer(Layer* layer);
+ bool calculateQuickRejectForScissor(float left, float top, float right, float bottom,
+ bool* clipRequired, bool snapOut) const;
+
+ bool quickRejectSetupScissor(float left, float top, float right, float bottom,
+ SkPaint* paint = NULL);
+ bool quickRejectSetupScissor(const Rect& bounds, SkPaint* paint = NULL) {
+ return quickRejectSetupScissor(bounds.left, bounds.top,
+ bounds.right, bounds.bottom, paint);
+ }
+
/**
* Compose the layer defined in the current snapshot with the layer
* defined by the previous snapshot.
* @param swapSrcDst Whether or not the src and dst blending operations should be swapped
* @param ignoreTransform True if the current transform should be ignored
* @param vbo The VBO used to draw the mesh
- * @param ignoreScale True if the model view matrix should not be scaled
+ * @param modelViewMode Defines whether the model view matrix should be scaled
* @param dirty True if calling this method should dirty the current layer
*/
void drawTextureMesh(float left, float top, float right, float bottom, GLuint texture,
float alpha, SkXfermode::Mode mode, bool blend,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
bool swapSrcDst = false, bool ignoreTransform = false, GLuint vbo = 0,
- bool ignoreScale = false, bool dirty = true);
+ ModelViewMode modelViewMode = kModelViewMode_TranslateAndScale, bool dirty = true);
void drawIndexedTextureMesh(float left, float top, float right, float bottom, GLuint texture,
float alpha, SkXfermode::Mode mode, bool blend,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
bool swapSrcDst = false, bool ignoreTransform = false, GLuint vbo = 0,
- bool ignoreScale = false, bool dirty = true);
+ ModelViewMode modelViewMode = kModelViewMode_TranslateAndScale, bool dirty = true);
void drawAlpha8TextureMesh(float left, float top, float right, float bottom,
GLuint texture, bool hasColor, int color, int alpha, SkXfermode::Mode mode,
GLvoid* vertices, GLvoid* texCoords, GLenum drawMode, GLsizei elementsCount,
- bool ignoreTransform, bool ignoreScale = false, bool dirty = true);
+ bool ignoreTransform, ModelViewMode modelViewMode = kModelViewMode_TranslateAndScale,
+ bool dirty = true);
/**
* Draws the specified list of vertices as quads using indexed GL_TRIANGLES.
* If the number of vertices to draw exceeds the number of indices we have
* pre-allocated, this method will generate several glDrawElements() calls.
*/
- void drawIndexedQuads(Vertex* mesh, GLsizei quadsCount);
+ void issueIndexedQuadDraw(Vertex* mesh, GLsizei quadsCount);
/**
* Draws text underline and strike-through if needed.
bool swapSrcDst = false);
void setupDrawProgram();
void setupDrawDirtyRegionsDisabled();
- void setupDrawModelViewIdentity(bool offset = false);
- void setupDrawModelView(float left, float top, float right, float bottom,
- bool ignoreTransform = false, bool ignoreModelView = false);
- void setupDrawModelViewTranslate(float left, float top, float right, float bottom,
- bool ignoreTransform = false);
+
+ /**
+ * Setup the current program matrices based upon the nature of the geometry.
+ *
+ * @param mode If kModelViewMode_Translate, the geometry must be translated by the left and top
+ * parameters. If kModelViewMode_TranslateAndScale, the geometry that exists in the (0,0, 1,1)
+ * space must be scaled up and translated to fill the quad provided in (l,t,r,b). These
+ * transformations are stored in the modelView matrix and uploaded to the shader.
+ *
+ * @param offset Set to true if the the matrix should be fudged (translated) slightly to disambiguate
+ * geometry pixel positioning. See Vertex::gGeometryFudgeFactor.
+ *
+ * @param ignoreTransform Set to true if l,t,r,b coordinates already in layer space,
+ * currentTransform() will be ignored. (e.g. when drawing clip in layer coordinates to stencil,
+ * or when simple translation has been extracted)
+ */
+ void setupDrawModelView(ModelViewMode mode, bool offset,
+ float left, float top, float right, float bottom, bool ignoreTransform = false);
void setupDrawColorUniforms();
void setupDrawPureColorUniforms();
- void setupDrawShaderIdentityUniforms();
void setupDrawShaderUniforms(bool ignoreTransform = false);
void setupDrawColorFilterUniforms();
void setupDrawSimpleMesh();
// Matrix used for ortho projection in shaders
mat4 mOrthoMatrix;
- // Model-view matrix used to position/size objects
+ /**
+ * Model-view matrix used to position/size objects
+ *
+ * Stores operation-local modifications to the draw matrix that aren't incorporated into the
+ * currentTransform().
+ *
+ * If generated with kModelViewMode_Translate, the mModelView will reflect an x/y offset,
+ * e.g. the offset in drawLayer(). If generated with kModelViewMode_TranslateAndScale,
+ * mModelView will reflect a translation and scale, e.g. the translation and scale required to
+ * make VBO 0 (a rect of (0,0,1,1)) scaled to match the x,y offset, and width/height of a
+ * bitmap.
+ *
+ * Used as input to SkiaShader transformation.
+ */
mat4 mModelView;
// Number of saved states
* limitations under the License.
*/
-#define LOG_TAG "PathTessellator"
+#define LOG_TAG "OpenGLRenderer"
#define LOG_NDEBUG 1
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#define ROUND_CAP_THRESH 0.25f
#define PI 3.1415926535897932f
-void PathTessellator::expandBoundsForStroke(SkRect& bounds, const SkPaint* paint,
- bool forceExpand) {
- if (forceExpand || paint->getStyle() != SkPaint::kFill_Style) {
+/**
+ * Note: this function doesn't account for the AA case with sub-pixel line thickness (not just 0 <
+ * width < 1.0, canvas scale factors in as well) so this can't be used for points/lines
+ */
+void PathTessellator::expandBoundsForStroke(SkRect& bounds, const SkPaint* paint) {
+ if (paint->getStyle() != SkPaint::kFill_Style) {
float outset = paint->getStrokeWidth() * 0.5f;
if (outset == 0) outset = 0.5f; // account for hairline
bounds.outset(outset, outset);
}
return 0;
}
+
+ /**
+ * Outset the bounds of point data (for line endpoints or points) to account for AA stroke
+ * geometry.
+ */
+ void expandBoundsForStrokeAA(SkRect& bounds) const {
+ float outset = halfStrokeWidth;
+ if (outset == 0) outset = 0.5f;
+ bounds.outset(outset * inverseScaleX + Vertex::gGeometryFudgeFactor,
+ outset * inverseScaleY + Vertex::gGeometryFudgeFactor);
+ }
};
void getFillVerticesFromPerimeter(const Vector<Vertex>& perimeter, VertexBuffer& vertexBuffer) {
* 3 - zig zag back and forth inside the shape to fill it (using perimeter.size() vertices)
*/
void getFillVerticesFromPerimeterAA(const PaintInfo& paintInfo, const Vector<Vertex>& perimeter,
- VertexBuffer& vertexBuffer) {
+ VertexBuffer& vertexBuffer, float maxAlpha = 1.0f) {
AlphaVertex* buffer = vertexBuffer.alloc<AlphaVertex>(perimeter.size() * 3 + 2);
// generate alpha points - fill Alpha vertex gaps in between each point with
AlphaVertex::set(&buffer[currentIndex++],
current->x - totalOffset.x,
current->y - totalOffset.y,
- 1.0f);
+ maxAlpha);
last = current;
current = next;
getFillVerticesFromPerimeter(outlineVertices, tempBuffer);
instanceVertices<Vertex>(tempBuffer, vertexBuffer, points, count, bounds);
} else {
- getFillVerticesFromPerimeterAA(paintInfo, outlineVertices, tempBuffer);
+ // note: pass maxAlpha directly, since we want fill to be alpha modulated
+ getFillVerticesFromPerimeterAA(paintInfo, outlineVertices, tempBuffer, paintInfo.maxAlpha);
instanceVertices<AlphaVertex>(tempBuffer, vertexBuffer, points, count, bounds);
}
- expandBoundsForStroke(bounds, paint, true); // force-expand bounds to incorporate stroke
+ // expand bounds from vertex coords to pixel data
+ paintInfo.expandBoundsForStrokeAA(bounds);
+
}
void PathTessellator::tessellateLines(const float* points, int count, SkPaint* paint,
expandRectToCoverVertex(bounds, tempVerticesData[1]);
}
- expandBoundsForStroke(bounds, paint, true); // force-expand bounds to incorporate stroke
-
// since multiple objects tessellated into buffer, separate them with degen tris
if (paintInfo.isAA) {
vertexBuffer.createDegenerateSeparators<AlphaVertex>(lineAllocSize);
} else {
vertexBuffer.createDegenerateSeparators<Vertex>(lineAllocSize);
}
+
+ // expand bounds from vertex coords to pixel data
+ paintInfo.expandBoundsForStrokeAA(bounds);
}
///////////////////////////////////////////////////////////////////////////////
class PathTessellator {
public:
- static void expandBoundsForStroke(SkRect& bounds, const SkPaint* paint, bool forceExpand);
+ static void expandBoundsForStroke(SkRect& bounds, const SkPaint* paint);
static void tessellatePath(const SkPath& path, const SkPaint* paint,
const mat4 *transform, VertexBuffer& vertexBuffer);
bottom = floorf(bottom + 0.5f);
}
+ void roundOut() {
+ left = floorf(left);
+ top = floorf(top);
+ right = ceilf(right);
+ bottom = ceilf(bottom);
+ }
+
void dump() const {
ALOGD("Rect[l=%f t=%f r=%f b=%f]", left, top, right, bottom);
}
import android.content.Intent;
import android.location.LocationManager;
import android.os.Bundle;
-import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
import android.os.IBinder;
import android.location.IGeofenceProvider;
-import android.util.Log;
-
-import java.lang.Long;
/**
* Base class for geofence providers implemented as unbundled services.
import android.location.ILocationManager;
import android.location.Location;
import android.location.LocationManager;
-import android.location.LocationRequest;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
package android.media;
-import android.util.Log;
-
import java.io.InputStream;
import java.io.IOException;
import android.os.SystemClock;
import android.util.Log;
-import java.io.IOException;
-import java.lang.IllegalStateException;
import java.util.LinkedList;
/**
import android.content.Intent;
import android.media.RemoteController.OnClientUpdateListener;
import android.os.Binder;
-import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import static android.media.AudioManager.RINGER_MODE_SILENT;
import static android.media.AudioManager.RINGER_MODE_VIBRATE;
-import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.AppOpsManager;
import android.app.KeyguardManager;
import android.app.PendingIntent;
-import android.app.PendingIntent.CanceledException;
import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothProfile;
-import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.database.ContentObserver;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
-import android.net.Uri;
import android.os.Binder;
import android.os.Build;
-import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import android.os.Vibrator;
import android.provider.Settings;
import android.provider.Settings.System;
-import android.speech.RecognizerIntent;
-import android.telephony.PhoneStateListener;
-import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
-import java.util.Stack;
/**
* The implementation of the volume manager service.
import java.util.List;
import java.util.ArrayList;
-import android.util.Log;
/**
* The EncoderCapabilities class is used to retrieve the
package android.media;
-import android.media.MediaDrmException;
import java.lang.ref.WeakReference;
import java.util.UUID;
import java.util.HashMap;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
-import android.os.Bundle;
import android.os.Parcel;
import android.util.Log;
package android.media;
-import android.content.ContentValues;
-import android.provider.MediaStore.Audio;
-import android.provider.MediaStore.Images;
-import android.provider.MediaStore.Video;
import android.media.DecoderCapabilities;
import android.media.DecoderCapabilities.VideoDecoder;
import android.media.DecoderCapabilities.AudioDecoder;
import android.mtp.MtpConstants;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import android.util.Slog;
import android.view.KeyEvent;
-import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;
import android.graphics.Bitmap;
import android.os.Bundle;
-import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.util.SparseIntArray;
import android.os.Message;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.PowerManager;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
-import android.graphics.Bitmap;
import android.graphics.SurfaceTexture;
import android.media.AudioManager;
import android.media.MediaFormat;
import android.media.MediaTimeProvider;
-import android.media.MediaTimeProvider.OnMediaTimeListener;
import android.media.SubtitleController;
import android.media.SubtitleData;
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
static class Static implements DisplayManager.DisplayListener {
- // Time between wifi display scans when actively scanning in milliseconds.
- private static final int WIFI_DISPLAY_SCAN_INTERVAL = 10000;
-
final Context mAppContext;
final Resources mResources;
final IAudioService mAudioService;
final boolean mCanConfigureWifiDisplays;
boolean mActivelyScanningWifiDisplays;
+ String mPreviousActiveWifiDisplayAddress;
int mDiscoveryRequestRouteTypes;
boolean mDiscoverRequestActiveScan;
}
};
- final Runnable mScanWifiDisplays = new Runnable() {
- @Override
- public void run() {
- if (mActivelyScanningWifiDisplays) {
- mDisplayService.scanWifiDisplays();
- mHandler.postDelayed(this, WIFI_DISPLAY_SCAN_INTERVAL);
- }
- }
- };
-
Static(Context appContext) {
mAppContext = appContext;
mResources = Resources.getSystem();
}
// Update wifi display scanning.
- if (activeScanWifiDisplay && mCanConfigureWifiDisplays) {
- if (!mActivelyScanningWifiDisplays) {
- mActivelyScanningWifiDisplays = true;
- mHandler.post(mScanWifiDisplays);
+ // TODO: All of this should be managed by the media router service.
+ if (mCanConfigureWifiDisplays) {
+ if (mSelectedRoute != null
+ && mSelectedRoute.matchesTypes(ROUTE_TYPE_REMOTE_DISPLAY)) {
+ // Don't scan while already connected to a remote display since
+ // it may interfere with the ongoing transmission.
+ activeScanWifiDisplay = false;
}
- } else {
- if (mActivelyScanningWifiDisplays) {
- mActivelyScanningWifiDisplays = false;
- mHandler.removeCallbacks(mScanWifiDisplays);
+ if (activeScanWifiDisplay) {
+ if (!mActivelyScanningWifiDisplays) {
+ mActivelyScanningWifiDisplays = true;
+ mDisplayService.startWifiDisplayScan();
+ }
+ } else {
+ if (mActivelyScanningWifiDisplays) {
+ mActivelyScanningWifiDisplays = false;
+ mDisplayService.stopWifiDisplayScan();
+ }
}
}
}
dispatchRouteSelected(types & route.getSupportedTypes(), route);
}
+
+ // The behavior of active scans may depend on the currently selected route.
+ sStatic.updateDiscoveryRequest();
}
static void selectDefaultRouteStatic() {
}
static void updateWifiDisplayStatus(WifiDisplayStatus status) {
- boolean wantScan = false;
WifiDisplay[] displays;
WifiDisplay activeDisplay;
-
if (status.getFeatureState() == WifiDisplayStatus.FEATURE_STATE_ON) {
displays = status.getDisplays();
activeDisplay = status.getActiveDisplay();
displays = WifiDisplay.EMPTY_ARRAY;
activeDisplay = null;
}
+ String activeDisplayAddress = activeDisplay != null ?
+ activeDisplay.getDeviceAddress() : null;
// Add or update routes.
for (int i = 0; i < displays.length; i++) {
if (route == null) {
route = makeWifiDisplayRoute(d, status);
addRouteStatic(route);
- wantScan = true;
} else {
- updateWifiDisplayRoute(route, d, status);
+ String address = d.getDeviceAddress();
+ boolean disconnected = !address.equals(activeDisplayAddress)
+ && address.equals(sStatic.mPreviousActiveWifiDisplayAddress);
+ updateWifiDisplayRoute(route, d, status, disconnected);
}
if (d.equals(activeDisplay)) {
selectRouteStatic(route.getSupportedTypes(), route, false);
}
}
- // Don't scan if we're already connected to a wifi display,
- // the scanning process can cause a hiccup with some configurations.
- if (wantScan && activeDisplay != null && sStatic.mCanConfigureWifiDisplays) {
- sStatic.mDisplayService.scanWifiDisplays();
- }
+ // Remember the current active wifi display address so that we can infer disconnections.
+ // TODO: This hack will go away once all of this is moved into the media router service.
+ sStatic.mPreviousActiveWifiDisplayAddress = activeDisplayAddress;
}
private static boolean shouldShowWifiDisplay(WifiDisplay d, WifiDisplay activeDisplay) {
}
private static void updateWifiDisplayRoute(
- RouteInfo route, WifiDisplay display, WifiDisplayStatus wfdStatus) {
+ RouteInfo route, WifiDisplay display, WifiDisplayStatus wfdStatus,
+ boolean disconnected) {
boolean changed = false;
final String newName = display.getFriendlyDisplayName();
if (!route.getName().equals(newName)) {
dispatchRouteChanged(route);
}
- if (!enabled && route.isSelected()) {
+ if ((!enabled || disconnected) && route.isSelected()) {
// Oops, no longer available. Reselect the default.
selectDefaultRouteStatic();
}
package android.media;
-import android.graphics.Bitmap;
import android.os.Parcel;
import android.util.Log;
package android.media;
-import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Environment;
import android.util.Log;
package android.media;
-import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
-import android.media.MediaMetadataRetriever;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
-import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
package android.media;
-import android.Manifest;
import android.app.ActivityManager;
import android.app.PendingIntent;
import android.app.PendingIntent.CanceledException;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
-import android.os.RemoteException;
-import android.os.ServiceManager;
import android.os.SystemClock;
import android.util.DisplayMetrics;
import android.util.Log;
package android.media;
-import android.util.Log;
-
import java.io.InputStream;
import java.io.IOException;
import android.app.Activity;
import android.content.ContentUris;
import android.content.Context;
-import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.net.Uri;
import android.os.Environment;
import java.io.File;
import java.io.FileDescriptor;
-import java.io.IOException;
import java.lang.ref.WeakReference;
import android.content.Context;
package android.media;
import android.os.Parcel;
-import android.util.Log;
/**
* @hide
package android.media;
import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.media.MediaFile.MediaFileType;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
-import android.provider.BaseColumns;
import android.provider.MediaStore.Images;
-import android.provider.MediaStore.Images.Thumbnails;
import android.util.Log;
import java.io.FileInputStream;
import java.io.FileDescriptor;
import java.io.IOException;
-import java.io.OutputStream;
/**
* Thumbnail generation routines for media provider.
import android.os.Looper;
import android.os.Message;
import android.util.Log;
-import java.io.IOException;
import java.lang.ref.WeakReference;
import java.nio.ByteOrder;
import java.nio.ByteBuffer;
package android.media.audiofx;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
import android.media.audiofx.AudioEffect;
-import android.os.Bundle;
import android.util.Log;
-import java.nio.ByteOrder;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
import java.util.StringTokenizer;
package android.media.audiofx;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
import android.media.audiofx.AudioEffect;
-import android.os.Bundle;
-import android.util.Log;
-
-import java.nio.ByteOrder;
-import java.nio.ByteBuffer;
import java.util.StringTokenizer;
/**
package android.media.audiofx;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
import android.media.audiofx.AudioEffect;
-import android.os.Bundle;
import android.util.Log;
-import java.nio.ByteOrder;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
import java.util.StringTokenizer;
package android.media.audiofx;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
import android.media.audiofx.AudioEffect;
-import android.os.Bundle;
-import android.util.Log;
-
-import java.nio.ByteOrder;
-import java.nio.ByteBuffer;
import java.util.StringTokenizer;
package android.media.audiofx;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
import android.media.audiofx.AudioEffect;
-import android.os.Bundle;
import android.util.Log;
-import java.nio.ByteOrder;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
import java.util.StringTokenizer;
import android.util.Log;
import java.lang.ref.WeakReference;
-import java.io.IOException;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
-import android.graphics.Rect;
import android.graphics.Matrix;
import android.media.videoeditor.VideoEditor.ExportProgressListener;
import android.media.videoeditor.VideoEditor.PreviewProgressListener;
import android.database.sqlite.SQLiteDatabase;
import android.media.MediaScanner;
import android.net.Uri;
-import android.os.Environment;
import android.os.RemoteException;
import android.provider.MediaStore;
import android.provider.MediaStore.Audio;
import android.provider.MediaStore.Files;
-import android.provider.MediaStore.Images;
import android.provider.MediaStore.MediaColumns;
import android.util.Log;
import android.view.Display;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
-import android.os.ParcelFileDescriptor;
-import android.util.Log;
/**
* This class represents an MTP or PTP device connected on the USB host bus. An application can
import android.database.Cursor;
import android.net.Uri;
import android.os.RemoteException;
-import android.provider.MediaStore;
import android.provider.MediaStore.Audio;
import android.provider.MediaStore.Files;
import android.provider.MediaStore.Images;
import com.android.internal.util.Objects;
-import android.media.MediaRouter;
import android.media.RemoteDisplayState.RemoteDisplayInfo;
import android.text.TextUtils;
import android.filterfw.core.CachedFrameManager;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.FilterFactory;
import android.filterfw.core.GLEnvironment;
-import android.filterfw.core.GLFrame;
-import android.filterfw.core.FrameManager;
import android.opengl.GLES20;
/**
package android.media.effect;
import java.lang.reflect.Constructor;
-import java.util.HashMap;
/**
* <p>The EffectFactory class defines the list of available Effects, and provides functionality to
package android.media.effect;
-import android.filterfw.core.CachedFrameManager;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.FilterFactory;
-import android.filterfw.core.GLEnvironment;
import android.filterfw.core.GLFrame;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterGraph;
import android.filterfw.core.GraphRunner;
-import android.filterfw.core.SimpleScheduler;
import android.filterfw.core.SyncRunner;
-import android.media.effect.Effect;
import android.media.effect.FilterEffect;
import android.media.effect.EffectContext;
import android.filterfw.io.GraphIOException;
import android.filterfw.io.GraphReader;
import android.filterfw.io.TextGraphReader;
-import android.util.Log;
-
/**
* Effect subclass for effects based on a single Filter. Subclasses need only invoke the
* constructor with the correct arguments to obtain an Effect implementation.
import android.filterfw.core.FilterFactory;
import android.filterfw.core.FilterFunction;
import android.filterfw.core.Frame;
-import android.media.effect.Effect;
import android.media.effect.EffectContext;
-import android.util.Log;
-
/**
* Effect subclass for effects based on a single Filter. Subclasses need only invoke the
* constructor with the correct arguments to obtain an Effect implementation.
package android.media.effect;
-import android.filterfw.core.Filter;
-import android.filterfw.core.FilterFactory;
-import android.filterfw.core.FilterFunction;
import android.filterfw.core.Frame;
-import android.media.effect.Effect;
import android.media.effect.EffectContext;
-import android.util.Log;
-
/**
* Effect subclass for effects based on a single Filter with output size differnet
* from input. Subclasses need only invoke the constructor with the correct arguments
import android.media.effect.EffectContext;
import android.media.effect.SizeChangeEffect;
-import android.media.effect.SingleFilterEffect;
import android.filterpacks.imageproc.CropRectFilter;
/**
import android.filterfw.core.Filter;
import android.filterfw.core.FilterFactory;
import android.filterfw.core.FilterFunction;
-import android.filterfw.core.Frame;
import android.filterfw.core.FrameManager;
/**
package android.filterfw.core;
import android.os.AsyncTask;
-import android.os.Handler;
import android.util.Log;
-import java.lang.InterruptedException;
-import java.lang.Runnable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.TimeUnit;
-
/**
* @hide
*/
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
-import java.util.LinkedList;
import java.util.Set;
/**
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
import android.graphics.Bitmap;
-import android.util.Log;
import java.nio.ByteBuffer;
import android.filterfw.core.NativeBuffer;
import android.graphics.Bitmap;
-import android.util.Log;
-
import java.nio.ByteBuffer;
/**
package android.filterfw.core;
import android.filterfw.core.Filter;
-import android.filterfw.core.Scheduler;
import android.filterfw.core.RoundRobinScheduler;
import android.util.Log;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
-import android.filterfw.core.NativeBuffer;
import android.filterfw.format.ObjectFormat;
import android.graphics.Bitmap;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.io.OptionalDataException;
import java.io.OutputStream;
-import java.io.StreamCorruptedException;
-import java.lang.reflect.Constructor;
import java.nio.ByteBuffer;
/**
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager;
-import android.filterfw.core.NativeBuffer;
import android.filterfw.format.ObjectFormat;
import android.graphics.Bitmap;
-import java.lang.reflect.Constructor;
import java.nio.ByteBuffer;
/**
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.os.Handler;
import android.os.Looper;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.KeyValueMap;
/**
* @hide
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
-import android.util.Log;
-
/**
* @hide
*/
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
/**
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.MutableFrameFormat;
import android.filterfw.format.ImageFormat;
-import java.util.Set;
-
/**
* @hide
*/
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.MutableFrameFormat;
import android.filterfw.format.ImageFormat;
-import java.util.Set;
-
/**
* @hide
*/
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.format.PrimitiveFormat;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
/**
* @hide
package android.filterpacks.base;
-import java.util.Set;
-
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.MutableFrameFormat;
import android.filterfw.format.ObjectFormat;
/**
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import java.io.OutputStream;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
/**
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
-import android.filterfw.format.ImageFormat;
-
-import java.util.Set;
/**
* @hide
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.NativeProgram;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
public class AutoFixFilter extends Filter {
@GenerateFieldPort(name = "tile_size", hasDefault = true)
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.filterpacks.imageproc.ImageCombineFilter;
import android.graphics.Bitmap;
-import android.util.Log;
-
/**
* @hide
*/
package android.filterpacks.imageproc;
-import android.content.Context;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
-import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeFrame;
import android.filterfw.format.ImageFormat;
import android.graphics.Bitmap;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
-import android.filterfw.format.ImageFormat;
-
-import java.util.Set;
/**
* The filter linearly blends "left" and "right" frames. The blending weight is
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
public class ColorTemperatureFilter extends Filter {
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
-import java.util.Set;
-
/**
* @hide
*/
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
-import android.filterfw.geometry.Point;
import android.filterfw.geometry.Quad;
import android.filterfw.format.ImageFormat;
import android.filterfw.format.ObjectFormat;
-import android.util.Log;
-
/**
* @hide
*/
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
/**
* @hide
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
public class CrossProcessFilter extends Filter {
@GenerateFieldPort(name = "tile_size", hasDefault = true)
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.GLFrame;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.geometry.Quad;
import android.filterfw.format.ImageFormat;
import android.filterfw.format.ObjectFormat;
-import android.opengl.GLES20;
-
/**
* @hide
*/
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.geometry.Quad;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.GenerateFinalPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
import java.lang.Math;
-import java.util.Set;
/**
* @hide
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.geometry.Point;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.filterfw.geometry.Quad;
-import android.filterfw.geometry.Point;
import java.util.Date;
import java.util.Random;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
-import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import java.lang.reflect.Field;
-import java.util.HashSet;
-import java.util.Set;
/**
* @hide
package android.filterpacks.imageproc;
-import android.content.Context;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.format.ImageFormat;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
-import android.util.Log;
-
import java.io.OutputStream;
-import java.io.IOException;
/**
* @hide
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
public class ImageStitcher extends Filter {
@GenerateFieldPort(name = "xSlices")
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
-import android.filterfw.core.FrameFormat;
import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
-import android.graphics.PointF;
-import android.util.Log;
/**
* @hide
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.geometry.Quad;
import android.filterfw.geometry.Point;
-import android.util.Log;
/**
* @hide
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import java.util.Set;
-
public class SharpenFilter extends Filter {
@GenerateFieldPort(name = "scale", hasDefault = true)
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
-import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import java.lang.reflect.Field;
-import java.util.HashSet;
-import java.util.Set;
/**
* @hide
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.geometry.Quad;
import android.filterfw.geometry.Point;
-import android.util.Log;
/**
* @hide
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
package android.filterpacks.imageproc;
-import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
-import java.lang.reflect.Field;
-
/**
* @hide
*/
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
import java.lang.Math;
/**
* @hide
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
-import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
/**
* @hide
*/
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
-import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.util.Log;
-
/**
* @hide
*/
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.KeyValueMap;
-import android.filterfw.core.MutableFrameFormat;
import android.filterfw.format.ObjectFormat;
/**
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLEnvironment;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
-import android.view.Surface;
import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-
-import android.graphics.Rect;
import android.util.Log;
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLEnvironment;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.view.Surface;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-
-import android.graphics.Rect;
import android.util.Log;
import android.filterfw.core.GLFrame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.opengl.GLES20;
import android.os.SystemProperties;
import android.util.Log;
-import java.lang.ArrayIndexOutOfBoundsException;
import java.lang.Math;
import java.util.Arrays;
import java.nio.ByteBuffer;
package android.filterpacks.videosink;
-import android.content.Context;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
-import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.geometry.Point;
import android.filterfw.geometry.Quad;
-import android.os.ConditionVariable;
import android.media.MediaRecorder;
import android.media.CamcorderProfile;
import android.filterfw.core.GLEnvironment;
import java.io.IOException;
import java.io.FileDescriptor;
-import java.util.List;
-import java.util.Set;
import android.util.Log;
package android.filterpacks.videosink;
import java.lang.RuntimeException;
-import android.util.Log;
/** @hide **/
public class MediaRecorderStopException extends RuntimeException {
package android.filterpacks.videosrc;
-import android.content.Context;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
-import android.os.ConditionVariable;
import android.opengl.Matrix;
import java.io.IOException;
import java.util.List;
-import java.util.Set;
import android.util.Log;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.graphics.SurfaceTexture;
import android.media.MediaPlayer;
import android.net.Uri;
-import android.os.ConditionVariable;
import android.opengl.Matrix;
import android.view.Surface;
import java.io.IOException;
-import java.io.FileDescriptor;
import java.lang.IllegalArgumentException;
-import java.util.List;
-import java.util.Set;
import android.util.Log;
package android.filterpacks.videosrc;
-import android.content.Context;
-import android.content.res.AssetFileDescriptor;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
-import android.filterfw.core.FrameManager;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.graphics.SurfaceTexture;
-import android.media.MediaPlayer;
import android.os.ConditionVariable;
import android.opengl.Matrix;
-import java.io.IOException;
-import java.io.FileDescriptor;
-import java.lang.IllegalArgumentException;
-import java.util.List;
-import java.util.Set;
-
import android.util.Log;
/** <p>A filter that converts textures from a SurfaceTexture object into frames for
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
-import android.filterfw.core.FilterSurfaceView;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.GenerateFinalPort;
import android.filterfw.core.GLEnvironment;
import android.filterfw.core.GLFrame;
-import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat;
-import android.filterfw.core.NativeProgram;
-import android.filterfw.core.NativeFrame;
-import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
import android.filterfw.geometry.Quad;
import android.filterfw.geometry.Point;
-import android.view.Surface;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-
-import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.util.Log;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StatFs;
-import android.os.SystemClock;
import android.provider.Settings;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.util.Slog;
import com.android.internal.app.IMediaContainerService;
mPosition = new int[count];
cursor.moveToPosition(-1);
- while (cursor.moveToNext()) {
+ while (cursor.moveToNext() && mCount < count) {
final String mimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);
final long lastModified = getCursorLong(cursor, Document.COLUMN_LAST_MODIFIED);
if (rejectMimes != null && MimePredicate.mimeMatches(rejectMimes, mimeType)) {
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.provider.DocumentsContract.Document;
-import android.util.Log;
import com.google.android.collect.Maps;
public class RecentLoader extends AsyncTaskLoader<DirectoryResult> {
private static final boolean LOGD = true;
+ // TODO: clean up cursor ownership so background thread doesn't traverse
+ // previously returned cursors for filtering/sorting; this currently races
+ // with the UI thread.
+
private static final int MAX_OUTSTANDING_RECENTS = 4;
private static final int MAX_OUTSTANDING_RECENTS_SVELTE = 2;
import libcore.io.IoUtils;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
package com.android.location.fused;
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="8016145283189546017">"Dispositivi di input"</string>
+ <string name="app_label" msgid="8016145283189546017">"Dispositivi di immissione"</string>
<string name="keyboard_layouts_label" msgid="6688773268302087545">"Tastiera Android"</string>
<string name="keyboard_layout_english_uk_label" msgid="6664258463319999632">"Inglese (UK)"</string>
<string name="keyboard_layout_english_us_label" msgid="8994890249649106291">"Inglese (USA)"</string>
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
-import android.util.Log;
-
class KeyguardCircleFramedDrawable extends Drawable {
private final Bitmap mBitmap;
import android.content.Context;
import android.os.BatteryManager;
import android.os.Handler;
-import android.os.IBinder;
import android.os.Looper;
-import android.os.RemoteException;
-import android.os.ServiceManager;
import android.os.SystemClock;
-import android.os.UserHandle;
-import android.provider.Settings;
import android.text.TextUtils;
import android.util.AttributeSet;
-import android.util.Slog;
import android.view.View;
import android.widget.TextView;
package com.android.keyguard;
import android.content.Context;
-import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.method.DigitsKeyListener;
package com.android.keyguard;
-import android.app.admin.DevicePolicyManager;
import android.content.Context;
-import android.content.res.Configuration;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
-import android.text.method.DigitsKeyListener;
import android.text.method.TextKeyListener;
import android.util.AttributeSet;
import android.view.View;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.TextView.OnEditorActionListener;
-import com.android.internal.widget.PasswordEntryKeyboardHelper;
-import com.android.internal.widget.PasswordEntryKeyboardView;
-
import java.util.List;
/**
* Displays an alphanumeric (latin-1) key entry for the user to enter
package com.android.keyguard;
import android.animation.ObjectAnimator;
-import android.app.ActivityManager;
-import android.app.PendingIntent;
import android.app.SearchManager;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings;
-import android.telephony.TelephonyManager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Slog;
import com.android.internal.telephony.PhoneConstants;
import android.content.Context;
-import android.content.DialogInterface;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.ProgressDialog;
-import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.method.DigitsKeyListener;
package com.android.keyguard;
import android.content.Context;
-import android.animation.AnimatorSet.Builder;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.method.DigitsKeyListener;
import android.media.RemoteController;
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.SystemClock;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.transition.ChangeBounds;
package com.android.keyguard;
-import android.app.PendingIntent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import com.android.internal.policy.IKeyguardShowCallback;
import com.android.internal.widget.LockPatternUtils;
-import android.app.Activity;
import android.app.ActivityManager;
import android.appwidget.AppWidgetManager;
import android.content.Context;
package com.android.keyguard;
-import android.graphics.Bitmap;
import com.android.internal.policy.IKeyguardExitCallback;
import com.android.internal.policy.IKeyguardShowCallback;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
-import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.WindowManager;
import android.view.WindowManagerPolicy;
import android.animation.AnimatorListenerAdapter;
import android.os.Handler;
import android.os.Looper;
-import android.util.Log;
import android.view.View;
public class KeyguardViewStateManager implements
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
-import android.view.View.MeasureSpec;
import android.widget.LinearLayout;
public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayout {
<string name="save_button" msgid="1921310454071758999">"Сохранить"</string>
<string name="label_destination" msgid="9132510997381599275">"Принтер"</string>
<string name="label_copies" msgid="3634531042822968308">"Копии"</string>
- <string name="label_paper_size" msgid="8681895607876809323">"РазмеÑ\80 бÑ\83маги"</string>
- <string name="label_color" msgid="1108690305218188969">"ЦвеÑ\82ной"</string>
+ <string name="label_paper_size" msgid="8681895607876809323">"ФоÑ\80маÑ\82"</string>
+ <string name="label_color" msgid="1108690305218188969">"Ð\9fеÑ\87аÑ\82Ñ\8c"</string>
<string name="label_orientation" msgid="2853142581990496477">"Ориентация"</string>
<string name="label_pages" msgid="6300874667546617333">"СТРАНИЦЫ (<xliff:g id="PAGE_COUNT">%1$s</xliff:g>)"</string>
<string name="pages_range_example" msgid="8558694453556945172">"напр., 1–5, 8, 11–13"</string>
<string name="printing_app_crashed" msgid="854477616686566398">"Сбой приложения печати"</string>
<string name="page_count_unknown" msgid="6058852665954511124">"Количество страниц"</string>
<string name="generating_print_job" msgid="3119608742651698916">"Создание задания печати…"</string>
- <string name="save_as_pdf" msgid="5718454119847596853">"Сохранить как PDF-файл"</string>
+ <string name="save_as_pdf" msgid="5718454119847596853">"Сохранить как PDF"</string>
<string name="all_printers" msgid="5018829726861876202">"Все принтеры"</string>
<string name="print_dialog" msgid="32628687461331979">"Диалоговое окно печати"</string>
<string name="search" msgid="5421724265322228497">"Поиск"</string>
<string name="printer_unavailable" msgid="2434170617003315690">"<xliff:g id="PRINT_JOB_NAME">%1$s</xliff:g> – недоступен"</string>
<string name="print_error_default_message" msgid="8568506918983980567">"Не удалось отправить документ на печать."</string>
<string-array name="color_mode_labels">
- <item msgid="7602948745415174937">"ЧеÑ\80но-белое"</item>
- <item msgid="2762241247228983754">"ЦвеÑ\82ное"</item>
+ <item msgid="7602948745415174937">"ЧеÑ\80но-белаÑ\8f"</item>
+ <item msgid="2762241247228983754">"ЦвеÑ\82наÑ\8f"</item>
</string-array>
<string-array name="orientation_labels">
- <item msgid="4061931020926489228">"Ð\9aнижнаÑ\8f"</item>
- <item msgid="3199660090246166812">"Альбомная"</item>
+ <item msgid="4061931020926489228">"Ð\9aнига"</item>
+ <item msgid="3199660090246166812">"Альбом"</item>
</string-array>
<string-array name="page_options_labels">
<item msgid="7421377442011699994">"Все"</item>
builder.append(',');
}
PageRange pageRange = pageRanges[i];
- builder.append(pageRange.getStart());
- builder.append('-');
- builder.append(pageRange.getEnd());
+ final int shownStartPage = pageRange.getStart() + 1;
+ final int shownEndPage = pageRange.getEnd() + 1;
+ builder.append(shownStartPage);
+ if (shownStartPage != shownEndPage) {
+ builder.append('-');
+ builder.append(shownEndPage);
+ }
}
mPageRangeEditText.setText(builder.toString());
}
import android.provider.Settings;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
-import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import com.android.internal.content.PackageHelper;
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager;
import com.android.internal.util.XmlUtils;
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nie gekoppel nie"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Geen netwerk nie"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi af"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Saai na skerm uit"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Kleur-omkeringmodus"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"አልተገናኘም"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ምንም አውታረ መረብ የለም"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi ጠፍቷል"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"ማያ ገጽ ውሰድ"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ብሩህነት"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ራስ-ሰር"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"የተቃራኒ ቀለም ሁነታ"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"ليست متصلة"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"لا تتوفر شبكة"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"إيقاف Wi-Fi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"بث الشاشة"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"السطوع"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"تلقائي"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"وضع انعكاس اللون"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Няма падключэння"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Няма сеткi"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi адключаны"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
+ <!-- no translation found for quick_settings_remote_display_no_connection_label (372107699274391290) -->
<skip />
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркасць"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АЎТА"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Няма връзка"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Няма мрежа"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi е изключен"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Екран за предаване"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркост"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТ."</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Режим на инвертиране на цветовете"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Desconnectat"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No hi ha cap xarxa"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi desconnectada"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Pantalla d\'emissió"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillantor"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÀTICA"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mode d\'inversió de color"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nepřipojeno"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Žádná síť"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi vypnuta"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Vzdálená obrazovka"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Režim převrácení barev"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Ikke forbundet"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Intet netværk"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi slået fra"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Cast-skærm"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Farveinverteringstilstand"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nicht verbunden"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Kein Netz"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"WLAN aus"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Bildschirm übertragen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helligkeit"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Farbinversionsmodus"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Μη συνδεδεμένο"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Κανένα δίκτυο"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi ανενεργό"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Μετάδοση οθόνης"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Φωτεινότητα"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ΑΥΤΟΜΑΤΗ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Λειτουργία αναστροφής χρώματος"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Not Connected"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No Network"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Off"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Cast Screen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Colour inversion mode"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Not Connected"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No Network"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Off"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Cast Screen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Colour inversion mode"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Sin conexión"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sin red"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi desactivada"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Pantalla de Cast"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modo de inversión de color"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"No conectado"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"No hay red."</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi desactivado"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Pantalla de Cast"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brillo"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modo de inversión de color"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Ühendus puudub"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Võrku pole"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"WiFi-ühendus on väljas"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Cast-ekraan"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Heledus"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAATNE"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Värvide ümberpööramise režiim"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"متصل نیست"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"شبکهای موجود نیست"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi خاموش است"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"فرستادن صفحه"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"روشنایی"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"خودکار"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"حالت وارونگی رنگ"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Ei yhteyttä"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ei verkkoa"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wifi-yhteys pois käytöstä"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Lähetysnäyttö"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kirkkaus"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Käänteinen väritila"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Non connecté"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Aucun réseau"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi désactivé"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Écran distant"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosité"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATIQUE"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mode d\'inversion des couleurs"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Non connecté"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Aucun réseau"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi désactivé"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Écran sur lequel l\'affichage est diffusé"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosité"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATIQUE"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mode d\'inversion des couleurs"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"कनेक्ट नहीं है"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"कोई नेटवर्क नहीं"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi बंद"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"स्क्रीन कास्ट करें"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"स्क्रीन की रोशनी"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"स्वत:"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"रंग व्युत्क्रम मोड"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nije povezano"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nema mreže"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi isključen"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Emitiranje zaslona"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svjetlina"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATSKI"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Način inverzije boje"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nincs kapcsolat"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nincs hálózat"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi kikapcsolva"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Képernyő tartalmának átküldése"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Fényerő"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"automatikus"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Színinvertálás mód"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Միացված չէ"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ցանց չկա"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi-ը անջատված է"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Հեռակա էկրան"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Պայծառություն"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"Ինքնաշխատ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Գունաշրջման ռեժիմ"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Tidak Tersambung"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tidak Ada Jaringan"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Mati"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Layar Transmisi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATIS"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mode inversi warna"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Non connesso"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nessuna rete"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi disattivato"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Trasmetti schermo"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminosità"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modalità inversione colori"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"לא מחובר"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"אין רשת"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi כבוי"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"העבר מסך"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"בהירות"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"אוטומטי"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"מצב היפוך צבעים"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"接続されていません"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ネットワークなし"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi OFF"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"画面のキャスト"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"画面の明るさ"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"色反転モード"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"არ არის დაკავშირებული."</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ქსელი არ არის"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi გამორთულია"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Cast Screen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"განათება"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ავტომატურად"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"ფერთა ინვერსიის რეჟიმი"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"មិនបានតភ្ជាប់"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"គ្មានបណ្ដាញ"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"បិទវ៉ាយហ្វាយ"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"ចាត់ថ្នាក់អេក្រង់"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ពន្លឺ"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ស្វ័យប្រវត្តិ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"របៀបបញ្ច្រាសពណ៌"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"연결되어 있지 않음"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"네트워크가 연결되지 않음"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi 꺼짐"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"화면 전송"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"밝기"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"자동"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"색상 반전 모드"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"ບໍ່ໄດ້ເຊື່ອມຕໍ່"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ບໍ່ມີເຄືອຂ່າຍ"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi ປິດ"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"ດຶງໜ້າຈໍ"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ຄວາມແຈ້ງ"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ອັດຕະໂນມັດ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"ໂໝດສະລັບສີ"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Neprisijungta"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tinklo nėra"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"„Wi-Fi“ išjungta"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Perduoti ekraną"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Skaistis"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATINIS"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Spalvų inversijos režimas"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nav izveidots savienojums"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nav tīkla"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi ir izslēgts"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Apraides ekrāns"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Spilgtums"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMĀTISKI"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Krāsu inversijas režīms"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Холбогдоогүй"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Сүлжээгүй"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi унтарсан"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Дамжуулах дэлгэц"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Тодрол"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТОМАТ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Өнгө урвуулах горим"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Tidak Disambungkan"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Tiada Rangkaian"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Dimatikan"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Skrin Cast"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Kecerahan"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mod penyongsangan warna"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Ikke tilkoblet"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ingen nettverk"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi er av"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Send skjermen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Lysstyrke"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modus for fargeinvertering"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Niet verbonden"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Geen netwerk"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wifi uit"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Scherm sturen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Helderheid"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATISCH"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modus voor kleurinversie"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Brak połączenia"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Brak sieci"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wyłącz Wi-Fi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Ekran Cast"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jasność"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATYCZNA"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Tryb odwrócenia kolorów"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Não Ligado"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sem Rede"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Desligado"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Transmitir ecrã"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modo de inversão de cor"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Não conectado"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Sem rede"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi desligado"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Transmitir tela"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brilho"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Modo de inversão de cores"</string>
<skip />
<!-- no translation found for quick_settings_wifi_off_label (7558778100843885864) -->
<skip />
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
+ <!-- no translation found for quick_settings_remote_display_no_connection_label (372107699274391290) -->
<skip />
<!-- no translation found for quick_settings_brightness_dialog_title (8599674057673605368) -->
<skip />
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Neconectat"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Nicio reţea"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi deconectat"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Ecran de afișare a transmisiunii"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Luminozitate"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAT"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mod de inversare a culorilor"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Нет соединения"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Нет сети"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi выкл."</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Wi-Fi-монитор"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яркость"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТОНАСТРОЙКА"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Инверсия цвета"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Nepripojené"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Žiadna sieť"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Sieť Wi-Fi je vypnutá"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Vzdialená obrazovka"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Jas"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Režim prevrátenia farieb"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Povezava ni vzpostavljena"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ni omrežja"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi izklopljen"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Zaslon za predvajanje"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Svetlost"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"SAMODEJNO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Način inverzije barv"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Веза није успостављена"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Нема мреже"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi је искључен"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Пребаци екран"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Осветљеност"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АУТОМАТСКА"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Режим инверзије боје"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Ej ansluten"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Inget nätverk"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi av"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Överför skärmen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ljusstyrka"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Färginverteringsläge"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Haijaunganishwa"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Hakuna Mtandao"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi Imezimwa"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Utumaji wa Skrini"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ung\'avu"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"KIOTOMATIKI"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Hali ya ugeuzaji kinyume wa rangi"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"ไม่ได้เชื่อมต่อ"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"ไม่มีเครือข่าย"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"ปิด WiFi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"ส่งหน้าจอ"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"ความสว่าง"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"อัตโนมัติ"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"โหมดการกลับสี"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Hindi Nakakonekta"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Walang Network"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Naka-off ang Wi-Fi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"I-cast ang Screen"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Brightness"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Mode ng pag-invert ng kulay"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Bağlı Değil"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ağ yok"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Kablosuz Kapalı"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Yayınlama Ekranı"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Parlaklık"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATİK"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Renk ters çevirme modu"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Не під’єднано."</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Немає мережі"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi вимкнено"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Транслювати екран"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Яскравість"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТО"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Режим інверсії кольорів"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Chưa được kết nối"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Không có mạng nào"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Tắt Wi-Fi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Truyền màn hình"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Độ sáng"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"TỰ ĐỘNG"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Chế độ đảo ngược màu sắc"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"未连接"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"无网络"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"WLAN 已关闭"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"投射屏幕"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自动"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"颜色反转模式"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"未連線"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"沒有網絡"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"Wi-Fi 關閉"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"放送螢幕"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"色彩反轉模式"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"未連線"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"沒有網路"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"關閉 Wi-Fi"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"投放螢幕"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"亮度"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"彩色反轉模式"</string>
<string name="quick_settings_wifi_not_connected" msgid="7171904845345573431">"Akuxhunyiwe"</string>
<string name="quick_settings_wifi_no_network" msgid="2221993077220856376">"Ayikho inethiwekhi"</string>
<string name="quick_settings_wifi_off_label" msgid="7558778100843885864">"I-Wi-Fi icimile"</string>
- <!-- no translation found for quick_settings_remote_display_no_connection_label (3319785626703585888) -->
- <skip />
+ <string name="quick_settings_remote_display_no_connection_label" msgid="372107699274391290">"Isikrini sabalingisi"</string>
<string name="quick_settings_brightness_dialog_title" msgid="8599674057673605368">"Ukugqama"</string>
<string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OKUZENZAKALELAYO"</string>
<string name="quick_settings_inversion_label" msgid="1666358784283020762">"Imodi yokuguqulwa kombala"</string>
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
-import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.os.BatteryManager;
package com.android.systemui;
-import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.ComponentName;
import android.content.pm.PackageManager;
-import android.os.Handler;
import android.util.Slog;
-import android.view.animation.DecelerateInterpolator;
public class DessertCase extends Activity {
DessertCaseView mView;
import android.content.Intent;
import android.content.pm.ResolveInfo;
-import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
public final class TaskDescription {
}
private void updateAnim() {
- Drawable drawable = mAttached ? getDrawable() : null;
+ Drawable drawable = getDrawable();
if (mAttached && mAnim != null) {
mAnim.stop();
}
import android.view.View;
import android.widget.ImageView;
-import com.android.systemui.R;
-
import java.util.ArrayList;
import java.util.Comparator;
import android.util.Slog;
import android.view.MotionEvent;
-import com.android.internal.policy.IKeyguardExitCallback;
-import com.android.internal.policy.IKeyguardShowCallback;
import com.android.internal.policy.IKeyguardService;
import android.media.MediaRouter;
import android.media.MediaRouter.RouteInfo;
import android.net.ConnectivityManager;
-import android.net.Uri;
import android.os.Handler;
import android.os.UserHandle;
import android.provider.Settings;
} else {
connectedRoute = null;
connecting = false;
- final int count = mMediaRouter.getRouteCount();
- for (int i = 0; i < count; i++) {
- MediaRouter.RouteInfo route = mMediaRouter.getRouteAt(i);
- if (route.matchesTypes(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY)) {
- enabled = true;
- break;
- }
- }
+ enabled = mMediaRouter.isRouteAvailable(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY,
+ MediaRouter.AVAILABILITY_FLAG_IGNORE_DEFAULT_ROUTE);
}
mRemoteDisplayState.enabled = enabled;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewParent;
import android.widget.TextView;
import com.android.systemui.R;
package com.android.systemui.statusbar.policy;
-import android.app.Notification;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.FrameLayout;
-import android.widget.LinearLayout;
import com.android.systemui.ExpandHelper;
import com.android.systemui.R;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.database.ContentObserver;
import android.location.LocationManager;
import android.os.Handler;
import android.os.UserHandle;
import com.android.systemui.R;
import com.android.systemui.SwipeHelper;
import com.android.systemui.statusbar.ExpandableNotificationRow;
-import com.android.systemui.statusbar.NotificationData;
import java.util.HashMap;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.net.IConnectivityManager;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.net.IConnectivityManager;
import android.os.SystemClock;
import android.util.Log;
import android.view.View;
-import android.widget.Button;
-import android.widget.CompoundButton;
-import android.widget.ImageView;
import android.widget.TextView;
import com.android.internal.app.AlertActivity;
import android.util.Log;
-import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import android.graphics.Rect;
import android.graphics.RectF;
-import javax.microedition.khronos.opengles.GL11;
-
//
// GLCanvas gives a convenient interface to draw using OpenGL.
//
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Canvas;
-import android.graphics.Matrix;
import android.graphics.Paint;
-import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
*/
package com.android.proxyhandler;
-import android.net.ProxyProperties;
import android.os.RemoteException;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import android.app.Service;
import android.content.Intent;
-import android.net.Proxy;
-import android.net.ProxyProperties;
-import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
-import android.text.TextUtils;
import com.android.net.IProxyCallback;
import com.android.net.IProxyPortListener;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
-import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.PaintFlagsDrawFilter;
-import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
import android.graphics.Rect;
-import android.graphics.RectF;
import android.graphics.TableMaskFilter;
-import android.graphics.Typeface;
-import android.text.Layout.Alignment;
-import android.text.StaticLayout;
-import android.text.TextPaint;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.util.TypedValue;
-import android.view.ContextThemeWrapper;
import android.content.res.Resources;
import android.content.Context;
package com.android.internal.policy.impl;
-import java.util.Map;
-
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import static android.view.WindowManager.LayoutParams.*;
import android.transition.Scene;
-import android.transition.Transition;
import android.transition.TransitionInflater;
import android.transition.TransitionManager;
import android.view.ViewConfiguration;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Debug;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
-import android.util.Slog;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.ActionMode;
}
@Override
+ @Deprecated
public void setTitleColor(int textColor) {
if (mTitleView != null) {
mTitleView.setTextColor(textColor);
/** If true, hitting shift & menu will broadcast Intent.ACTION_BUG_REPORT */
boolean mEnableShiftMenuBugReports = false;
- boolean mHeadless;
boolean mSafeMode;
WindowState mStatusBar = null;
int mStatusBarHeight;
mContext = context;
mWindowManager = windowManager;
mWindowManagerFuncs = windowManagerFuncs;
- mHeadless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
mHandler = new PolicyHandler();
mOrientationListener = new MyOrientationListener(mContext, mHandler);
try {
/** {@inheritDoc} */
public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) {
- // do nothing if headless
- if (mHeadless) return;
-
// lid changed state
final int newLidState = lidOpen ? LID_OPEN : LID_CLOSED;
if (newLidState == mLidState) {
// the device some other way (which is why we have an exemption here for injected
// events).
int result;
- if ((isScreenOn && !mHeadless) || (isInjected && !isWakeKey)) {
+ if (isScreenOn || (isInjected && !isWakeKey)) {
// When the screen is on or if the key is injected pass the key to the application.
result = ACTION_PASS_TO_USER;
} else {
/** {@inheritDoc} */
@Override
public void systemReady() {
- if (!mHeadless) {
- mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null);
- mKeyguardDelegate.onSystemReady();
- }
+ mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null);
+ mKeyguardDelegate.onSystemReady();
+
synchronized (mLock) {
updateOrientationListenerLp();
mSystemReady = true;
/** {@inheritDoc} */
public void showBootMessage(final CharSequence msg, final boolean always) {
- if (mHeadless) return;
mHandler.post(new Runnable() {
@Override public void run() {
if (mBootMsgDialog == null) {
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
import android.util.Log;
import android.util.SparseArray;
import android.view.KeyCharacterMap;
-import android.view.KeyEvent;
import java.net.URISyntaxException;
import android.os.UserHandle;
import android.util.Log;
import android.util.Slog;
-import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import java.util.ArrayList;
-import android.util.Log;
-
/**
* An XML element. Provides access to child elements and hooks to listen
* for events related to this element.
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.net.InetAddress;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
-import android.net.IConnectivityManager;
import android.net.INetworkManagementEventObserver;
import android.net.InterfaceConfiguration;
-import android.net.NetworkInfo;
import android.os.Binder;
import android.os.CommonTimeConfig;
import android.os.Handler;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.URL;
-import java.net.URLConnection;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
synchronized (mProxyLock) {
if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return;
if (mDefaultProxy == proxy) return; // catches repeated nulls
- if (!proxy.isValid()) {
+ if (proxy != null && !proxy.isValid()) {
if (DBG) log("Invalid proxy properties, ignoring: " + proxy.toString());
return;
}
package com.android.server;
-import android.content.BroadcastReceiver;
import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
import android.content.pm.PackageManager;
-import android.database.ContentObserver;
-import android.hardware.input.InputManager;
import android.hardware.IConsumerIrService;
-import android.os.Handler;
import android.os.PowerManager;
-import android.os.Process;
-import android.os.RemoteException;
-import android.os.IBinder;
-import android.os.Binder;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-import android.os.UserHandle;
-import android.os.WorkSource;
-import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
import android.util.Slog;
-import android.view.InputDevice;
import java.lang.RuntimeException;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.ListIterator;
public class ConsumerIrService extends IConsumerIrService.Stub {
private static final String TAG = "ConsumerIrService";
import android.content.Context;
import android.os.Binder;
import android.os.Environment;
-import android.os.FileUtils;
import android.os.StatFs;
import android.os.SystemClock;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.OutputStream;
import java.io.PrintWriter;
import android.content.BroadcastReceiver;
package com.android.server;
-import android.app.ActivityManagerNative;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
-import android.media.AudioManager;
-import android.media.AudioService;
import android.os.Binder;
import android.os.Environment;
import android.os.RemoteException;
public static final int BandwidthControl = 601;
public static final int InterfaceClassActivity = 613;
public static final int InterfaceAddressChange = 614;
+ public static final int InterfaceDnsServerInfo = 615;
}
/**
mObservers.finishBroadcast();
}
+ /**
+ * Notify our observers of DNS server information received.
+ */
+ private void notifyInterfaceDnsServerInfo(String iface, long lifetime, String[] addresses) {
+ final int length = mObservers.beginBroadcast();
+ for (int i = 0; i < length; i++) {
+ try {
+ mObservers.getBroadcastItem(i).interfaceDnsServerInfo(iface, lifetime, addresses);
+ } catch (RemoteException e) {
+ } catch (RuntimeException e) {
+ }
+ }
+ mObservers.finishBroadcast();
+ }
+
//
// Netd Callback handling
//
}
return true;
// break;
+ case NetdResponseCode.InterfaceDnsServerInfo:
+ /*
+ * Information about available DNS servers has been received.
+ * Format: "NNN DnsInfo servers <interface> <lifetime> <servers>"
+ */
+ long lifetime; // Actually a 32-bit unsigned integer.
+
+ if (cooked.length == 6 &&
+ cooked[1].equals("DnsInfo") &&
+ cooked[2].equals("servers")) {
+ try {
+ lifetime = Long.parseLong(cooked[4]);
+ } catch (NumberFormatException e) {
+ throw new IllegalStateException(errorMessage);
+ }
+ String[] servers = cooked[5].split(",");
+ notifyInterfaceDnsServerInfo(cooked[3], lifetime, servers);
+ }
+ return true;
+ // break;
default: break;
}
return false;
import android.net.nsd.INsdManager;
import android.net.nsd.NsdManager;
import android.os.Binder;
-import android.os.Handler;
-import android.os.HandlerThread;
import android.os.Message;
import android.os.Messenger;
-import android.os.IBinder;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Slog;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.net.InetAddress;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.concurrent.CountDownLatch;
-import com.android.internal.app.IBatteryStats;
-import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
-import com.android.server.am.BatteryStatsService;
-import com.android.server.NativeDaemonConnector.Command;
-import com.android.internal.R;
/**
* Network Service Discovery Service handles remote service discovery operation requests by
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.os.Handler;
import android.os.IPowerManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Slog;
-import com.android.server.power.ShutdownThread;
-
public class ShutdownActivity extends Activity {
private static final String TAG = "ShutdownActivity";
String factoryTestStr = SystemProperties.get("ro.factorytest");
int factoryTest = "".equals(factoryTestStr) ? SystemServer.FACTORY_TEST_OFF
: Integer.parseInt(factoryTestStr);
- final boolean headless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
Installer installer = null;
AccountManagerService accountManager = null;
R.bool.config_enableWallpaperService)) {
try {
Slog.i(TAG, "Wallpaper Service");
- if (!headless) {
- wallpaper = new WallpaperManagerService(context);
- ServiceManager.addService(Context.WALLPAPER_SERVICE, wallpaper);
- }
+ wallpaper = new WallpaperManagerService(context);
+ ServiceManager.addService(Context.WALLPAPER_SERVICE, wallpaper);
} catch (Throwable e) {
reportWtf("starting Wallpaper Service", e);
}
} catch (Throwable e) {
reportWtf("observing native crashes", e);
}
- if (!headless) {
+ try {
startSystemUi(contextF);
+ } catch (Throwable e) {
+ reportWtf("starting System UI", e);
}
try {
if (mountServiceF != null) mountServiceF.systemReady();
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
-import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.os.IBinder;
import android.os.IUpdateLock;
import android.os.RemoteException;
-import android.os.SystemClock;
import android.os.TokenWatcher;
import android.os.UpdateLock;
import android.os.UserHandle;
import com.android.server.am.ActivityManagerService;
import com.android.server.power.PowerManagerService;
-import android.app.AlarmManager;
-import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.os.BatteryManager;
import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Calendar;
/** This class calls its monitor every minute. Killing this process if they don't return **/
public class Watchdog extends Thread {
}
}
if (finishing) {
- if (r.app != null) {
+ if (r.app != null && !r.app.persistent) {
r.app.services.remove(r);
}
r.app = null;
Slog.i(TAG, " Force stopping service " + service);
if (service.app != null) {
service.app.removed = true;
- service.app.services.remove(service);
+ if (!service.app.persistent) {
+ service.app.services.remove(service);
+ }
}
service.app = null;
service.isolatedProc = null;
synchronized (sr.stats.getBatteryStats()) {
sr.stats.stopLaunchedLocked();
}
- if (sr.app != null) {
+ if (sr.app != null && !sr.app.persistent) {
sr.app.services.remove(sr);
}
sr.app = null;
public IntentFirewall mIntentFirewall;
- private final boolean mHeadless;
-
// Whether we should show our dialogs (ANR, crash, etc) or just perform their
// default actuion automatically. Important for devices without direct input
// devices.
mGrantFile = new AtomicFile(new File(systemDir, "urigrants.xml"));
- mHeadless = "1".equals(SystemProperties.get("ro.config.headless", "0"));
-
// User 0 is the first and only user that runs at boot.
mStartedUsers.put(0, new UserStartedState(new UserHandle(0), true));
mUserLru.add(Integer.valueOf(0));
totalUTime += otherUTime;
totalSTime += otherSTime;
if (pr != null) {
- BatteryStatsImpl.Uid.Proc ps = pr.batteryStats;
+ BatteryStatsImpl.Uid.Proc ps = bstats.getProcessStatsLocked(
+ st.name, st.pid);
ps.addCpuTimeLocked(st.rel_utime-otherUTime,
st.rel_stime-otherSTime);
ps.addSpeedStepTimes(cpuSpeedTimes);
app.processName, uid, uid, gids, debugFlags, mountExternal,
app.info.targetSdkVersion, app.info.seinfo, null);
- BatteryStatsImpl bs = app.batteryStats.getBatteryStats();
+ BatteryStatsImpl bs = mBatteryStatsService.getActiveStatistics();
synchronized (bs) {
if (bs.isOnBattery()) {
- app.batteryStats.incStartsLocked();
+ bs.getProcessStatsLocked(app.uid, app.processName).incStartsLocked();
}
}
}
boolean startHomeActivityLocked(int userId) {
- if (mHeadless) {
- // Added because none of the other calls to ensureBootCompleted seem to fire
- // when running headless.
- ensureBootCompleted();
- return false;
- }
-
if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL
&& mTopAction == null) {
// We are running in factory test mode, but unable to find
// See if the top visible activity is waiting to run in this process...
if (normalMode) {
try {
- if (mStackSupervisor.attachApplicationLocked(app, mHeadless)) {
+ if (mStackSupervisor.attachApplicationLocked(app)) {
didSomething = true;
}
} catch (Exception e) {
}
}
}
- synchronized (stats) {
- ps = stats.getProcessStatsLocked(info.uid, proc);
- }
- return new ProcessRecord(ps, info, proc, uid);
+ return new ProcessRecord(stats, info, proc, uid);
}
final ProcessRecord addAppLocked(ApplicationInfo info, boolean isolated) {
private boolean handleAppCrashLocked(ProcessRecord app, String shortMsg, String longMsg,
String stackTrace) {
- if (mHeadless) {
- Log.e(TAG, "handleAppCrashLocked: " + app.processName);
- return false;
- }
long now = SystemClock.uptimeMillis();
Long crashTime;
*/
boolean updateConfigurationLocked(Configuration values,
ActivityRecord starting, boolean persistent, boolean initLocale) {
- // do nothing if we are headless
- if (mHeadless) return true;
-
int changes = 0;
if (values != null) {
import android.app.ResultInfo;
import android.content.Intent;
-import android.os.Bundle;
/**
* Pending result information to send back to an activity.
return resumedActivity;
}
- boolean attachApplicationLocked(ProcessRecord app, boolean headless) throws Exception {
+ boolean attachApplicationLocked(ProcessRecord app) throws Exception {
boolean didSomething = false;
final String processName = app.processName;
for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
if (hr.app == null && app.uid == hr.info.applicationInfo.uid
&& processName.equals(hr.processName)) {
try {
- if (headless) {
- Slog.e(TAG, "Starting activities not supported on headless device: "
- + hr);
- } else if (realStartActivityLocked(hr, app, true, true)) {
+ if (realStartActivityLocked(hr, app, true, true)) {
didSomething = true;
}
} catch (Exception e) {
import android.content.IIntentReceiver;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
final class ContentProviderRecord {
final ActivityManagerService service;
import android.util.ArrayMap;
import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.Iterator;
/**
* A particular Intent that has been bound to a Service.
package com.android.server.am;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
* is currently running.
*/
final class ProcessRecord {
- final BatteryStatsImpl.Uid.Proc batteryStats; // where to collect runtime statistics
+ private final BatteryStatsImpl mBatteryStats; // where to collect runtime statistics
final ApplicationInfo info; // all about the first app in the process
final boolean isolated; // true if this is a special isolated process
final int uid; // uid of process; may be different from 'info' if isolated
}
if (!keeping) {
long wtime;
- synchronized (batteryStats.getBatteryStats()) {
- wtime = batteryStats.getBatteryStats().getProcessWakeTime(info.uid,
+ synchronized (mBatteryStats) {
+ wtime = mBatteryStats.getProcessWakeTime(info.uid,
pid, SystemClock.elapsedRealtime());
}
long timeUsed = wtime - lastWakeTime;
}
}
- ProcessRecord(BatteryStatsImpl.Uid.Proc _batteryStats, ApplicationInfo _info,
+ ProcessRecord(BatteryStatsImpl _batteryStats, ApplicationInfo _info,
String _processName, int _uid) {
- batteryStats = _batteryStats;
+ mBatteryStats = _batteryStats;
info = _info;
isolated = _info.uid != _uid;
uid = _uid;
package com.android.server.am;
-import android.app.AppGlobals;
-import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.Parcel;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
-import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.AtomicFile;
import android.util.Slog;
package com.android.server.am;
import android.content.IIntentReceiver;
-import android.content.Intent;
import android.os.Binder;
-import android.os.Bundle;
import android.os.IBinder;
-import android.os.RemoteException;
import android.util.PrintWriterPrinter;
import android.util.Printer;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.IPackageManager;
-import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.IBinder;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
-import android.os.HandlerThread;
import android.os.IBinder;
-import android.os.Looper;
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
import android.util.AtomicFile;
import android.util.AttributeSet;
-import android.util.Log;
import android.util.Pair;
import android.util.Slog;
import android.util.TypedValue;
import com.android.internal.backup.BackupConstants;
import com.android.internal.backup.IBackupTransport;
import com.android.internal.backup.IObbBackupService;
-import com.android.internal.backup.LocalTransport;
import com.android.server.EventLogTags;
import com.android.server.backup.PackageManagerBackupAgent.Metadata;
// the first backup pass.
private static final long FIRST_BACKUP_INTERVAL = 12 * AlarmManager.INTERVAL_HOUR;
+ // Retry interval for clear/init when the transport is unavailable
+ private static final long TRANSPORT_RETRY_INTERVAL = 1 * AlarmManager.INTERVAL_HOUR;
+
private static final String RUN_BACKUP_ACTION = "android.app.backup.intent.RUN";
private static final String RUN_INITIALIZE_ACTION = "android.app.backup.intent.INIT";
private static final String RUN_CLEAR_ACTION = "android.app.backup.intent.CLEAR";
private static final int MSG_RESTORE_TIMEOUT = 8;
private static final int MSG_FULL_CONFIRMATION_TIMEOUT = 9;
private static final int MSG_RUN_FULL_RESTORE = 10;
+ private static final int MSG_RETRY_INIT = 11;
+ private static final int MSG_RETRY_CLEAR = 12;
// backup task state machine tick
static final int MSG_BACKUP_RESTORE_STEP = 20;
class RestoreParams {
public IBackupTransport transport;
+ public String dirName;
public IRestoreObserver observer;
public long token;
public PackageInfo pkgInfo;
public boolean needFullBackup;
public String[] filterSet;
- RestoreParams(IBackupTransport _transport, IRestoreObserver _obs,
+ RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
long _token, PackageInfo _pkg, int _pmToken, boolean _needFullBackup) {
transport = _transport;
+ dirName = _dirName;
observer = _obs;
token = _token;
pkgInfo = _pkg;
filterSet = null;
}
- RestoreParams(IBackupTransport _transport, IRestoreObserver _obs, long _token,
- boolean _needFullBackup) {
+ RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
+ long _token, boolean _needFullBackup) {
transport = _transport;
+ dirName = _dirName;
observer = _obs;
token = _token;
pkgInfo = null;
filterSet = null;
}
- RestoreParams(IBackupTransport _transport, IRestoreObserver _obs, long _token,
- String[] _filterSet, boolean _needFullBackup) {
+ RestoreParams(IBackupTransport _transport, String _dirName, IRestoreObserver _obs,
+ long _token, String[] _filterSet, boolean _needFullBackup) {
transport = _transport;
+ dirName = _dirName;
observer = _obs;
token = _token;
pkgInfo = null;
}
}
+ class ClearRetryParams {
+ public String transportName;
+ public String packageName;
+
+ ClearRetryParams(String transport, String pkg) {
+ transportName = transport;
+ packageName = pkg;
+ }
+ }
+
class FullParams {
public ParcelFileDescriptor fd;
public final AtomicBoolean latch;
// When it completes successfully, that old journal file will be
// deleted. If we crash prior to that, the old journal is parsed
// at next boot and the journaled requests fulfilled.
+ boolean staged = true;
if (queue.size() > 0) {
// Spin up a backup state sequence and set it running
- PerformBackupTask pbt = new PerformBackupTask(transport, queue, oldJournal);
- Message pbtMessage = obtainMessage(MSG_BACKUP_RESTORE_STEP, pbt);
- sendMessage(pbtMessage);
+ try {
+ String dirName = transport.transportDirName();
+ PerformBackupTask pbt = new PerformBackupTask(transport, dirName,
+ queue, oldJournal);
+ Message pbtMessage = obtainMessage(MSG_BACKUP_RESTORE_STEP, pbt);
+ sendMessage(pbtMessage);
+ } catch (RemoteException e) {
+ // unable to ask the transport its dir name -- transient failure, since
+ // the above check succeeded. Try again next time.
+ Slog.e(TAG, "Transport became unavailable attempting backup");
+ staged = false;
+ }
} else {
Slog.v(TAG, "Backup requested but nothing pending");
+ staged = false;
+ }
+
+ if (!staged) {
+ // if we didn't actually hand off the wakelock, rewind until next time
synchronized (mQueueLock) {
mBackupRunning = false;
}
RestoreParams params = (RestoreParams)msg.obj;
Slog.d(TAG, "MSG_RUN_RESTORE observer=" + params.observer);
PerformRestoreTask task = new PerformRestoreTask(
- params.transport, params.observer,
+ params.transport, params.dirName, params.observer,
params.token, params.pkgInfo, params.pmToken,
params.needFullBackup, params.filterSet);
Message restoreMsg = obtainMessage(MSG_BACKUP_RESTORE_STEP, task);
break;
}
+ case MSG_RETRY_CLEAR:
+ {
+ // reenqueues if the transport remains unavailable
+ ClearRetryParams params = (ClearRetryParams)msg.obj;
+ clearBackupData(params.transportName, params.packageName);
+ break;
+ }
+
case MSG_RUN_INITIALIZE:
{
HashSet<String> queue;
break;
}
+ case MSG_RETRY_INIT:
+ {
+ synchronized (mQueueLock) {
+ recordInitPendingLocked(msg.arg1 != 0, (String)msg.obj);
+ mAlarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(),
+ mRunInitIntent);
+ }
+ break;
+ }
+
case MSG_RUN_GET_RESTORE_SETS:
{
// Like other async operations, this is entered with the wakelock held
void recordInitPendingLocked(boolean isPending, String transportName) {
if (DEBUG) Slog.i(TAG, "recordInitPendingLocked: " + isPending
+ " on transport " + transportName);
+ mBackupHandler.removeMessages(MSG_RETRY_INIT);
+
try {
IBackupTransport transport = getTransport(transportName);
- String transportDirName = transport.transportDirName();
- File stateDir = new File(mBaseStateDir, transportDirName);
- File initPendingFile = new File(stateDir, INIT_SENTINEL_FILE_NAME);
-
- if (isPending) {
- // We need an init before we can proceed with sending backup data.
- // Record that with an entry in our set of pending inits, as well as
- // journaling it via creation of a sentinel file.
- mPendingInits.add(transportName);
- try {
- (new FileOutputStream(initPendingFile)).close();
- } catch (IOException ioe) {
- // Something is badly wrong with our permissions; just try to move on
+ if (transport != null) {
+ String transportDirName = transport.transportDirName();
+ File stateDir = new File(mBaseStateDir, transportDirName);
+ File initPendingFile = new File(stateDir, INIT_SENTINEL_FILE_NAME);
+
+ if (isPending) {
+ // We need an init before we can proceed with sending backup data.
+ // Record that with an entry in our set of pending inits, as well as
+ // journaling it via creation of a sentinel file.
+ mPendingInits.add(transportName);
+ try {
+ (new FileOutputStream(initPendingFile)).close();
+ } catch (IOException ioe) {
+ // Something is badly wrong with our permissions; just try to move on
+ }
+ } else {
+ // No more initialization needed; wipe the journal and reset our state.
+ initPendingFile.delete();
+ mPendingInits.remove(transportName);
}
- } else {
- // No more initialization needed; wipe the journal and reset our state.
- initPendingFile.delete();
- mPendingInits.remove(transportName);
+ return; // done; don't fall through to the error case
}
} catch (RemoteException e) {
- // can't happen; the transport is local
+ // transport threw when asked its name; fall through to the lookup-failed case
+ }
+
+ // The named transport doesn't exist or threw. This operation is
+ // important, so we record the need for a an init and post a message
+ // to retry the init later.
+ if (isPending) {
+ mPendingInits.add(transportName);
+ mBackupHandler.sendMessageDelayed(
+ mBackupHandler.obtainMessage(MSG_RETRY_INIT,
+ (isPending ? 1 : 0),
+ 0,
+ transportName),
+ TRANSPORT_RETRY_INTERVAL);
}
}
}
}
} catch (RemoteException e) {
- // can't happen, the transport is local
+ // the transport threw when asked its file naming prefs; declare it invalid
+ Slog.e(TAG, "Unable to register transport as " + name);
+ mTransportNames.remove(component);
+ mTransports.remove(name);
}
}
agent = mConnectedAgent;
}
} catch (RemoteException e) {
- // can't happen
+ // can't happen - ActivityManager is local
}
}
return agent;
int mStatus;
boolean mFinished;
- public PerformBackupTask(IBackupTransport transport, ArrayList<BackupRequest> queue,
- File journal) {
+ public PerformBackupTask(IBackupTransport transport, String dirName,
+ ArrayList<BackupRequest> queue, File journal) {
mTransport = transport;
mOriginalQueue = queue;
mJournal = journal;
- try {
- mStateDir = new File(mBaseStateDir, transport.transportDirName());
- } catch (RemoteException e) {
- // can't happen; the transport is local
- }
+ mStateDir = new File(mBaseStateDir, dirName);
mCurrentState = BackupState.INITIAL;
mFinished = false;
addBackupTrace("success; recording token");
try {
mCurrentToken = mTransport.getCurrentRestoreSet();
- } catch (RemoteException e) {} // can't happen
- writeRestoreTokens();
+ writeRestoreTokens();
+ } catch (RemoteException e) {
+ // nothing for it at this point, unfortunately, but this will be
+ // recorded the next time we fully succeed.
+ addBackupTrace("transport threw returning token");
+ }
}
// Set up the next backup pass - at this point we can set mBackupRunning
addBackupTrace("unbinding " + mCurrentPackage.packageName);
try { // unbind even on timeout, just in case
mActivityManager.unbindBackupAgent(mCurrentPackage.applicationInfo);
- } catch (RemoteException e) {}
+ } catch (RemoteException e) { /* can't happen; activity manager is local */ }
}
}
}
}
- PerformRestoreTask(IBackupTransport transport, IRestoreObserver observer,
+ PerformRestoreTask(IBackupTransport transport, String dirName, IRestoreObserver observer,
long restoreSetToken, PackageInfo targetPackage, int pmToken,
boolean needFullBackup, String[] filterSet) {
mCurrentState = RestoreState.INITIAL;
mFilterSet = null;
}
- try {
- mStateDir = new File(mBaseStateDir, transport.transportDirName());
- } catch (RemoteException e) {
- // can't happen; the transport is local
- }
+ mStateDir = new File(mBaseStateDir, dirName);
}
// Execute one tick of whatever state machine the task implements
}
// Clear the given package's backup data from the current transport
- public void clearBackupData(String packageName) {
- if (DEBUG) Slog.v(TAG, "clearBackupData() of " + packageName);
+ public void clearBackupData(String transportName, String packageName) {
+ if (DEBUG) Slog.v(TAG, "clearBackupData() of " + packageName + " on " + transportName);
PackageInfo info;
try {
info = mPackageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES);
// Is the given app an available participant?
if (apps.contains(packageName)) {
- if (DEBUG) Slog.v(TAG, "Found the app - running clear process");
// found it; fire off the clear request
+ if (DEBUG) Slog.v(TAG, "Found the app - running clear process");
+ mBackupHandler.removeMessages(MSG_RETRY_CLEAR);
synchronized (mQueueLock) {
+ final IBackupTransport transport = getTransport(transportName);
+ if (transport == null) {
+ // transport is currently unavailable -- make sure to retry
+ Message msg = mBackupHandler.obtainMessage(MSG_RETRY_CLEAR,
+ new ClearRetryParams(transportName, packageName));
+ mBackupHandler.sendMessageDelayed(msg, TRANSPORT_RETRY_INTERVAL);
+ return;
+ }
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
- new ClearParams(getTransport(mCurrentTransport), info));
+ new ClearParams(transport, info));
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
}
+ " restoreSet=" + Long.toHexString(restoreSet));
if (mAutoRestore && mProvisioned && restoreSet != 0) {
- // okay, we're going to attempt a restore of this package from this restore set.
- // The eventual message back into the Package Manager to run the post-install
- // steps for 'token' will be issued from the restore handling code.
+ // Do we have a transport to fetch data for us?
+ IBackupTransport transport = getTransport(mCurrentTransport);
+ if (transport == null) {
+ if (DEBUG) Slog.w(TAG, "No transport for install-time restore");
+ return;
+ }
- // We can use a synthetic PackageInfo here because:
- // 1. We know it's valid, since the Package Manager supplied the name
- // 2. Only the packageName field will be used by the restore code
- PackageInfo pkg = new PackageInfo();
- pkg.packageName = packageName;
+ try {
+ // okay, we're going to attempt a restore of this package from this restore set.
+ // The eventual message back into the Package Manager to run the post-install
+ // steps for 'token' will be issued from the restore handling code.
- mWakelock.acquire();
- Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
- msg.obj = new RestoreParams(getTransport(mCurrentTransport), null,
- restoreSet, pkg, token, true);
- mBackupHandler.sendMessage(msg);
+ // This can throw and so *must* happen before the wakelock is acquired
+ String dirName = transport.transportDirName();
+
+ // We can use a synthetic PackageInfo here because:
+ // 1. We know it's valid, since the Package Manager supplied the name
+ // 2. Only the packageName field will be used by the restore code
+ PackageInfo pkg = new PackageInfo();
+ pkg.packageName = packageName;
+
+ mWakelock.acquire();
+ Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
+ msg.obj = new RestoreParams(transport, dirName, null,
+ restoreSet, pkg, token, true);
+ mBackupHandler.sendMessage(msg);
+ } catch (RemoteException e) {
+ // Binding to the transport broke; back off and proceed with the installation.
+ Slog.e(TAG, "Unable to contact transport for install-time restore");
+ }
} else {
// Auto-restore disabled or no way to attempt a restore; just tell the Package
// Manager to proceed with the post-install handling for this package.
return -1;
}
+ String dirName;
+ try {
+ dirName = mRestoreTransport.transportDirName();
+ } catch (RemoteException e) {
+ // Transport went AWOL; fail.
+ Slog.e(TAG, "Unable to contact transport for restore");
+ return -1;
+ }
+
synchronized (mQueueLock) {
for (int i = 0; i < mRestoreSets.length; i++) {
if (token == mRestoreSets[i].token) {
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
- msg.obj = new RestoreParams(mRestoreTransport, observer, token, true);
+ msg.obj = new RestoreParams(mRestoreTransport, dirName,
+ observer, token, true);
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
return 0;
return -1;
}
+ String dirName;
+ try {
+ dirName = mRestoreTransport.transportDirName();
+ } catch (RemoteException e) {
+ // Transport went AWOL; fail.
+ Slog.e(TAG, "Unable to contact transport for restore");
+ return -1;
+ }
+
synchronized (mQueueLock) {
for (int i = 0; i < mRestoreSets.length; i++) {
if (token == mRestoreSets[i].token) {
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
- msg.obj = new RestoreParams(mRestoreTransport, observer, token,
+ msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, token,
packages, true);
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
return -1;
}
+ String dirName;
+ try {
+ dirName = mRestoreTransport.transportDirName();
+ } catch (RemoteException e) {
+ // Transport went AWOL; fail.
+ Slog.e(TAG, "Unable to contact transport for restore");
+ return -1;
+ }
+
// Ready to go: enqueue the restore request and claim success
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_RESTORE);
- msg.obj = new RestoreParams(mRestoreTransport, observer, token, app, 0, false);
+ msg.obj = new RestoreParams(mRestoreTransport, dirName,
+ observer, token, app, 0, false);
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
return 0;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.UserHandle;
-import android.util.Pair;
import android.util.Slog;
import android.util.SparseArray;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
-import android.net.Proxy;
import android.net.ProxyProperties;
-import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.SystemProperties;
-import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.hardware.usb.UsbManager;
import android.net.ConnectivityManager;
import android.net.IConnectivityManager;
-import android.net.INetworkManagementEventObserver;
import android.net.INetworkStatsService;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
import com.android.internal.util.StateMachine;
import com.android.server.IoThread;
import com.android.server.net.BaseNetworkObserver;
-import com.google.android.collect.Lists;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.security.KeyStore;
import android.util.Log;
import android.util.SparseBooleanArray;
-import android.widget.Toast;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.R;
import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnConfig;
import com.android.internal.net.VpnProfile;
-import com.android.internal.util.Preconditions;
import com.android.server.ConnectivityService.VpnCallback;
import com.android.server.net.BaseNetworkObserver;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Inet4Address;
-import java.net.InetAddress;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
-import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import libcore.io.IoUtils;
import android.content.ISyncStatusObserver;
import android.content.PeriodicSync;
import android.content.pm.PackageManager;
-import android.content.pm.ServiceInfo;
import android.content.SyncAdapterType;
import android.content.SyncInfo;
import android.content.SyncRequest;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
-import android.util.Pair;
import android.util.Slog;
import android.util.SparseIntArray;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import android.app.ActivityManagerNative;
import android.app.AlarmManager;
import android.app.AppGlobals;
-import android.app.INotificationManager;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-import android.content.pm.Signature;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.net.ProxyProperties;
-import android.net.Uri;
-import android.os.AsyncTask;
import android.os.Binder;
-import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import android.util.SparseArray;
import android.util.Xml;
import android.view.IWindowManager;
-import android.view.WindowManagerPolicy;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
-import java.security.KeyStore.TrustedCertificateEntry;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.text.DateFormat;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.text.TextUtils;
+import android.util.Log;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
// Otherwise WFD is enabled according to the value of config_enableWifiDisplay.
private static final String FORCE_WIFI_DISPLAY_ENABLE = "persist.debug.wfd.enable";
- private static final String SYSTEM_HEADLESS = "ro.config.headless";
private static final long WAIT_FOR_DEFAULT_DISPLAY_TIMEOUT = 10000;
private static final int MSG_REGISTER_DEFAULT_DISPLAY_ADAPTER = 1;
private static final int DISPLAY_BLANK_STATE_UNBLANKED = 2;
private final Context mContext;
- private final boolean mHeadless;
private final DisplayManagerHandler mHandler;
private final Handler mUiHandler;
private final DisplayAdapterListener mDisplayAdapterListener;
// The Wifi display adapter, or null if not registered.
private WifiDisplayAdapter mWifiDisplayAdapter;
+ // The number of active wifi display scan requests.
+ private int mWifiDisplayScanRequestCount;
+
// The virtual display adapter, or null if not registered.
private VirtualDisplayAdapter mVirtualDisplayAdapter;
public DisplayManagerService(Context context, Handler mainHandler) {
mContext = context;
- mHeadless = SystemProperties.get(SYSTEM_HEADLESS).equals("1");
-
mHandler = new DisplayManagerHandler(mainHandler.getLooper());
mUiHandler = UiThread.getHandler();
mDisplayAdapterListener = new DisplayAdapterListener();
}
/**
- * Returns true if the device is headless.
- *
- * @return True if the device is headless.
- */
- public boolean isHeadless() {
- return mHeadless;
- }
-
- /**
* Registers a display transaction listener to provide the client a chance to
* update its surfaces within the same transaction as any display layout updates.
*
}
}
- private void onCallbackDied(int pid) {
+ private void onCallbackDied(CallbackRecord record) {
synchronized (mSyncRoot) {
- mCallbacks.remove(pid);
+ mCallbacks.remove(record.mPid);
+ stopWifiDisplayScanLocked(record);
}
}
@Override // Binder call
- public void scanWifiDisplays() {
+ public void startWifiDisplayScan() {
mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY,
- "Permission required to scan wifi displays");
+ "Permission required to start wifi display scans");
+ final int callingPid = Binder.getCallingPid();
final long token = Binder.clearCallingIdentity();
try {
synchronized (mSyncRoot) {
+ CallbackRecord record = mCallbacks.get(callingPid);
+ if (record == null) {
+ throw new IllegalStateException("The calling process has not "
+ + "registered an IDisplayManagerCallback.");
+ }
+ startWifiDisplayScanLocked(record);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ private void startWifiDisplayScanLocked(CallbackRecord record) {
+ if (!record.mWifiDisplayScanRequested) {
+ record.mWifiDisplayScanRequested = true;
+ if (mWifiDisplayScanRequestCount++ == 0) {
if (mWifiDisplayAdapter != null) {
- mWifiDisplayAdapter.requestScanLocked();
+ mWifiDisplayAdapter.requestStartScanLocked();
+ }
+ }
+ }
+ }
+
+ @Override // Binder call
+ public void stopWifiDisplayScan() {
+ mContext.enforceCallingOrSelfPermission(Manifest.permission.CONFIGURE_WIFI_DISPLAY,
+ "Permission required to stop wifi display scans");
+
+ final int callingPid = Binder.getCallingPid();
+ final long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mSyncRoot) {
+ CallbackRecord record = mCallbacks.get(callingPid);
+ if (record == null) {
+ throw new IllegalStateException("The calling process has not "
+ + "registered an IDisplayManagerCallback.");
}
+ stopWifiDisplayScanLocked(record);
}
} finally {
Binder.restoreCallingIdentity(token);
}
}
+ private void stopWifiDisplayScanLocked(CallbackRecord record) {
+ if (record.mWifiDisplayScanRequested) {
+ record.mWifiDisplayScanRequested = false;
+ if (--mWifiDisplayScanRequestCount == 0) {
+ if (mWifiDisplayAdapter != null) {
+ mWifiDisplayAdapter.requestStopScanLocked();
+ }
+ } else if (mWifiDisplayScanRequestCount < 0) {
+ Log.wtf(TAG, "mWifiDisplayScanRequestCount became negative: "
+ + mWifiDisplayScanRequestCount);
+ mWifiDisplayScanRequestCount = 0;
+ }
+ }
+ }
+
@Override // Binder call
public void connectWifiDisplay(String address) {
if (address == null) {
private void registerDefaultDisplayAdapter() {
// Register default display adapter.
synchronized (mSyncRoot) {
- if (mHeadless) {
- registerDisplayAdapterLocked(new HeadlessDisplayAdapter(
- mSyncRoot, mContext, mHandler, mDisplayAdapterListener));
- } else {
- registerDisplayAdapterLocked(new LocalDisplayAdapter(
- mSyncRoot, mContext, mHandler, mDisplayAdapterListener));
- }
+ registerDisplayAdapterLocked(new LocalDisplayAdapter(
+ mSyncRoot, mContext, mHandler, mDisplayAdapterListener));
}
}
pw.println("DISPLAY MANAGER (dumpsys display)");
synchronized (mSyncRoot) {
- pw.println(" mHeadless=" + mHeadless);
pw.println(" mOnlyCode=" + mOnlyCore);
pw.println(" mSafeMode=" + mSafeMode);
pw.println(" mPendingTraversal=" + mPendingTraversal);
pw.println(" mDefaultViewport=" + mDefaultViewport);
pw.println(" mExternalTouchViewport=" + mExternalTouchViewport);
pw.println(" mSingleDisplayDemoMode=" + mSingleDisplayDemoMode);
+ pw.println(" mWifiDisplayScanRequestCount=" + mWifiDisplayScanRequestCount);
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
ipw.increaseIndent();
pw.println(" Display " + displayId + ":");
display.dumpLocked(ipw);
}
+
+ final int callbackCount = mCallbacks.size();
+ pw.println();
+ pw.println("Callbacks: size=" + callbackCount);
+ for (int i = 0; i < callbackCount; i++) {
+ CallbackRecord callback = mCallbacks.valueAt(i);
+ pw.println(" " + i + ": mPid=" + callback.mPid
+ + ", mWifiDisplayScanRequested=" + callback.mWifiDisplayScanRequested);
+ }
}
}
}
private final class CallbackRecord implements DeathRecipient {
- private final int mPid;
+ public final int mPid;
private final IDisplayManagerCallback mCallback;
+ public boolean mWifiDisplayScanRequested;
+
public CallbackRecord(int pid, IDisplayManagerCallback callback) {
mPid = pid;
mCallback = callback;
if (DEBUG) {
Slog.d(TAG, "Display listener for pid " + mPid + " died.");
}
- onCallbackDied(mPid);
+ onCallbackDied(this);
}
public void notifyDisplayEventAsync(int displayId, int event) {
+++ /dev/null
-/*
- * 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.server.display;
-
-import android.content.Context;
-import android.os.Handler;
-import android.util.DisplayMetrics;
-import android.view.Display;
-
-/**
- * Provides a fake default display for headless systems.
- * <p>
- * Display adapters are guarded by the {@link DisplayManagerService.SyncRoot} lock.
- * </p>
- */
-final class HeadlessDisplayAdapter extends DisplayAdapter {
- private static final String TAG = "HeadlessDisplayAdapter";
-
- // Called with SyncRoot lock held.
- public HeadlessDisplayAdapter(DisplayManagerService.SyncRoot syncRoot,
- Context context, Handler handler, Listener listener) {
- super(syncRoot, context, handler, listener, TAG);
- }
-
- @Override
- public void registerLocked() {
- super.registerLocked();
- sendDisplayDeviceEventLocked(new HeadlessDisplayDevice(), DISPLAY_DEVICE_EVENT_ADDED);
- }
-
- private final class HeadlessDisplayDevice extends DisplayDevice {
- private DisplayDeviceInfo mInfo;
-
- public HeadlessDisplayDevice() {
- super(HeadlessDisplayAdapter.this, null);
- }
-
- @Override
- public DisplayDeviceInfo getDisplayDeviceInfoLocked() {
- if (mInfo == null) {
- mInfo = new DisplayDeviceInfo();
- mInfo.name = getContext().getResources().getString(
- com.android.internal.R.string.display_manager_built_in_display_name);
- mInfo.width = 640;
- mInfo.height = 480;
- mInfo.refreshRate = 60;
- mInfo.densityDpi = DisplayMetrics.DENSITY_DEFAULT;
- mInfo.xDpi = 160;
- mInfo.yDpi = 160;
- mInfo.flags = DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY
- | DisplayDeviceInfo.FLAG_SECURE
- | DisplayDeviceInfo.FLAG_SUPPORTS_PROTECTED_BUFFERS;
- mInfo.type = Display.TYPE_BUILT_IN;
- mInfo.touch = DisplayDeviceInfo.TOUCH_NONE;
- }
- return mInfo;
- }
- }
-}
import android.view.DisplayEventReceiver;
import android.view.Surface;
import android.view.SurfaceControl;
-import android.view.SurfaceControl.PhysicalDisplayInfo;
import java.io.PrintWriter;
pw.println("mPendingStatusChangeBroadcast=" + mPendingStatusChangeBroadcast);
pw.println("mPendingNotificationUpdate=" + mPendingNotificationUpdate);
pw.println("mSupportsProtectedBuffers=" + mSupportsProtectedBuffers);
-
+
// Try to dump the controller state.
if (mDisplayController == null) {
pw.println("mDisplayController=null");
});
}
- public void requestScanLocked() {
+ public void requestStartScanLocked() {
if (DEBUG) {
- Slog.d(TAG, "requestScanLocked");
+ Slog.d(TAG, "requestStartScanLocked");
}
getHandler().post(new Runnable() {
@Override
public void run() {
if (mDisplayController != null) {
- mDisplayController.requestScan();
+ mDisplayController.requestStartScan();
}
}
});
}
- public void requestConnectLocked(final String address) {
+ public void requestStopScanLocked() {
if (DEBUG) {
- Slog.d(TAG, "requestConnectLocked: address=" + address);
+ Slog.d(TAG, "requestStopScanLocked");
}
getHandler().post(new Runnable() {
@Override
public void run() {
if (mDisplayController != null) {
- mDisplayController.requestConnect(address);
+ mDisplayController.requestStopScan();
}
}
});
}
- private boolean isRememberedDisplayLocked(String address) {
- for (WifiDisplay display : mRememberedDisplays) {
- if (display.getDeviceAddress().equals(address)) {
- return true;
- }
+ public void requestConnectLocked(final String address) {
+ if (DEBUG) {
+ Slog.d(TAG, "requestConnectLocked: address=" + address);
}
- return false;
+
+ getHandler().post(new Runnable() {
+ @Override
+ public void run() {
+ if (mDisplayController != null) {
+ mDisplayController.requestConnect(address);
+ }
+ }
+ });
}
public void requestPauseLocked() {
}
@Override
- public void onScanFinished(WifiDisplay[] availableDisplays) {
+ public void onScanResults(WifiDisplay[] availableDisplays) {
synchronized (getSyncRoot()) {
availableDisplays = mPersistentDataStore.applyWifiDisplayAliases(
availableDisplays);
- // check if any of the available displays changed canConnect status
boolean changed = !Arrays.equals(mAvailableDisplays, availableDisplays);
+
+ // Check whether any of the available displays changed canConnect status.
for (int i = 0; !changed && i<availableDisplays.length; i++) {
changed = availableDisplays[i].canConnect()
!= mAvailableDisplays[i].canConnect();
}
- if (mScanState != WifiDisplayStatus.SCAN_STATE_NOT_SCANNING || changed) {
- mScanState = WifiDisplayStatus.SCAN_STATE_NOT_SCANNING;
+ if (changed) {
mAvailableDisplays = availableDisplays;
fixRememberedDisplayNamesFromAvailableDisplaysLocked();
updateDisplaysLocked();
}
@Override
+ public void onScanFinished() {
+ synchronized (getSyncRoot()) {
+ if (mScanState != WifiDisplayStatus.SCAN_STATE_NOT_SCANNING) {
+ mScanState = WifiDisplayStatus.SCAN_STATE_NOT_SCANNING;
+ scheduleStatusChangedBroadcastLocked();
+ }
+ }
+ }
+
+ @Override
public void onDisplayConnecting(WifiDisplay display) {
synchronized (getSyncRoot()) {
display = mPersistentDataStore.applyWifiDisplayAlias(display);
import android.hardware.display.WifiDisplay;
import android.hardware.display.WifiDisplaySessionInfo;
import android.hardware.display.WifiDisplayStatus;
-import android.media.AudioManager;
import android.media.RemoteDisplay;
import android.net.NetworkInfo;
import android.net.Uri;
private static final int DEFAULT_CONTROL_PORT = 7236;
private static final int MAX_THROUGHPUT = 50;
- private static final int CONNECTION_TIMEOUT_SECONDS = 60;
+ private static final int CONNECTION_TIMEOUT_SECONDS = 30;
private static final int RTSP_TIMEOUT_SECONDS = 30;
private static final int RTSP_TIMEOUT_SECONDS_CERT_MODE = 120;
- private static final int DISCOVER_PEERS_MAX_RETRIES = 10;
- private static final int DISCOVER_PEERS_RETRY_DELAY_MILLIS = 500;
+ // We repeatedly issue calls to discover peers every so often for a few reasons.
+ // 1. The initial request may fail and need to retried.
+ // 2. Discovery will self-abort after any group is initiated, which may not necessarily
+ // be what we want to have happen.
+ // 3. Discovery will self-timeout after 2 minutes, whereas we want discovery to
+ // be occur for as long as a client is requesting it be.
+ // 4. We don't seem to get updated results for displays we've already found until
+ // we ask to discover again, particularly for the isSessionAvailable() property.
+ private static final int DISCOVER_PEERS_INTERVAL_MILLIS = 10000;
private static final int CONNECT_MAX_RETRIES = 3;
private static final int CONNECT_RETRY_DELAY_MILLIS = 500;
// True if Wifi display is enabled by the user.
private boolean mWifiDisplayOnSetting;
+ // True if a scan was requested independent of whether one is actually in progress.
+ private boolean mScanRequested;
+
// True if there is a call to discoverPeers in progress.
private boolean mDiscoverPeersInProgress;
- // Number of discover peers retries remaining.
- private int mDiscoverPeersRetriesLeft;
-
// The device to which we want to connect, or null if we want to be disconnected.
private WifiP2pDevice mDesiredDevice;
pw.println("mWfdEnabled=" + mWfdEnabled);
pw.println("mWfdEnabling=" + mWfdEnabling);
pw.println("mNetworkInfo=" + mNetworkInfo);
+ pw.println("mScanRequested=" + mScanRequested);
pw.println("mDiscoverPeersInProgress=" + mDiscoverPeersInProgress);
- pw.println("mDiscoverPeersRetriesLeft=" + mDiscoverPeersRetriesLeft);
pw.println("mDesiredDevice=" + describeWifiP2pDevice(mDesiredDevice));
pw.println("mConnectingDisplay=" + describeWifiP2pDevice(mConnectingDevice));
pw.println("mDisconnectingDisplay=" + describeWifiP2pDevice(mDisconnectingDevice));
}
}
- public void requestScan() {
- discoverPeers();
+ public void requestStartScan() {
+ if (!mScanRequested) {
+ mScanRequested = true;
+ updateScanState();
+ }
+ }
+
+ public void requestStopScan() {
+ if (mScanRequested) {
+ mScanRequested = false;
+ updateScanState();
+ }
}
public void requestConnect(String address) {
mWfdEnabling = false;
mWfdEnabled = true;
reportFeatureState();
+ updateScanState();
}
}
mWfdEnabling = false;
mWfdEnabled = false;
reportFeatureState();
+ updateScanState();
disconnect();
}
}
WifiDisplayStatus.FEATURE_STATE_OFF;
}
- private void discoverPeers() {
- if (!mDiscoverPeersInProgress) {
- mDiscoverPeersInProgress = true;
- mDiscoverPeersRetriesLeft = DISCOVER_PEERS_MAX_RETRIES;
- handleScanStarted();
- tryDiscoverPeers();
+ private void updateScanState() {
+ if (mScanRequested && mWfdEnabled && mDesiredDevice == null) {
+ if (!mDiscoverPeersInProgress) {
+ Slog.i(TAG, "Starting Wifi display scan.");
+ mDiscoverPeersInProgress = true;
+ handleScanStarted();
+ tryDiscoverPeers();
+ }
+ } else {
+ if (mDiscoverPeersInProgress) {
+ // Cancel automatic retry right away.
+ mHandler.removeCallbacks(mDiscoverPeers);
+
+ // Defer actually stopping discovery if we have a connection attempt in progress.
+ // The wifi display connection attempt often fails if we are not in discovery
+ // mode. So we allow discovery to continue until we give up trying to connect.
+ if (mDesiredDevice == null || mDesiredDevice == mConnectedDevice) {
+ Slog.i(TAG, "Stopping Wifi display scan.");
+ mDiscoverPeersInProgress = false;
+ stopPeerDiscovery();
+ handleScanFinished();
+ }
+ }
}
}
Slog.d(TAG, "Discover peers succeeded. Requesting peers now.");
}
- mDiscoverPeersInProgress = false;
- requestPeers();
+ if (mDiscoverPeersInProgress) {
+ requestPeers();
+ }
}
@Override
Slog.d(TAG, "Discover peers failed with reason " + reason + ".");
}
- if (mDiscoverPeersInProgress) {
- if (reason == 0 && mDiscoverPeersRetriesLeft > 0 && mWfdEnabled) {
- mHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- if (mDiscoverPeersInProgress) {
- if (mDiscoverPeersRetriesLeft > 0 && mWfdEnabled) {
- mDiscoverPeersRetriesLeft -= 1;
- if (DEBUG) {
- Slog.d(TAG, "Retrying discovery. Retries left: "
- + mDiscoverPeersRetriesLeft);
- }
- tryDiscoverPeers();
- } else {
- handleScanFinished();
- mDiscoverPeersInProgress = false;
- }
- }
- }
- }, DISCOVER_PEERS_RETRY_DELAY_MILLIS);
- } else {
- handleScanFinished();
- mDiscoverPeersInProgress = false;
- }
+ // Ignore the error.
+ // We will retry automatically in a little bit.
+ }
+ });
+
+ // Retry discover peers periodically until stopped.
+ mHandler.postDelayed(mDiscoverPeers, DISCOVER_PEERS_INTERVAL_MILLIS);
+ }
+
+ private void stopPeerDiscovery() {
+ mWifiP2pManager.stopPeerDiscovery(mWifiP2pChannel, new ActionListener() {
+ @Override
+ public void onSuccess() {
+ if (DEBUG) {
+ Slog.d(TAG, "Stop peer discovery succeeded.");
+ }
+ }
+
+ @Override
+ public void onFailure(int reason) {
+ if (DEBUG) {
+ Slog.d(TAG, "Stop peer discovery failed with reason " + reason + ".");
}
}
});
}
}
- handleScanFinished();
+ if (mDiscoverPeersInProgress) {
+ handleScanResults();
+ }
}
});
}
});
}
- private void handleScanFinished() {
+ private void handleScanResults() {
final int count = mAvailableWifiDisplayPeers.size();
final WifiDisplay[] displays = WifiDisplay.CREATOR.newArray(count);
for (int i = 0; i < count; i++) {
mHandler.post(new Runnable() {
@Override
public void run() {
- mListener.onScanFinished(displays);
+ mListener.onScanResults(displays);
+ }
+ });
+ }
+
+ private void handleScanFinished() {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ mListener.onScanFinished();
}
});
}
return;
}
+ if (!mWfdEnabled) {
+ Slog.i(TAG, "Ignoring request to connect to Wifi display because the "
+ +" feature is currently disabled: " + device.deviceName);
+ return;
+ }
+
mDesiredDevice = device;
mConnectionRetriesLeft = CONNECT_MAX_RETRIES;
updateConnection();
* connection is established (or not).
*/
private void updateConnection() {
+ // Step 0. Stop scans if necessary to prevent interference while connected.
+ // Resume scans later when no longer attempting to connect.
+ updateScanState();
+
// Step 1. Before we try to connect to a new device, tell the system we
// have disconnected from the old one.
if (mRemoteDisplay != null && mConnectedDevice != mDesiredDevice) {
return; // wait for asynchronous callback
}
- // Step 6. Listen for incoming connections.
+ // Step 6. Listen for incoming RTSP connection.
if (mConnectedDevice != null && mRemoteDisplay == null) {
Inet4Address addr = getInterfaceAddress(mConnectedDeviceGroupInfo);
if (addr == null) {
}
} else {
mConnectedDeviceGroupInfo = null;
- disconnect();
+
+ // Disconnect if we lost the network while connecting or connected to a display.
+ if (mConnectingDevice != null || mConnectedDevice != null) {
+ disconnect();
+ }
// After disconnection for a group, for some reason we have a tendency
// to get a peer change notification with an empty list of peers.
}
}
+ private final Runnable mDiscoverPeers = new Runnable() {
+ @Override
+ public void run() {
+ tryDiscoverPeers();
+ }
+ };
+
private final Runnable mConnectionTimeout = new Runnable() {
@Override
public void run() {
void onFeatureStateChanged(int featureState);
void onScanStarted();
- void onScanFinished(WifiDisplay[] availableDisplays);
+ void onScanResults(WifiDisplay[] availableDisplays);
+ void onScanFinished();
void onDisplayConnecting(WifiDisplay display);
void onDisplayConnectionFailed();
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
-import android.util.Log;
import android.util.Slog;
import java.util.Locale;
import android.location.IGeocodeProvider;
import android.os.Handler;
import android.os.RemoteException;
-import android.os.UserHandle;
import android.util.Log;
import com.android.server.ServiceWatcher;
import android.util.Log;
import com.android.server.ServiceWatcher;
-import java.util.List;
-
/**
* @hide
*/
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.conn.params.ConnRouteParams;
import android.content.Context;
import android.database.ContentObserver;
import android.location.Location;
-import android.location.LocationManager;
-import android.os.Bundle;
import android.os.Handler;
-import android.os.Parcelable;
import android.os.SystemClock;
import android.provider.Settings;
import android.util.Log;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import java.util.List;
import android.content.Context;
import android.location.LocationProvider;
package com.android.server.location;
-import android.location.Criteria;
import android.location.ILocationManager;
import android.location.Location;
import android.location.LocationProvider;
import android.content.pm.PackageParser;
import android.os.Binder;
import android.util.Base64;
-import android.util.Log;
import android.util.LongSparseArray;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.PublicKey;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.Arrays;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
-import java.util.Set;
public class PackageKeySetData {
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
-import android.content.pm.ApplicationInfo;
import android.content.pm.PackageUserState;
-import android.content.pm.UserInfo;
import android.util.SparseArray;
import java.io.File;
import java.util.HashSet;
-import java.util.List;
/**
* Settings base class for pending and resolved classes.
import com.android.internal.util.XmlUtils;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.ComponentInfo;
-import android.content.pm.KeySet;
import android.content.pm.PackageCleanItem;
import android.content.pm.PackageManager;
import android.content.pm.PackageParser;
import android.os.Process;
import android.os.UserHandle;
import android.util.Log;
-import android.util.LongSparseArray;
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
-import java.security.PublicKey;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
private void registerBoradcastReceivers() {
PackageMonitor monitor = new PackageMonitor() {
@Override
- public boolean onPackageChanged(String packageName, int uid, String[] components) {
+ public void onPackageModified(String packageName) {
synchronized (mLock) {
UserState userState = getOrCreateUserStateLocked(getChangingUserId());
Iterator<ComponentName> iterator = userState.getEnabledServices().iterator();
ComponentName componentName = iterator.next();
if (packageName.equals(componentName.getPackageName())) {
userState.updateIfNeededLocked();
- return true;
}
}
}
- return false;
}
@Override
tempPrintServices.add(PrintServiceInfo.create(installedService, mContext));
}
- if (!tempPrintServices.equals(mInstalledServices)) {
+ boolean someServiceChanged = false;
+
+ if (tempPrintServices.size() != mInstalledServices.size()) {
+ someServiceChanged = true;
+ } else {
+ for (PrintServiceInfo newService: tempPrintServices) {
+ final int oldServiceIndex = mInstalledServices.indexOf(newService);
+ if (oldServiceIndex < 0) {
+ someServiceChanged = true;
+ break;
+ }
+ // PrintServiceInfo#equals compares only the id not all members,
+ // so we are also comparing the members coming from meta-data.
+ PrintServiceInfo oldService = mInstalledServices.get(oldServiceIndex);
+ if (!TextUtils.equals(oldService.getAddPrintersActivityName(),
+ newService.getAddPrintersActivityName())
+ || !TextUtils.equals(oldService.getAdvancedOptionsActivityName(),
+ newService.getAdvancedOptionsActivityName())
+ || !TextUtils.equals(oldService.getSettingsActivityName(),
+ newService.getSettingsActivityName())) {
+ someServiceChanged = true;
+ break;
+ }
+ }
+ }
+
+ if (someServiceChanged) {
mInstalledServices.clear();
mInstalledServices.addAll(tempPrintServices);
return true;
package com.android.server.search;
import android.app.ActivityManager;
-import android.app.ActivityManagerNative;
import android.app.AppGlobals;
import android.app.ISearchManager;
import android.app.SearchManager;
import android.os.UserManager;
import android.provider.Settings;
import android.util.Log;
-import android.util.Slog;
import android.util.SparseArray;
import com.android.internal.content.PackageMonitor;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
-import android.os.FileUtils;
import android.util.Base64;
import android.util.EventLog;
import android.util.Slog;
import java.io.ByteArrayInputStream;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.IOException;
-import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.Signature;
-import java.security.SignatureException;
import libcore.io.IoUtils;
import android.content.Context;
import android.content.Intent;
-import android.os.FileUtils;
-import android.os.SELinux;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Base64;
package com.android.server.updates;
import android.util.Base64;
-import android.util.Slog;
import java.io.IOException;
private Point getDefaultDisplaySize() {
Point p = new Point();
- try {
- mIWindowManager.getInitialDisplaySize(Display.DEFAULT_DISPLAY, p);
- } catch (RemoteException e) {
- // not remote
- }
+ WindowManager wm = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
+ Display d = wm.getDefaultDisplay();
+ d.getRealSize(p);
return p;
}
import android.os.Messenger;
import android.os.HandlerThread;
import android.os.IBinder;
-import android.os.INetworkManagementService;
import android.os.Message;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.WorkSource;
import android.os.AsyncTask;
import android.provider.Settings;
-import android.util.Log;
import android.util.Slog;
import java.io.FileNotFoundException;
import java.net.InetAddress;
import java.net.Inet4Address;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
import com.android.internal.R;
import com.android.internal.app.IBatteryStats;
import com.android.internal.telephony.TelephonyIntents;
import android.net.wifi.WifiManager;
import android.os.Messenger;
import android.os.RemoteException;
-import android.util.Log;
import android.os.Handler;
import android.os.Message;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
-import com.android.internal.util.AsyncChannel;
-
/* Polls for traffic stats and notifies the clients */
final class WifiTrafficPoller {
/**
int groupId = -1;
boolean appFullscreen;
int requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
- int configChanges;
+ boolean layoutConfigChanges;
boolean showWhenLocked;
// The input dispatching timeout for this application token in nanoseconds.
import android.view.Display;
import android.view.DragEvent;
import android.view.InputChannel;
-import android.view.Surface;
import android.view.SurfaceControl;
import android.view.View;
import android.view.WindowManager;
import android.os.Looper;
import android.os.Process;
-import android.util.Slog;
import android.view.Display;
import android.view.InputChannel;
import android.view.InputEventReceiver;
-import android.view.InputQueue;
import android.view.WindowManagerPolicy;
public final class FakeWindowImpl implements WindowManagerPolicy.FakeWindow {
import android.os.Message;
import android.os.RemoteException;
import android.os.TokenWatcher;
-import android.os.UserHandle;
import android.util.Log;
import android.util.Pair;
import android.view.WindowManagerPolicy;
package com.android.server.wm;
import android.util.EventLog;
-import com.android.server.EventLogTags;
class Task {
// private final String TAG = "TaskGroup";
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
final WindowState win = windows.get(winNdx);
if (!resizingWindows.contains(win)) {
+ if (WindowManagerService.DEBUG_RESIZE) Slog.d(TAG,
+ "setBounds: Resizing " + win);
resizingWindows.add(win);
}
win.mUnderStatusBar = underStatusBar;
final private KeyguardDisableHandler mKeyguardDisableHandler;
- private final boolean mHeadless;
-
final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
com.android.internal.R.bool.config_sf_limitedAlpha);
mInputManager = inputManager; // Must be before createDisplayContentLocked.
mDisplayManagerService = displayManager;
- mHeadless = displayManager.isHeadless();
mDisplaySettings = new DisplaySettings(context);
mDisplaySettings.readSettingsLocked();
atoken.appFullscreen = fullscreen;
atoken.showWhenLocked = showWhenLocked;
atoken.requestedOrientation = requestedOrientation;
- atoken.configChanges = configChanges;
+ atoken.layoutConfigChanges = (configChanges &
+ (ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION)) != 0;
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + atoken
+ " to stack=" + stackId + " task=" + taskId + " at " + addPos);
public void performBootTimeout() {
synchronized(mWindowMap) {
- if (mDisplayEnabled || mHeadless) {
+ if (mDisplayEnabled) {
return;
}
Slog.w(TAG, "***** BOOT TIMEOUT: forcing display enabled");
// only allow disables from pids which have count on, etc.
@Override
public void showStrictModeViolation(boolean on) {
- if (mHeadless) return;
int pid = Binder.getCallingPid();
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, pid));
}
// We keep on including windows until we go past a full-screen
// window.
- boolean fullscreen = ws.isFullscreen(dw, dh);
- including = !ws.mIsImWindow && !fullscreen;
+ including = !ws.mIsImWindow && !ws.isFullscreen(dw, dh);
final WindowStateAnimator winAnim = ws.mWinAnimator;
if (maxLayer < winAnim.mSurfaceLayer) {
ws.isDisplayedLw()) {
screenshotReady = true;
}
-
- if (fullscreen) {
- // No point in continuing down through windows.
- break;
- }
}
if (appToken != null && appWin == null) {
// windows, since that means "perform layout as normal,
// just don't display").
if (!gone || !win.mHaveFrame || win.mLayoutNeeded
- || win.isConfigChanged() && (win.mAttrs.type == TYPE_KEYGUARD ||
- (win.mAppToken != null && (win.mAppToken.configChanges &
- (ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_ORIENTATION))
- != 0))
+ || ((win.isConfigChanged() || win.setInsetsChanged()) &&
+ (win.mAttrs.type == TYPE_KEYGUARD ||
+ win.mAppToken != null && win.mAppToken.layoutConfigChanges))
|| win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
if (!win.mLayoutAttached) {
if (initial) {
// We are transitioning from an activity with
// a wallpaper to one without.
transit = AppTransition.TRANSIT_WALLPAPER_CLOSE;
- mAnimateWallpaperWithTarget = true;
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"New transit away from wallpaper: " + transit);
} else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) {
private void updateResizingWindows(final WindowState w) {
final WindowStateAnimator winAnimator = w.mWinAnimator;
if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) {
- w.mOverscanInsetsChanged |=
- !w.mLastOverscanInsets.equals(w.mOverscanInsets);
- w.mContentInsetsChanged |=
- !w.mLastContentInsets.equals(w.mContentInsets);
- w.mVisibleInsetsChanged |=
- !w.mLastVisibleInsets.equals(w.mVisibleInsets);
+ w.setInsetsChanged();
boolean configChanged = w.isConfigChanged();
if (DEBUG_CONFIGURATION && configChanged) {
Slog.v(TAG, "Win " + w + " config changed: "
return mAppToken != null ? mAppToken.appToken : null;
}
+ boolean setInsetsChanged() {
+ mOverscanInsetsChanged |= !mLastOverscanInsets.equals(mOverscanInsets);
+ mContentInsetsChanged |= !mLastContentInsets.equals(mContentInsets);
+ mVisibleInsetsChanged |= !mLastVisibleInsets.equals(mVisibleInsets);
+ return mOverscanInsetsChanged || mContentInsetsChanged || mVisibleInsetsChanged;
+ }
+
public int getDisplayId() {
return mDisplayContent.getDisplayId();
}
sendMessage("666 Address added 2001:db8::1/64 wlan0 1 0");
// Invalid code.
+
+ /**
+ * DNS information broadcasts.
+ */
+ sendMessage("615 DnsInfo servers rmnet_usb0 3600 2001:db8::1");
+ expectSoon(observer).interfaceDnsServerInfo("rmnet_usb0", 3600,
+ new String[]{"2001:db8::1"});
+
+ sendMessage("615 DnsInfo servers wlan0 14400 2001:db8::1,2001:db8::2");
+ expectSoon(observer).interfaceDnsServerInfo("wlan0", 14400,
+ new String[]{"2001:db8::1", "2001:db8::2"});
+
+ // We don't check for negative lifetimes, only for parse errors.
+ sendMessage("615 DnsInfo servers wlan0 -3600 ::1");
+ expectSoon(observer).interfaceDnsServerInfo("wlan0", -3600,
+ new String[]{"::1"});
+
+ sendMessage("615 DnsInfo servers wlan0 SIXHUNDRED ::1");
+ // Non-numeric lifetime.
+
+ sendMessage("615 DnsInfo servers wlan0 2001:db8::1");
+ // Missing lifetime.
+
+ sendMessage("615 DnsInfo servers wlan0 3600");
+ // No servers.
+
+ sendMessage("615 DnsInfo servers 3600 wlan0 2001:db8::1,2001:db8::2");
+ // Non-numeric lifetime.
+
+ sendMessage("615 DnsInfo wlan0 7200 2001:db8::1,2001:db8::2");
+ // Invalid tokens.
+
+ sendMessage("666 DnsInfo servers wlan0 5400 2001:db8::1");
+ // Invalid code.
+
+ // No syntax checking on the addresses.
+ sendMessage("615 DnsInfo servers wlan0 600 ,::,,foo,::1,");
+ expectSoon(observer).interfaceDnsServerInfo("wlan0", 600,
+ new String[]{"", "::", "", "foo", "::1"});
+
// Make sure nothing else was called.
verifyNoMoreInteractions(observer);
}
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.SystemProperties;
-import android.provider.Settings;
-
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
package android.telephony;
-import android.os.Parcel;
-import android.os.Parcelable;
-
/**
* Abstract base class for cell phone signal strength related information.
*/
import android.telephony.SignalStrength;
import android.telephony.CellLocation;
import android.telephony.CellInfo;
-import android.telephony.Rlog;
import com.android.internal.telephony.IPhoneStateListener;
package android.telephony;
-import com.android.internal.os.RuntimeInit;
-
import android.util.Log;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
/**
* A class to log strings to the RADIO LOG.
*
package android.telephony;
-import android.os.Handler;
-import android.os.Message;
import android.os.RemoteException;
import com.android.internal.telephony.IThirdPartyCallListener;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
-import android.os.RemoteException;
import android.util.Pair;
import com.android.internal.telephony.IThirdPartyCallListener;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
-import android.os.SystemProperties;
import android.provider.ContactsContract.CommonDataKinds.SipAddress;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.PhoneLookup;
import android.app.Activity;
-import java.lang.reflect.Field;
-
/**
* This class provides functional testing of a single activity. The activity under test will
* be created using the system infrastructure (by calling InstrumentationTestCase.launchActivity())
package android.test;
-import java.lang.reflect.Field;
-
import android.app.Application;
import android.app.Instrumentation;
import android.content.Context;
package android.test;
-import java.lang.reflect.Field;
-
/**
*
* The InstrumentationUtils class has all the utility functions needed for
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
import java.util.List;
import android.app.Instrumentation;
import android.content.Intent;
import android.os.Bundle;
-import android.os.RemoteException;
-import android.os.Debug;
-import android.os.Process;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-
-import java.util.ArrayList;
/**
package android.test;
-import com.google.android.collect.Lists;
import junit.framework.Assert;
import java.util.Arrays;
import android.app.Application;
import android.app.Service;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
-import android.os.RemoteException;
import android.test.mock.MockApplication;
-import java.lang.reflect.Field;
import java.util.Random;
/**
package android.test;
import android.app.Activity;
-import android.view.IWindowManager;
-import android.os.ServiceManager;
/**
* If you would like to test a single activity with an
import android.net.Uri;
import android.os.Bundle;
-import java.util.Map;
-
/**
* <P>
* A mock {@link android.database.Cursor} class that isolates the test code from real
import android.content.pm.ServiceInfo;
import android.content.pm.VerificationParams;
import android.content.pm.VerifierDeviceIdentity;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.net.Uri;
-import android.os.Binder;
-import android.os.RemoteException;
import android.os.UserHandle;
import java.util.List;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.HashSet;
package junit.runner;
import java.lang.reflect.*;
-import junit.runner.*;
import junit.framework.*;
/**
import java.util.*;
-import junit.runner.*;
-
/**
* A custom quick sort with support to customize the swap behaviour.
* NOTICE: We can't use the the sorting support from the JDK 1.2 collection
import android.os.Parcel;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
/**
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.net.InetAddress;
import java.util.UUID;
/**
import android.net.wifi.WifiConfiguration.Status;
import android.net.wifi.NetworkUpdateResult;
import static android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID;
+
import android.os.Environment;
import android.os.FileObserver;
-import android.os.Message;
import android.os.Handler;
import android.os.HandlerThread;
+import android.os.Process;
import android.os.UserHandle;
+import android.security.Credentials;
+import android.security.KeyChain;
import android.security.KeyStore;
import android.text.TextUtils;
import android.util.LocalLog;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.security.PublicKey;
+import java.security.PrivateKey;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
/**
* This class provides the API to manage configured
private static final String EXCLUSION_LIST_KEY = "exclusionList";
private static final String EOS = "eos";
+
+ /* Enterprise configuration keys */
+ /**
+ * In old configurations, the "private_key" field was used. However, newer
+ * configurations use the key_id field with the engine_id set to "keystore".
+ * If this field is found in the configuration, the migration code is
+ * triggered.
+ */
+ public static final String OLD_PRIVATE_KEY_NAME = "private_key";
+
+ /**
+ * String representing the keystore OpenSSL ENGINE's ID.
+ */
+ public static final String ENGINE_ID_KEYSTORE = "keystore";
+
+ /**
+ * String representing the keystore URI used for wpa_supplicant.
+ */
+ public static final String KEYSTORE_URI = "keystore://";
+
+ /**
+ * String to set the engine value to when it should be enabled.
+ */
+ public static final String ENGINE_ENABLE = "1";
+
+ /**
+ * String to set the engine value to when it should be disabled.
+ */
+ public static final String ENGINE_DISABLE = "0";
+
+ public static final String CA_CERT_PREFIX = KEYSTORE_URI + Credentials.CA_CERTIFICATE;
+ public static final String CLIENT_CERT_PREFIX = KEYSTORE_URI + Credentials.USER_CERTIFICATE;
+ public static final String EAP_KEY = "eap";
+ public static final String PHASE2_KEY = "phase2";
+ public static final String IDENTITY_KEY = "identity";
+ public static final String ANON_IDENTITY_KEY = "anonymous_identity";
+ public static final String PASSWORD_KEY = "password";
+ public static final String CLIENT_CERT_KEY = "client_cert";
+ public static final String CA_CERT_KEY = "ca_cert";
+ public static final String SUBJECT_MATCH_KEY = "subject_match";
+ public static final String ENGINE_KEY = "engine";
+ public static final String ENGINE_ID_KEY = "engine_id";
+ public static final String PRIVATE_KEY_ID_KEY = "key_id";
+ public static final String OPP_KEY_CACHING = "proactive_key_caching";
+
+ /** This represents an empty value of an enterprise field.
+ * NULL is used at wpa_supplicant to indicate an empty value
+ */
+ static final String EMPTY_VALUE = "NULL";
+
+ /** Internal use only */
+ private static final String[] ENTERPRISE_CONFIG_SUPPLICANT_KEYS = new String[] { EAP_KEY,
+ PHASE2_KEY, IDENTITY_KEY, ANON_IDENTITY_KEY, PASSWORD_KEY, CLIENT_CERT_KEY,
+ CA_CERT_KEY, SUBJECT_MATCH_KEY, ENGINE_KEY, ENGINE_ID_KEY, PRIVATE_KEY_ID_KEY };
+
private final LocalLog mLocalLog;
private final WpaConfigFileObserver mFileObserver;
if (config != null) {
// Remove any associated keys
if (config.enterpriseConfig != null) {
- config.enterpriseConfig.removeKeys(mKeyStore);
+ removeKeys(config.enterpriseConfig);
}
mConfiguredNetworks.remove(netId);
mNetworkIds.remove(configKey(config));
if (config.allowedKeyManagement.get(KeyMgmt.WPA_EAP)
&& config.allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
- if (config.enterpriseConfig.needsSoftwareBackedKeyStore()) {
+ if (needsSoftwareBackedKeyStore(config.enterpriseConfig)) {
return true;
}
}
WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
- if (enterpriseConfig.needsKeyStore()) {
+ if (needsKeyStore(enterpriseConfig)) {
/**
* Keyguard settings may eventually be controlled by device policy.
* We check here if keystore is unlocked before installing
WifiConfiguration currentConfig = mConfiguredNetworks.get(netId);
String keyId = config.getKeyIdForCredentials(currentConfig);
- if (!enterpriseConfig.installKeys(mKeyStore, keyId)) {
+ if (!installKeys(enterpriseConfig, keyId)) {
loge(config.SSID + ": failed to install keys");
break setVariables;
}
netId,
key,
value)) {
- enterpriseConfig.removeKeys(mKeyStore);
+ removeKeys(enterpriseConfig);
loge(config.SSID + ": failed to set " + key +
": " + value);
break setVariables;
config.enterpriseConfig = new WifiEnterpriseConfig();
}
HashMap<String, String> enterpriseFields = config.enterpriseConfig.getFields();
- for (String key : WifiEnterpriseConfig.getSupplicantKeys()) {
+ for (String key : ENTERPRISE_CONFIG_SUPPLICANT_KEYS) {
value = mWifiNative.getNetworkVariable(netId, key);
if (!TextUtils.isEmpty(value)) {
enterpriseFields.put(key, removeDoubleQuotes(value));
} else {
- enterpriseFields.put(key, WifiEnterpriseConfig.EMPTY_VALUE);
+ enterpriseFields.put(key, EMPTY_VALUE);
}
}
- if (config.enterpriseConfig.migrateOldEapTlsNative(mWifiNative, netId)) {
+ if (migrateOldEapTlsNative(config.enterpriseConfig, netId)) {
saveConfig();
}
- config.enterpriseConfig.migrateCerts(mKeyStore);
- config.enterpriseConfig.initializeSoftwareKeystoreFlag(mKeyStore);
+ migrateCerts(config.enterpriseConfig);
+ // initializeSoftwareKeystoreFlag(config.enterpriseConfig, mKeyStore);
}
private String removeDoubleQuotes(String string) {
}
}
+ // Certificate and privake key management for EnterpriseConfig
+ boolean needsKeyStore(WifiEnterpriseConfig config) {
+ // Has no keys to be installed
+ if (config.getClientCertificate() == null && config.getCaCertificate() == null)
+ return false;
+ return true;
+ }
+
+ static boolean isHardwareBackedKey(PrivateKey key) {
+ return KeyChain.isBoundKeyAlgorithm(key.getAlgorithm());
+ }
+
+ static boolean hasHardwareBackedKey(Certificate certificate) {
+ return KeyChain.isBoundKeyAlgorithm(certificate.getPublicKey().getAlgorithm());
+ }
+
+ boolean needsSoftwareBackedKeyStore(WifiEnterpriseConfig config) {
+ String client = config.getClientCertificateAlias();
+ if (!TextUtils.isEmpty(client)) {
+ // a valid client certificate is configured
+
+ // BUGBUG: keyStore.get() never returns certBytes; because it is not
+ // taking WIFI_UID as a parameter. It always looks for certificate
+ // with SYSTEM_UID, and never finds any Wifi certificates. Assuming that
+ // all certificates need software keystore until we get the get() API
+ // fixed.
+
+ return true;
+ }
+
+ /*
+ try {
+
+ if (DBG) Slog.d(TAG, "Loading client certificate " + Credentials
+ .USER_CERTIFICATE + client);
+
+ CertificateFactory factory = CertificateFactory.getInstance("X.509");
+ if (factory == null) {
+ Slog.e(TAG, "Error getting certificate factory");
+ return;
+ }
+
+ byte[] certBytes = keyStore.get(Credentials.USER_CERTIFICATE + client);
+ if (certBytes != null) {
+ Certificate cert = (X509Certificate) factory.generateCertificate(
+ new ByteArrayInputStream(certBytes));
+
+ if (cert != null) {
+ mNeedsSoftwareKeystore = hasHardwareBackedKey(cert);
+
+ if (DBG) Slog.d(TAG, "Loaded client certificate " + Credentials
+ .USER_CERTIFICATE + client);
+ if (DBG) Slog.d(TAG, "It " + (mNeedsSoftwareKeystore ? "needs" :
+ "does not need" ) + " software key store");
+ } else {
+ Slog.d(TAG, "could not generate certificate");
+ }
+ } else {
+ Slog.e(TAG, "Could not load client certificate " + Credentials
+ .USER_CERTIFICATE + client);
+ mNeedsSoftwareKeystore = true;
+ }
+
+ } catch(CertificateException e) {
+ Slog.e(TAG, "Could not read certificates");
+ mCaCert = null;
+ mClientCertificate = null;
+ }
+ */
+
+ return false;
+ }
+
+ boolean installKeys(WifiEnterpriseConfig config, String name) {
+ boolean ret = true;
+ String privKeyName = Credentials.USER_PRIVATE_KEY + name;
+ String userCertName = Credentials.USER_CERTIFICATE + name;
+ String caCertName = Credentials.CA_CERTIFICATE + name;
+ if (config.getClientCertificate() != null) {
+ byte[] privKeyData = config.getClientPrivateKey().getEncoded();
+ if (isHardwareBackedKey(config.getClientPrivateKey())) {
+ // Hardware backed key store is secure enough to store keys un-encrypted, this
+ // removes the need for user to punch a PIN to get access to these keys
+ if (DBG) Log.d(TAG, "importing keys " + name + " in hardware backed store");
+ ret = mKeyStore.importKey(privKeyName, privKeyData, android.os.Process.WIFI_UID,
+ KeyStore.FLAG_NONE);
+ } else {
+ // Software backed key store is NOT secure enough to store keys un-encrypted.
+ // Save keys encrypted so they are protected with user's PIN. User will
+ // have to unlock phone before being able to use these keys and connect to
+ // networks.
+ if (DBG) Log.d(TAG, "importing keys " + name + " in software backed store");
+ ret = mKeyStore.importKey(privKeyName, privKeyData, Process.WIFI_UID,
+ KeyStore.FLAG_ENCRYPTED);
+ }
+ if (ret == false) {
+ return ret;
+ }
+
+ ret = putCertInKeyStore(userCertName, config.getClientCertificate());
+ if (ret == false) {
+ // Remove private key installed
+ mKeyStore.delKey(privKeyName, Process.WIFI_UID);
+ return ret;
+ }
+ }
+
+ if (config.getCaCertificate() != null) {
+ ret = putCertInKeyStore(caCertName, config.getCaCertificate());
+ if (ret == false) {
+ if (config.getClientCertificate() != null) {
+ // Remove client key+cert
+ mKeyStore.delKey(privKeyName, Process.WIFI_UID);
+ mKeyStore.delete(userCertName, Process.WIFI_UID);
+ }
+ return ret;
+ }
+ }
+
+ // Set alias names
+ if (config.getClientCertificate() != null) {
+ config.setClientCertificateAlias(name);
+ config.resetClientKeyEntry();
+ }
+
+ if (config.getCaCertificate() != null) {
+ config.setCaCertificateAlias(name);
+ config.resetCaCertificate();
+ }
+
+ return ret;
+ }
+
+ private boolean putCertInKeyStore(String name, Certificate cert) {
+ try {
+ byte[] certData = Credentials.convertToPem(cert);
+ if (DBG) Log.d(TAG, "putting certificate " + name + " in keystore");
+ return mKeyStore.put(name, certData, Process.WIFI_UID, KeyStore.FLAG_NONE);
+
+ } catch (IOException e1) {
+ return false;
+ } catch (CertificateException e2) {
+ return false;
+ }
+ }
+
+ void removeKeys(WifiEnterpriseConfig config) {
+ String client = config.getClientCertificateAlias();
+ // a valid client certificate is configured
+ if (!TextUtils.isEmpty(client)) {
+ if (DBG) Log.d(TAG, "removing client private key and user cert");
+ mKeyStore.delKey(Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID);
+ mKeyStore.delete(Credentials.USER_CERTIFICATE + client, Process.WIFI_UID);
+ }
+
+ String ca = config.getCaCertificateAlias();
+ // a valid ca certificate is configured
+ if (!TextUtils.isEmpty(ca)) {
+ if (DBG) Log.d(TAG, "removing CA cert");
+ mKeyStore.delete(Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID);
+ }
+ }
+
+
+ /** Migrates the old style TLS config to the new config style. This should only be used
+ * when restoring an old wpa_supplicant.conf or upgrading from a previous
+ * platform version.
+ * @return true if the config was updated
+ * @hide
+ */
+ boolean migrateOldEapTlsNative(WifiEnterpriseConfig config, int netId) {
+ String oldPrivateKey = mWifiNative.getNetworkVariable(netId, OLD_PRIVATE_KEY_NAME);
+ /*
+ * If the old configuration value is not present, then there is nothing
+ * to do.
+ */
+ if (TextUtils.isEmpty(oldPrivateKey)) {
+ return false;
+ } else {
+ // Also ignore it if it's empty quotes.
+ oldPrivateKey = removeDoubleQuotes(oldPrivateKey);
+ if (TextUtils.isEmpty(oldPrivateKey)) {
+ return false;
+ }
+ }
+
+ config.setFieldValue(ENGINE_KEY, ENGINE_ENABLE);
+ config.setFieldValue(ENGINE_ID_KEY, ENGINE_ID_KEYSTORE);
+
+ /*
+ * The old key started with the keystore:// URI prefix, but we don't
+ * need that anymore. Trim it off if it exists.
+ */
+ final String keyName;
+ if (oldPrivateKey.startsWith(KEYSTORE_URI)) {
+ keyName = new String(oldPrivateKey.substring(KEYSTORE_URI.length()));
+ } else {
+ keyName = oldPrivateKey;
+ }
+ config.setFieldValue(PRIVATE_KEY_ID_KEY, keyName);
+
+ mWifiNative.setNetworkVariable(netId, ENGINE_KEY, config.getFieldValue(ENGINE_KEY, ""));
+
+ mWifiNative.setNetworkVariable(netId, ENGINE_ID_KEY,
+ config.getFieldValue(ENGINE_ID_KEY, ""));
+
+ mWifiNative.setNetworkVariable(netId, PRIVATE_KEY_ID_KEY,
+ config.getFieldValue(PRIVATE_KEY_ID_KEY, ""));
+
+ // Remove old private_key string so we don't run this again.
+ mWifiNative.setNetworkVariable(netId, OLD_PRIVATE_KEY_NAME, EMPTY_VALUE);
+
+ return true;
+ }
+
+ /** Migrate certs from global pool to wifi UID if not already done */
+ void migrateCerts(WifiEnterpriseConfig config) {
+ String client = config.getClientCertificateAlias();
+ // a valid client certificate is configured
+ if (!TextUtils.isEmpty(client)) {
+ if (!mKeyStore.contains(Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID)) {
+ mKeyStore.duplicate(Credentials.USER_PRIVATE_KEY + client, -1,
+ Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID);
+ mKeyStore.duplicate(Credentials.USER_CERTIFICATE + client, -1,
+ Credentials.USER_CERTIFICATE + client, Process.WIFI_UID);
+ }
+ }
+
+ String ca = config.getCaCertificateAlias();
+ // a valid ca certificate is configured
+ if (!TextUtils.isEmpty(ca)) {
+ if (!mKeyStore.contains(Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID)) {
+ mKeyStore.duplicate(Credentials.CA_CERTIFICATE + ca, -1,
+ Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID);
+ }
+ }
+ }
}
import android.os.Parcel;
import android.os.Parcelable;
-import android.os.Process;
import android.security.Credentials;
-import android.security.KeyChain;
-import android.security.KeyStore;
import android.text.TextUtils;
-import android.util.Slog;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
-import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
* and any associated credentials.
*/
public class WifiEnterpriseConfig implements Parcelable {
- private static final String TAG = "WifiEnterpriseConfig";
- private static final boolean DBG = false;
- /**
- * In old configurations, the "private_key" field was used. However, newer
- * configurations use the key_id field with the engine_id set to "keystore".
- * If this field is found in the configuration, the migration code is
- * triggered.
- */
- private static final String OLD_PRIVATE_KEY_NAME = "private_key";
-
- /**
- * String representing the keystore OpenSSL ENGINE's ID.
- */
- private static final String ENGINE_ID_KEYSTORE = "keystore";
-
- /**
- * String representing the keystore URI used for wpa_supplicant.
- */
- private static final String KEYSTORE_URI = "keystore://";
-
- /**
- * String to set the engine value to when it should be enabled.
- */
- private static final String ENGINE_ENABLE = "1";
-
- /**
- * String to set the engine value to when it should be disabled.
- */
- private static final String ENGINE_DISABLE = "0";
-
- private static final String CA_CERT_PREFIX = KEYSTORE_URI + Credentials.CA_CERTIFICATE;
- private static final String CLIENT_CERT_PREFIX = KEYSTORE_URI + Credentials.USER_CERTIFICATE;
-
- private static final String EAP_KEY = "eap";
- private static final String PHASE2_KEY = "phase2";
- private static final String IDENTITY_KEY = "identity";
- private static final String ANON_IDENTITY_KEY = "anonymous_identity";
- private static final String PASSWORD_KEY = "password";
- private static final String CLIENT_CERT_KEY = "client_cert";
- private static final String CA_CERT_KEY = "ca_cert";
- private static final String SUBJECT_MATCH_KEY = "subject_match";
- private static final String ENGINE_KEY = "engine";
- private static final String ENGINE_ID_KEY = "engine_id";
- private static final String PRIVATE_KEY_ID_KEY = "key_id";
- private static final String OPP_KEY_CACHING = "proactive_key_caching";
private HashMap<String, String> mFields = new HashMap<String, String>();
private X509Certificate mCaCert;
private PrivateKey mClientPrivateKey;
private X509Certificate mClientCertificate;
- private boolean mNeedsSoftwareKeystore = false;
-
- /** This represents an empty value of an enterprise field.
- * NULL is used at wpa_supplicant to indicate an empty value
- */
- static final String EMPTY_VALUE = "NULL";
public WifiEnterpriseConfig() {
// Do not set defaults so that the enterprise fields that are not changed
public static final int GTC = 4;
private static final String PREFIX = "auth=";
/** @hide */
- public static final String[] strings = {EMPTY_VALUE, "PAP", "MSCHAP", "MSCHAPV2", "GTC" };
+ public static final String[] strings = {WifiConfigStore.EMPTY_VALUE, "PAP", "MSCHAP",
+ "MSCHAPV2", "GTC" };
/** Prevent initialization */
private Phase2() {}
return mFields;
}
- /** Internal use only */
- static String[] getSupplicantKeys() {
- return new String[] { EAP_KEY, PHASE2_KEY, IDENTITY_KEY, ANON_IDENTITY_KEY, PASSWORD_KEY,
- CLIENT_CERT_KEY, CA_CERT_KEY, SUBJECT_MATCH_KEY, ENGINE_KEY, ENGINE_ID_KEY,
- PRIVATE_KEY_ID_KEY };
- }
-
/**
* Set the EAP authentication method.
* @param eapMethod is one {@link Eap#PEAP}, {@link Eap#TLS}, {@link Eap#TTLS} or
case Eap.PWD:
case Eap.TLS:
case Eap.TTLS:
- mFields.put(EAP_KEY, Eap.strings[eapMethod]);
- mFields.put(OPP_KEY_CACHING, "1");
+ mFields.put(WifiConfigStore.EAP_KEY, Eap.strings[eapMethod]);
+ mFields.put(WifiConfigStore.OPP_KEY_CACHING, "1");
break;
default:
throw new IllegalArgumentException("Unknown EAP method");
* @return eap method configured
*/
public int getEapMethod() {
- String eapMethod = mFields.get(EAP_KEY);
+ String eapMethod = mFields.get(WifiConfigStore.EAP_KEY);
return getStringIndex(Eap.strings, eapMethod, Eap.NONE);
}
public void setPhase2Method(int phase2Method) {
switch (phase2Method) {
case Phase2.NONE:
- mFields.put(PHASE2_KEY, EMPTY_VALUE);
+ mFields.put(WifiConfigStore.PHASE2_KEY, WifiConfigStore.EMPTY_VALUE);
break;
/** Valid methods */
case Phase2.PAP:
case Phase2.MSCHAP:
case Phase2.MSCHAPV2:
case Phase2.GTC:
- mFields.put(PHASE2_KEY, convertToQuotedString(
+ mFields.put(WifiConfigStore.PHASE2_KEY, convertToQuotedString(
Phase2.PREFIX + Phase2.strings[phase2Method]));
break;
default:
* @return a phase 2 method defined at {@link Phase2}
* */
public int getPhase2Method() {
- String phase2Method = removeDoubleQuotes(mFields.get(PHASE2_KEY));
+ String phase2Method = removeDoubleQuotes(mFields.get(WifiConfigStore.PHASE2_KEY));
// Remove auth= prefix
if (phase2Method.startsWith(Phase2.PREFIX)) {
phase2Method = phase2Method.substring(Phase2.PREFIX.length());
* @param identity
*/
public void setIdentity(String identity) {
- setFieldValue(IDENTITY_KEY, identity, "");
+ setFieldValue(WifiConfigStore.IDENTITY_KEY, identity, "");
}
/**
* @return the identity
*/
public String getIdentity() {
- return getFieldValue(IDENTITY_KEY, "");
+ return getFieldValue(WifiConfigStore.IDENTITY_KEY, "");
}
/**
* @param anonymousIdentity the anonymous identity
*/
public void setAnonymousIdentity(String anonymousIdentity) {
- setFieldValue(ANON_IDENTITY_KEY, anonymousIdentity, "");
+ setFieldValue(WifiConfigStore.ANON_IDENTITY_KEY, anonymousIdentity, "");
}
/** Get the anonymous identity
* @return anonymous identity
*/
public String getAnonymousIdentity() {
- return getFieldValue(ANON_IDENTITY_KEY, "");
+ return getFieldValue(WifiConfigStore.ANON_IDENTITY_KEY, "");
}
/**
* @param password the password
*/
public void setPassword(String password) {
- setFieldValue(PASSWORD_KEY, password, "");
+ setFieldValue(WifiConfigStore.PASSWORD_KEY, password, "");
}
/**
* framework, returns "*".
*/
public String getPassword() {
- return getFieldValue(PASSWORD_KEY, "");
+ return getFieldValue(WifiConfigStore.PASSWORD_KEY, "");
}
/**
* @hide
*/
public void setCaCertificateAlias(String alias) {
- setFieldValue(CA_CERT_KEY, alias, CA_CERT_PREFIX);
+ setFieldValue(WifiConfigStore.CA_CERT_KEY, alias, WifiConfigStore.CA_CERT_PREFIX);
}
/**
* @hide
*/
public String getCaCertificateAlias() {
- return getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX);
+ return getFieldValue(WifiConfigStore.CA_CERT_KEY, WifiConfigStore.CA_CERT_PREFIX);
}
/**
/**
* Get CA certificate
- *
* @return X.509 CA certificate
*/
public X509Certificate getCaCertificate() {
}
/**
+ * @hide
+ */
+ public void resetCaCertificate() {
+ mCaCert = null;
+ }
+
+ /**
* Set Client certificate alias.
*
* <p> See the {@link android.security.KeyChain} for details on installing or choosing
* @hide
*/
public void setClientCertificateAlias(String alias) {
- setFieldValue(CLIENT_CERT_KEY, alias, CLIENT_CERT_PREFIX);
- setFieldValue(PRIVATE_KEY_ID_KEY, alias, Credentials.USER_PRIVATE_KEY);
+ setFieldValue(WifiConfigStore.CLIENT_CERT_KEY, alias, WifiConfigStore.CLIENT_CERT_PREFIX);
+ setFieldValue(WifiConfigStore.PRIVATE_KEY_ID_KEY, alias, Credentials.USER_PRIVATE_KEY);
// Also, set engine parameters
if (TextUtils.isEmpty(alias)) {
- mFields.put(ENGINE_KEY, ENGINE_DISABLE);
- mFields.put(ENGINE_ID_KEY, EMPTY_VALUE);
+ mFields.put(WifiConfigStore.ENGINE_KEY, WifiConfigStore.ENGINE_DISABLE);
+ mFields.put(WifiConfigStore.ENGINE_ID_KEY, WifiConfigStore.EMPTY_VALUE);
} else {
- mFields.put(ENGINE_KEY, ENGINE_ENABLE);
- mFields.put(ENGINE_ID_KEY, convertToQuotedString(ENGINE_ID_KEYSTORE));
+ mFields.put(WifiConfigStore.ENGINE_KEY, WifiConfigStore.ENGINE_ENABLE);
+ mFields.put(WifiConfigStore.ENGINE_ID_KEY,
+ convertToQuotedString(WifiConfigStore.ENGINE_ID_KEYSTORE));
}
}
* @hide
*/
public String getClientCertificateAlias() {
- return getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
+ return getFieldValue(WifiConfigStore.CLIENT_CERT_KEY, WifiConfigStore.CLIENT_CERT_PREFIX);
}
/**
return mClientCertificate;
}
- boolean needsKeyStore() {
- // Has no keys to be installed
- if (mClientCertificate == null && mCaCert == null) return false;
- return true;
- }
-
- static boolean isHardwareBackedKey(PrivateKey key) {
- return KeyChain.isBoundKeyAlgorithm(key.getAlgorithm());
- }
-
- static boolean hasHardwareBackedKey(Certificate certificate) {
- return KeyChain.isBoundKeyAlgorithm(certificate.getPublicKey().getAlgorithm());
- }
-
- boolean needsSoftwareBackedKeyStore() {
- return mNeedsSoftwareKeystore;
- }
-
- boolean installKeys(android.security.KeyStore keyStore, String name) {
- boolean ret = true;
- String privKeyName = Credentials.USER_PRIVATE_KEY + name;
- String userCertName = Credentials.USER_CERTIFICATE + name;
- String caCertName = Credentials.CA_CERTIFICATE + name;
- if (mClientCertificate != null) {
- byte[] privKeyData = mClientPrivateKey.getEncoded();
- if (isHardwareBackedKey(mClientPrivateKey)) {
- // Hardware backed key store is secure enough to store keys un-encrypted, this
- // removes the need for user to punch a PIN to get access to these keys
- if (DBG) Slog.d(TAG, "importing keys " + name + " in hardware backed " +
- "store");
- ret = keyStore.importKey(privKeyName, privKeyData, Process.WIFI_UID,
- KeyStore.FLAG_NONE);
- } else {
- // Software backed key store is NOT secure enough to store keys un-encrypted.
- // Save keys encrypted so they are protected with user's PIN. User will
- // have to unlock phone before being able to use these keys and connect to
- // networks.
- if (DBG) Slog.d(TAG, "importing keys " + name + " in software backed store");
- ret = keyStore.importKey(privKeyName, privKeyData, Process.WIFI_UID,
- KeyStore.FLAG_ENCRYPTED);
- mNeedsSoftwareKeystore = true;
- }
- if (ret == false) {
- return ret;
- }
-
- ret = putCertInKeyStore(keyStore, userCertName, mClientCertificate);
- if (ret == false) {
- // Remove private key installed
- keyStore.delKey(privKeyName, Process.WIFI_UID);
- return ret;
- }
- }
-
- if (mCaCert != null) {
- ret = putCertInKeyStore(keyStore, caCertName, mCaCert);
- if (ret == false) {
- if (mClientCertificate != null) {
- // Remove client key+cert
- keyStore.delKey(privKeyName, Process.WIFI_UID);
- keyStore.delete(userCertName, Process.WIFI_UID);
- }
- return ret;
- }
- }
-
- // Set alias names
- if (mClientCertificate != null) {
- setClientCertificateAlias(name);
- mClientPrivateKey = null;
- mClientCertificate = null;
- }
-
- if (mCaCert != null) {
- setCaCertificateAlias(name);
- mCaCert = null;
- }
-
- return ret;
- }
-
- private boolean putCertInKeyStore(android.security.KeyStore keyStore, String name,
- Certificate cert) {
- try {
- byte[] certData = Credentials.convertToPem(cert);
- if (DBG) Slog.d(TAG, "putting certificate " + name + " in keystore");
- return keyStore.put(name, certData, Process.WIFI_UID, KeyStore.FLAG_NONE);
-
- } catch (IOException e1) {
- return false;
- } catch (CertificateException e2) {
- return false;
- }
+ /**
+ * @hide
+ */
+ public void resetClientKeyEntry() {
+ mClientPrivateKey = null;
+ mClientCertificate = null;
}
- void removeKeys(KeyStore keyStore) {
- String client = getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
- // a valid client certificate is configured
- if (!TextUtils.isEmpty(client)) {
- if (DBG) Slog.d(TAG, "removing client private key and user cert");
- keyStore.delKey(Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID);
- keyStore.delete(Credentials.USER_CERTIFICATE + client, Process.WIFI_UID);
- }
-
- String ca = getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX);
- // a valid ca certificate is configured
- if (!TextUtils.isEmpty(ca)) {
- if (DBG) Slog.d(TAG, "removing CA cert");
- keyStore.delete(Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID);
- }
+ /**
+ * @hide
+ */
+ public PrivateKey getClientPrivateKey() {
+ return mClientPrivateKey;
}
/**
* @param subjectMatch substring to be matched
*/
public void setSubjectMatch(String subjectMatch) {
- setFieldValue(SUBJECT_MATCH_KEY, subjectMatch, "");
+ setFieldValue(WifiConfigStore.SUBJECT_MATCH_KEY, subjectMatch, "");
}
/**
* @return the subject match string
*/
public String getSubjectMatch() {
- return getFieldValue(SUBJECT_MATCH_KEY, "");
+ return getFieldValue(WifiConfigStore.SUBJECT_MATCH_KEY, "");
}
/** See {@link WifiConfiguration#getKeyIdForCredentials} @hide */
String getKeyId(WifiEnterpriseConfig current) {
- String eap = mFields.get(EAP_KEY);
- String phase2 = mFields.get(PHASE2_KEY);
+ String eap = mFields.get(WifiConfigStore.EAP_KEY);
+ String phase2 = mFields.get(WifiConfigStore.PHASE2_KEY);
// If either eap or phase2 are not initialized, use current config details
if (TextUtils.isEmpty((eap))) {
- eap = current.mFields.get(EAP_KEY);
+ eap = current.mFields.get(WifiConfigStore.EAP_KEY);
}
if (TextUtils.isEmpty(phase2)) {
- phase2 = current.mFields.get(PHASE2_KEY);
+ phase2 = current.mFields.get(WifiConfigStore.PHASE2_KEY);
}
return eap + "_" + phase2;
}
- /** Migrates the old style TLS config to the new config style. This should only be used
- * when restoring an old wpa_supplicant.conf or upgrading from a previous
- * platform version.
- * @return true if the config was updated
- * @hide
- */
- boolean migrateOldEapTlsNative(WifiNative wifiNative, int netId) {
- String oldPrivateKey = wifiNative.getNetworkVariable(netId, OLD_PRIVATE_KEY_NAME);
- /*
- * If the old configuration value is not present, then there is nothing
- * to do.
- */
- if (TextUtils.isEmpty(oldPrivateKey)) {
- return false;
- } else {
- // Also ignore it if it's empty quotes.
- oldPrivateKey = removeDoubleQuotes(oldPrivateKey);
- if (TextUtils.isEmpty(oldPrivateKey)) {
- return false;
- }
- }
-
- mFields.put(ENGINE_KEY, ENGINE_ENABLE);
- mFields.put(ENGINE_ID_KEY, convertToQuotedString(ENGINE_ID_KEYSTORE));
-
- /*
- * The old key started with the keystore:// URI prefix, but we don't
- * need that anymore. Trim it off if it exists.
- */
- final String keyName;
- if (oldPrivateKey.startsWith(KEYSTORE_URI)) {
- keyName = new String(oldPrivateKey.substring(KEYSTORE_URI.length()));
- } else {
- keyName = oldPrivateKey;
- }
- mFields.put(PRIVATE_KEY_ID_KEY, convertToQuotedString(keyName));
-
- wifiNative.setNetworkVariable(netId, ENGINE_KEY, mFields.get(ENGINE_KEY));
- wifiNative.setNetworkVariable(netId, ENGINE_ID_KEY, mFields.get(ENGINE_ID_KEY));
- wifiNative.setNetworkVariable(netId, PRIVATE_KEY_ID_KEY, mFields.get(PRIVATE_KEY_ID_KEY));
- // Remove old private_key string so we don't run this again.
- wifiNative.setNetworkVariable(netId, OLD_PRIVATE_KEY_NAME, EMPTY_VALUE);
- return true;
- }
-
- /** Migrate certs from global pool to wifi UID if not already done */
- void migrateCerts(android.security.KeyStore keyStore) {
- String client = getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
- // a valid client certificate is configured
- if (!TextUtils.isEmpty(client)) {
- if (!keyStore.contains(Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID)) {
- keyStore.duplicate(Credentials.USER_PRIVATE_KEY + client, -1,
- Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID);
- keyStore.duplicate(Credentials.USER_CERTIFICATE + client, -1,
- Credentials.USER_CERTIFICATE + client, Process.WIFI_UID);
- }
- }
-
- String ca = getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX);
- // a valid ca certificate is configured
- if (!TextUtils.isEmpty(ca)) {
- if (!keyStore.contains(Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID)) {
- keyStore.duplicate(Credentials.CA_CERTIFICATE + ca, -1,
- Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID);
- }
- }
- }
-
- void initializeSoftwareKeystoreFlag(android.security.KeyStore keyStore) {
- String client = getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
- if (!TextUtils.isEmpty(client)) {
- // a valid client certificate is configured
-
- // BUGBUG: keyStore.get() never returns certBytes; because it is not
- // taking WIFI_UID as a parameter. It always looks for certificate
- // with SYSTEM_UID, and never finds any Wifi certificates. Assuming that
- // all certificates need software keystore until we get the get() API
- // fixed.
-
- mNeedsSoftwareKeystore = true;
-
- /*
- try {
-
- if (DBG) Slog.d(TAG, "Loading client certificate " + Credentials
- .USER_CERTIFICATE + client);
-
- CertificateFactory factory = CertificateFactory.getInstance("X.509");
- if (factory == null) {
- Slog.e(TAG, "Error getting certificate factory");
- return;
- }
-
- byte[] certBytes = keyStore.get(Credentials.USER_CERTIFICATE + client);
- if (certBytes != null) {
- Certificate cert = (X509Certificate) factory.generateCertificate(
- new ByteArrayInputStream(certBytes));
-
- if (cert != null) {
- mNeedsSoftwareKeystore = hasHardwareBackedKey(cert);
-
- if (DBG) Slog.d(TAG, "Loaded client certificate " + Credentials
- .USER_CERTIFICATE + client);
- if (DBG) Slog.d(TAG, "It " + (mNeedsSoftwareKeystore ? "needs" :
- "does not need" ) + " software key store");
- } else {
- Slog.d(TAG, "could not generate certificate");
- }
- } else {
- Slog.e(TAG, "Could not load client certificate " + Credentials
- .USER_CERTIFICATE + client);
- mNeedsSoftwareKeystore = true;
- }
-
- } catch(CertificateException e) {
- Slog.e(TAG, "Could not read certificates");
- mCaCert = null;
- mClientCertificate = null;
- }
- */
- }
- }
-
private String removeDoubleQuotes(String string) {
if (TextUtils.isEmpty(string)) return "";
int length = string.length();
* @param key into the hash
* @param prefix is the prefix that the value may have
* @return value
+ * @hide
*/
- private String getFieldValue(String key, String prefix) {
+ String getFieldValue(String key, String prefix) {
String value = mFields.get(key);
// Uninitialized or known to be empty after reading from supplicant
- if (TextUtils.isEmpty(value) || EMPTY_VALUE.equals(value)) return "";
+ if (TextUtils.isEmpty(value) || WifiConfigStore.EMPTY_VALUE.equals(value)) return "";
value = removeDoubleQuotes(value);
if (value.startsWith(prefix)) {
*/
private void setFieldValue(String key, String value, String prefix) {
if (TextUtils.isEmpty(value)) {
- mFields.put(key, EMPTY_VALUE);
+ mFields.put(key, WifiConfigStore.EMPTY_VALUE);
} else {
mFields.put(key, convertToQuotedString(prefix + value));
}
}
+
+ /** Set a value with an optional prefix at key
+ * @param key into the hash
+ * @param value to be set
+ * @param prefix an optional value to be prefixed to actual value
+ * @hide
+ */
+ public void setFieldValue(String key, String value) {
+ if (TextUtils.isEmpty(value)) {
+ mFields.put(key, WifiConfigStore.EMPTY_VALUE);
+ } else {
+ mFields.put(key, convertToQuotedString(value));
+ }
+ }
+
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
import java.net.InetAddress;
import java.util.concurrent.CountDownLatch;
-import com.android.internal.R;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
import android.net.wifi.p2p.WifiP2pManager;
import android.net.wifi.p2p.WifiP2pService;
import android.os.BatteryStats;
-import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.INetworkManagementService;
import android.os.Message;
import android.os.SystemClock;
import android.provider.Settings;
-import android.provider.Settings.Secure;
-import android.util.Log;
import android.util.LruCache;
-import com.android.internal.R;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import android.os.Parcelable;
import android.os.Parcel;
-import java.util.BitSet;
-
/**
* A class representing Wi-Fi Protected Setup
*
import android.os.Parcel;
import android.net.wifi.p2p.WifiP2pDevice;
import android.text.TextUtils;
-import android.util.Log;
import java.util.ArrayList;
import java.util.Collection;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.IConnectivityManager;
import android.net.wifi.WpsInfo;
import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo;
import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceResponse;
import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
import android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo;
import android.net.wifi.p2p.nsd.WifiP2pUpnpServiceResponse;
-import android.os.Binder;
import android.os.Bundle;
-import android.os.IBinder;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.WorkSource;
import android.text.TextUtils;
import android.util.Log;
package android.net.wifi.p2p;
-import android.os.Parcelable;
-import android.os.Parcel;
-import android.util.Log;
-
/**
* A class representing a Wi-Fi p2p provisional discovery request/response
* See {@link #WifiP2pProvDiscEvent} for supported types
import android.app.AlertDialog;
import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.net.IConnectivityManager;
import android.net.ConnectivityManager;
import android.net.DhcpResults;
import android.net.DhcpStateMachine;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
-import android.net.LinkProperties;
import android.net.NetworkInfo;
import android.net.NetworkUtils;
-import android.net.wifi.WifiManager;
import android.net.wifi.WifiMonitor;
import android.net.wifi.WifiNative;
import android.net.wifi.WifiStateMachine;
import android.os.Bundle;
import android.os.IBinder;
import android.os.INetworkManagementService;
-import android.os.Handler;
-import android.os.HandlerThread;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
import android.widget.TextView;
import com.android.internal.R;
-import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.util.AsyncChannel;
import com.android.internal.util.Protocol;
import com.android.internal.util.State;