Merge "Remove kStatusInvoke & kStatusDraw"
diff --git a/Android.mk b/Android.mk
index eeec9458..58eae8a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -289,6 +289,7 @@
telephony/java/com/android/internal/telephony/ISms.aidl \
telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
wifi/java/android/net/wifi/IWifiManager.aidl \
+ wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl \
wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
packages/services/PacProcessor/com/android/net/IProxyService.aidl \
packages/services/Proxy/com/android/net/IProxyCallback.aidl \
diff --git a/api/current.txt b/api/current.txt
index 190397b..4265417 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -2186,6 +2186,7 @@
field public static final int Widget_Holo_Light_ActionMode_Inverse = 16974119; // 0x1030127
field public static final int Widget_Holo_Light_AutoCompleteTextView = 16974011; // 0x10300bb
field public static final int Widget_Holo_Light_Button = 16974006; // 0x10300b6
+ field public static final int Widget_Holo_Light_Button_Borderless = 16974538; // 0x10302ca
field public static final int Widget_Holo_Light_Button_Borderless_Small = 16974107; // 0x103011b
field public static final int Widget_Holo_Light_Button_Inset = 16974008; // 0x10300b8
field public static final int Widget_Holo_Light_Button_Small = 16974007; // 0x10300b7
@@ -6489,6 +6490,7 @@
field public static final java.lang.String USER_SERVICE = "user";
field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
+ field public static final java.lang.String WIFI_HOTSPOT_SERVICE = "wifihotspot";
field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
field public static final java.lang.String WIFI_SERVICE = "wifi";
field public static final java.lang.String WINDOW_SERVICE = "window";
@@ -6920,6 +6922,7 @@
field public static final java.lang.String CATEGORY_LEANBACK_LAUNCHER = "android.intent.category.LEANBACK_LAUNCHER";
field public static final java.lang.String CATEGORY_LE_DESK_DOCK = "android.intent.category.LE_DESK_DOCK";
field public static final java.lang.String CATEGORY_MONKEY = "android.intent.category.MONKEY";
+ field public static final java.lang.String CATEGORY_NOTIFICATION_PREFERENCES = "android.intent.category.NOTIFICATION_PREFERENCES";
field public static final java.lang.String CATEGORY_OPENABLE = "android.intent.category.OPENABLE";
field public static final java.lang.String CATEGORY_PREFERENCE = "android.intent.category.PREFERENCE";
field public static final java.lang.String CATEGORY_SAMPLE_CODE = "android.intent.category.SAMPLE_CODE";
@@ -16198,6 +16201,19 @@
}
+package android.net.wifi.hotspot {
+
+ public abstract interface IWifiHotspotManager implements android.os.IInterface {
+ method public abstract void test() throws android.os.RemoteException;
+ }
+
+ public class WifiHotspotManager {
+ ctor public WifiHotspotManager(android.content.Context, android.net.wifi.hotspot.IWifiHotspotManager);
+ method public void test();
+ }
+
+}
+
package android.net.wifi.p2p {
public class WifiP2pConfig implements android.os.Parcelable {
@@ -27823,9 +27839,9 @@
field public static final java.lang.String GOOD_IRI_CHAR = "a-zA-Z0-9\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef";
field public static final java.util.regex.Pattern IP_ADDRESS;
field public static final java.util.regex.Pattern PHONE;
- field public static final java.util.regex.Pattern TOP_LEVEL_DOMAIN;
- field public static final java.lang.String TOP_LEVEL_DOMAIN_STR = "((aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(biz|b[abdefghijmnorstvwyz])|(cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(edu|e[cegrstu])|f[ijkmor]|(gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(info|int|i[delmnoqrst])|(jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(name|net|n[acefgilopruz])|(org|om)|(pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw])";
- field public static final java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw]))";
+ field public static final deprecated java.util.regex.Pattern TOP_LEVEL_DOMAIN;
+ field public static final deprecated java.lang.String TOP_LEVEL_DOMAIN_STR = "((aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(biz|b[abdefghijmnorstvwyz])|(cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(edu|e[cegrstu])|f[ijkmor]|(gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(info|int|i[delmnoqrst])|(jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(name|net|n[acefgilopruz])|(org|om)|(pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw])";
+ field public static final deprecated java.lang.String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL = "(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(?:\u03b4\u03bf\u03ba\u03b9\u03bc\u03ae|\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435|\u0440\u0444|\u0441\u0440\u0431|\u05d8\u05e2\u05e1\u05d8|\u0622\u0632\u0645\u0627\u06cc\u0634\u06cc|\u0625\u062e\u062a\u0628\u0627\u0631|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0628\u06be\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0633\u0648\u0631\u064a\u0629|\u0641\u0644\u0633\u0637\u064a\u0646|\u0642\u0637\u0631|\u0645\u0635\u0631|\u092a\u0930\u0940\u0915\u094d\u0937\u093e|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|\u0baa\u0bb0\u0bbf\u0b9f\u0bcd\u0b9a\u0bc8|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0dbd\u0d82\u0d9a\u0dcf|\u0e44\u0e17\u0e22|\u30c6\u30b9\u30c8|\u4e2d\u56fd|\u4e2d\u570b|\u53f0\u6e7e|\u53f0\u7063|\u65b0\u52a0\u5761|\u6d4b\u8bd5|\u6e2c\u8a66|\u9999\u6e2f|\ud14c\uc2a4\ud2b8|\ud55c\uad6d|xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-3e0b707e|xn\\-\\-45brj9c|xn\\-\\-80akhbyknj4f|xn\\-\\-90a3ac|xn\\-\\-9t4b11yi5a|xn\\-\\-clchc0ea0b2g2a9gcd|xn\\-\\-deba0ad|xn\\-\\-fiqs8s|xn\\-\\-fiqz9s|xn\\-\\-fpcrj9c3d|xn\\-\\-fzc2c9e2c|xn\\-\\-g6w251d|xn\\-\\-gecrj9c|xn\\-\\-h2brj9c|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-j6w193g|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-kprw13d|xn\\-\\-kpry57d|xn\\-\\-lgbbat1ad8j|xn\\-\\-mgbaam7a8h|xn\\-\\-mgbayh7gpa|xn\\-\\-mgbbh1a71e|xn\\-\\-mgbc0a9azcg|xn\\-\\-mgberp4a5d4ar|xn\\-\\-o3cw4h|xn\\-\\-ogbpf8fl|xn\\-\\-p1ai|xn\\-\\-pgbs0dh|xn\\-\\-s9brj9c|xn\\-\\-wgbh1c|xn\\-\\-wgbl6a|xn\\-\\-xkc2al3hye2a|xn\\-\\-xkc2dl3a5ee0h|xn\\-\\-yfro4i67o|xn\\-\\-ygbi2ammx|xn\\-\\-zckzah|xxx)|y[et]|z[amw]))";
field public static final java.util.regex.Pattern WEB_URL;
}
@@ -28298,6 +28314,7 @@
method public android.os.Vibrator getVibrator();
method public boolean[] hasKeys(int...);
method public boolean isVirtual();
+ method public boolean supportsSource(int);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
field public static final int KEYBOARD_TYPE_ALPHABETIC = 2; // 0x2
diff --git a/core/java/android/animation/RevealAnimator.java b/core/java/android/animation/RevealAnimator.java
new file mode 100644
index 0000000..77a536a
--- /dev/null
+++ b/core/java/android/animation/RevealAnimator.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2014 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.view.View;
+
+import java.util.ArrayList;
+
+/**
+ * Reveals a View with an animated clipping circle.
+ * The clipping is implemented efficiently by talking to a private reveal API on View.
+ * This hidden class currently only accessed by the {@link android.view.View}.
+ *
+ * @hide
+ */
+public class RevealAnimator extends ValueAnimator {
+ private final static String LOGTAG = "RevealAnimator";
+ private ValueAnimator.AnimatorListener mListener;
+ private ValueAnimator.AnimatorUpdateListener mUpdateListener;
+ private RevealCircle mReuseRevealCircle = new RevealCircle(0);
+ private RevealAnimator(final View clipView, final int x, final int y,
+ float startRadius, float endRadius, final boolean inverseClip) {
+
+ setObjectValues(new RevealCircle(startRadius), new RevealCircle(endRadius));
+ setEvaluator(new RevealCircleEvaluator(mReuseRevealCircle));
+
+ mUpdateListener = new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ RevealCircle circle = (RevealCircle) animation.getAnimatedValue();
+ float radius = circle.getRadius();
+ clipView.setRevealClip(true, inverseClip, x, y, radius);
+ }
+ };
+ mListener = new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ clipView.setRevealClip(false, false, 0, 0, 0);
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ clipView.setRevealClip(false, false, 0, 0, 0);
+ }
+ };
+ addUpdateListener(mUpdateListener);
+ addListener(mListener);
+ }
+
+ public static RevealAnimator ofRevealCircle(View clipView, int x, int y,
+ float startRadius, float endRadius, boolean inverseClip) {
+ RevealAnimator anim = new RevealAnimator(clipView, x, y,
+ startRadius, endRadius, inverseClip);
+ return anim;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void removeAllUpdateListeners() {
+ super.removeAllUpdateListeners();
+ addUpdateListener(mUpdateListener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void removeAllListeners() {
+ super.removeAllListeners();
+ addListener(mListener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ArrayList<AnimatorListener> getListeners() {
+ ArrayList<AnimatorListener> allListeners =
+ (ArrayList<AnimatorListener>) super.getListeners().clone();
+ allListeners.remove(mListener);
+ return allListeners;
+ }
+
+ private class RevealCircle {
+ float mRadius;
+
+ public RevealCircle(float radius) {
+ mRadius = radius;
+ }
+
+ public void setRadius(float radius) {
+ mRadius = radius;
+ }
+
+ public float getRadius() {
+ return mRadius;
+ }
+ }
+
+ private class RevealCircleEvaluator implements TypeEvaluator<RevealCircle> {
+
+ private RevealCircle mRevealCircle;
+
+ public RevealCircleEvaluator() {
+ }
+
+ public RevealCircleEvaluator(RevealCircle reuseCircle) {
+ mRevealCircle = reuseCircle;
+ }
+
+ @Override
+ public RevealCircle evaluate(float fraction, RevealCircle startValue,
+ RevealCircle endValue) {
+ float currentRadius = startValue.mRadius
+ + ((endValue.mRadius - startValue.mRadius) * fraction);
+ if (mRevealCircle == null) {
+ return new RevealCircle(currentRadius);
+ } else {
+ mRevealCircle.setRadius(currentRadius);
+ return mRevealCircle;
+ }
+ }
+ }
+}
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 589c82f..b2b2571 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -75,6 +75,8 @@
import android.net.nsd.NsdManager;
import android.net.wifi.IWifiManager;
import android.net.wifi.WifiManager;
+import android.net.wifi.hotspot.IWifiHotspotManager;
+import android.net.wifi.hotspot.WifiHotspotManager;
import android.net.wifi.p2p.IWifiP2pManager;
import android.net.wifi.p2p.WifiP2pManager;
import android.nfc.NfcManager;
@@ -552,6 +554,13 @@
return new WifiManager(ctx.getOuterContext(), service);
}});
+ registerService(WIFI_HOTSPOT_SERVICE, new ServiceFetcher() {
+ public Object createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(WIFI_HOTSPOT_SERVICE);
+ IWifiHotspotManager service = IWifiHotspotManager.Stub.asInterface(b);
+ return new WifiHotspotManager(ctx.getOuterContext(), service);
+ }});
+
registerService(WIFI_P2P_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(WIFI_P2P_SERVICE);
diff --git a/core/java/android/app/admin/DeviceAdminInfo.java b/core/java/android/app/admin/DeviceAdminInfo.java
index 66fc816..3074b49 100644
--- a/core/java/android/app/admin/DeviceAdminInfo.java
+++ b/core/java/android/app/admin/DeviceAdminInfo.java
@@ -52,6 +52,22 @@
static final String TAG = "DeviceAdminInfo";
/**
+ * A type of policy that this device admin can use: device owner meta-policy
+ * for an admin that is designated as owner of the device.
+ *
+ * @hide
+ */
+ public static final int USES_POLICY_DEVICE_OWNER = -2;
+
+ /**
+ * A type of policy that this device admin can use: profile owner meta-policy
+ * for admins that have been installed as owner of some user profile.
+ *
+ * @hide
+ */
+ public static final int USES_POLICY_PROFILE_OWNER = -1;
+
+ /**
* A type of policy that this device admin can use: limit the passwords
* that the user can select, via {@link DevicePolicyManager#setPasswordQuality}
* and {@link DevicePolicyManager#setPasswordMinimumLength}.
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 9f0c384..cd91f3b 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1974,6 +1974,7 @@
//@hide: NETWORK_STATS_SERVICE,
//@hide: NETWORK_POLICY_SERVICE,
WIFI_SERVICE,
+ WIFI_HOTSPOT_SERVICE,
WIFI_P2P_SERVICE,
NSD_SERVICE,
AUDIO_SERVICE,
@@ -2324,6 +2325,16 @@
/**
* Use with {@link #getSystemService} to retrieve a {@link
+ * android.net.wifi.hotspot.WifiHotspotManager} for handling management of
+ * Wi-Fi hotspot access.
+ *
+ * @see #getSystemService
+ * @see android.net.wifi.hotspot.WifiHotspotManager
+ */
+ public static final String WIFI_HOTSPOT_SERVICE = "wifihotspot";
+
+ /**
+ * Use with {@link #getSystemService} to retrieve a {@link
* android.net.wifi.p2p.WifiP2pManager} for handling management of
* Wi-Fi peer-to-peer connections.
*
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 102433b..d189a34 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2884,6 +2884,14 @@
@SdkConstant(SdkConstantType.INTENT_CATEGORY)
public static final String CATEGORY_CAR_MODE = "android.intent.category.CAR_MODE";
+ /**
+ * An activity that provides a user interface for adjusting notification preferences for its
+ * containing application. Optional but recommended for apps that post
+ * {@link android.app.Notification Notifications}.
+ */
+ @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+ public static final String CATEGORY_NOTIFICATION_PREFERENCES = "android.intent.category.NOTIFICATION_PREFERENCES";
+
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Application launch intent categories (see addCategory()).
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 37bead8..ff77580 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -1093,8 +1093,8 @@
*
* @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
*/
- public static final Key<Byte> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
- new Key<Byte>("android.sensor.availableTestPatternModes", byte.class);
+ public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
+ new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
/**
* <p>Which face detection modes are available,
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 42c8e3da..679310a 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -1002,8 +1002,11 @@
* controls; the camera device will ignore those settings while
* USE_SCENE_MODE is active (except for FACE_PRIORITY
* scene mode). Other control entries are still active.
- * This setting can only be used if availableSceneModes !=
- * UNSUPPORTED</p>
+ * This setting can only be used if scene mode is supported
+ * (i.e. {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes} contain some modes
+ * other than DISABLED).</p>
+ *
+ * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
* @see CaptureRequest#CONTROL_MODE
*/
public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
diff --git a/core/java/android/util/Patterns.java b/core/java/android/util/Patterns.java
index 0f8da44..13cc88b 100644
--- a/core/java/android/util/Patterns.java
+++ b/core/java/android/util/Patterns.java
@@ -28,7 +28,12 @@
* List accurate as of 2011/07/18. List taken from:
* http://data.iana.org/TLD/tlds-alpha-by-domain.txt
* This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py
+ *
+ * @deprecated Due to the recent profileration of gTLDs, this API is
+ * expected to become out-of-date very quickly. Therefore it is now
+ * deprecated.
*/
+ @Deprecated
public static final String TOP_LEVEL_DOMAIN_STR =
"((aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
+ "|(biz|b[abdefghijmnorstvwyz])"
@@ -59,7 +64,9 @@
/**
* Regular expression pattern to match all IANA top-level domains.
+ * @deprecated This API is deprecated. See {@link #TOP_LEVEL_DOMAIN_STR}.
*/
+ @Deprecated
public static final Pattern TOP_LEVEL_DOMAIN =
Pattern.compile(TOP_LEVEL_DOMAIN_STR);
@@ -68,7 +75,10 @@
* List accurate as of 2011/07/18. List taken from:
* http://data.iana.org/TLD/tlds-alpha-by-domain.txt
* This pattern is auto-generated by frameworks/ex/common/tools/make-iana-tld-pattern.py
+ *
+ * @deprecated This API is deprecated. See {@link #TOP_LEVEL_DOMAIN_STR}.
*/
+ @Deprecated
public static final String TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL =
"(?:"
+ "(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
@@ -107,6 +117,24 @@
public static final String GOOD_IRI_CHAR =
"a-zA-Z0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF";
+ public static final Pattern IP_ADDRESS
+ = Pattern.compile(
+ "((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
+ + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
+ + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
+ + "|[1-9][0-9]|[0-9]))");
+
+ /**
+ * RFC 1035 Section 2.3.4 limits the labels to a maximum 63 octets.
+ */
+ private static final String IRI
+ = "[" + GOOD_IRI_CHAR + "]([" + GOOD_IRI_CHAR + "\\-]{0,61}[" + GOOD_IRI_CHAR + "]){0,1}";
+
+ private static final String HOST_NAME = IRI + "(?:\\." + IRI + ")+";
+
+ public static final Pattern DOMAIN_NAME
+ = Pattern.compile("(" + HOST_NAME + "|" + IP_ADDRESS + ")");
+
/**
* Regular expression pattern to match most part of RFC 3987
* Internationalized URLs, aka IRIs. Commonly used Unicode characters are
@@ -116,13 +144,7 @@
"((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
- + "((?:(?:[" + GOOD_IRI_CHAR + "][" + GOOD_IRI_CHAR + "\\-]{0,64}\\.)+" // named host
- + TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL
- + "|(?:(?:25[0-5]|2[0-4]" // or ip address
- + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]"
- + "|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1]"
- + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
- + "|[1-9][0-9]|[0-9])))"
+ + "(?:" + DOMAIN_NAME + ")"
+ "(?:\\:\\d{1,5})?)" // plus option port number
+ "(\\/(?:(?:[" + GOOD_IRI_CHAR + "\\;\\/\\?\\:\\@\\&\\=\\#\\~" // plus option query params
+ "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?"
@@ -130,19 +152,6 @@
// input. This is to stop foo.sure from
// matching as foo.su
- public static final Pattern IP_ADDRESS
- = Pattern.compile(
- "((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
- + "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
- + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
- + "|[1-9][0-9]|[0-9]))");
-
- public static final Pattern DOMAIN_NAME
- = Pattern.compile(
- "(((([" + GOOD_IRI_CHAR + "][" + GOOD_IRI_CHAR + "\\-]*)*[" + GOOD_IRI_CHAR + "]\\.)+"
- + TOP_LEVEL_DOMAIN + ")|"
- + IP_ADDRESS + ")");
-
public static final Pattern EMAIL_ADDRESS
= Pattern.compile(
"[a-zA-Z0-9\\+\\.\\_\\%\\-\\+]{1,256}" +
@@ -159,7 +168,7 @@
* might be phone numbers in arbitrary text, not for validating whether
* something is in fact a phone number. It will miss many things that
* are legitimate phone numbers.
- *
+ *
* <p> The pattern matches the following:
* <ul>
* <li>Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index abae068..477c994 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -52,7 +52,7 @@
*/
final class AccessibilityInteractionController {
- private static final boolean ENFORCE_NODE_TREE_CONSISTENT = Build.IS_DEBUGGABLE;
+ private static final boolean ENFORCE_NODE_TREE_CONSISTENT = false;
private final ArrayList<AccessibilityNodeInfo> mTempAccessibilityNodeInfoList =
new ArrayList<AccessibilityNodeInfo>();
diff --git a/core/java/android/view/GLRenderer.java b/core/java/android/view/GLRenderer.java
index f083148..125d11e 100644
--- a/core/java/android/view/GLRenderer.java
+++ b/core/java/android/view/GLRenderer.java
@@ -1202,7 +1202,7 @@
private RenderNode buildDisplayList(View view, HardwareCanvas canvas) {
if (mDrawDelta <= 0) {
- return view.mDisplayList;
+ return view.mRenderNode;
}
view.mRecreateDisplayList = (view.mPrivateFlags & View.PFLAG_INVALIDATED)
@@ -1213,12 +1213,12 @@
canvas.clearLayerUpdates();
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "getDisplayList");
- RenderNode displayList = view.getDisplayList();
+ RenderNode renderNode = view.getDisplayList();
Trace.traceEnd(Trace.TRACE_TAG_VIEW);
endBuildDisplayListProfiling(buildDisplayListStartTime);
- return displayList;
+ return renderNode;
}
private Rect beginFrame(HardwareCanvas canvas, Rect dirty, int surfaceState) {
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index 0b12cbe..ae5f37e 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -579,6 +579,18 @@
}
/**
+ * Determines whether the input device supports the given source or sources.
+ *
+ * @param source The input source or sources to check against. This can be a generic device
+ * type such as {@link InputDevice#SOURCE_MOUSE}, a more generic device class, such as
+ * {@link InputDevice#SOURCE_CLASS_POINTER}, or a combination of sources bitwise ORed together.
+ * @return Whether the device can produce all of the given sources.
+ */
+ public boolean supportsSource(int source) {
+ return (mSources & source) == source;
+ }
+
+ /**
* Gets the keyboard type.
* @return The keyboard type.
*/
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index c4fac46..e19bda9 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -590,6 +590,7 @@
Object[] args = mConstructorArgs;
args[1] = attrs;
+ constructor.setAccessible(true);
final View view = constructor.newInstance(args);
if (view instanceof ViewStub) {
// always use ourselves when inflating ViewStub later
diff --git a/core/java/android/view/RenderNode.java b/core/java/android/view/RenderNode.java
index 6c8c3c7..a27c313 100644
--- a/core/java/android/view/RenderNode.java
+++ b/core/java/android/view/RenderNode.java
@@ -269,8 +269,8 @@
}
/**
- * Returns whether the display list is currently usable. If this returns false,
- * the display list should be re-recorded prior to replaying it.
+ * Returns whether the RenderNode's display list content is currently usable.
+ * If this returns false, the display list should be re-recorded prior to replaying it.
*
* @return boolean true if the display list is able to be replayed, false otherwise.
*/
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index f2b9b96..50d4df3 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -16,6 +16,8 @@
package android.view;
+import android.animation.RevealAnimator;
+import android.animation.ValueAnimator;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -3549,13 +3551,13 @@
private Bitmap mUnscaledDrawingCache;
/**
- * Display list used for the View content.
+ * RenderNode holding View properties, potentially holding a DisplayList of View content.
* <p>
* When non-null and valid, this is expected to contain an up-to-date copy
- * of the View content. It is cleared on temporary detach and reset on
+ * of the View content. Its DisplayList content is cleared on temporary detach and reset on
* cleanup.
*/
- RenderNode mDisplayList;
+ RenderNode mRenderNode;
/**
* Set to true when the view is sending hover accessibility events because it
@@ -9016,10 +9018,13 @@
* @return True if the event was handled, false otherwise.
*/
public boolean onTouchEvent(MotionEvent event) {
+ final float x = event.getX();
+ final float y = event.getY();
final int viewFlags = mViewFlags;
if ((viewFlags & ENABLED_MASK) == DISABLED) {
if (event.getAction() == MotionEvent.ACTION_UP && (mPrivateFlags & PFLAG_PRESSED) != 0) {
+ clearHotspot(R.attr.state_pressed);
setPressed(false);
}
// A disabled view that is clickable still consumes the touch
@@ -9052,6 +9057,7 @@
// showed it as pressed. Make it show the pressed
// state now (before scheduling the click) to ensure
// the user sees it.
+ setHotspot(R.attr.state_pressed, x, y);
setPressed(true);
}
@@ -9084,6 +9090,7 @@
// If the post failed, unpress right now
mUnsetPressedState.run();
}
+
removeTapCallback();
}
break;
@@ -9105,23 +9112,26 @@
if (mPendingCheckForTap == null) {
mPendingCheckForTap = new CheckForTap();
}
+ mPendingCheckForTap.x = event.getX();
+ mPendingCheckForTap.y = event.getY();
postDelayed(mPendingCheckForTap, ViewConfiguration.getTapTimeout());
} else {
// Not inside a scrolling container, so show the feedback right away
+ setHotspot(R.attr.state_pressed, x, y);
setPressed(true);
checkForLongClick(0);
}
break;
case MotionEvent.ACTION_CANCEL:
+ clearHotspot(R.attr.state_pressed);
setPressed(false);
removeTapCallback();
removeLongPressCallback();
break;
case MotionEvent.ACTION_MOVE:
- final int x = (int) event.getX();
- final int y = (int) event.getY();
+ setHotspot(R.attr.state_pressed, x, y);
// Be lenient about moving outside of buttons
if (!pointInView(x, y, mTouchSlop)) {
@@ -9137,46 +9147,24 @@
break;
}
- if (mBackground != null && mBackground.supportsHotspots()) {
- manageTouchHotspot(event);
- }
-
return true;
}
return false;
}
- private void manageTouchHotspot(MotionEvent event) {
- switch (event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- case MotionEvent.ACTION_POINTER_DOWN: {
- final int index = event.getActionIndex();
- setPointerHotspot(event, index);
- } break;
- case MotionEvent.ACTION_MOVE: {
- final int count = event.getPointerCount();
- for (int index = 0; index < count; index++) {
- setPointerHotspot(event, index);
- }
- } break;
- case MotionEvent.ACTION_POINTER_UP: {
- final int actionIndex = event.getActionIndex();
- final int pointerId = event.getPointerId(actionIndex);
- mBackground.removeHotspot(pointerId);
- } break;
- case MotionEvent.ACTION_UP:
- case MotionEvent.ACTION_CANCEL:
- mBackground.clearHotspots();
- break;
+ private void setHotspot(int id, float x, float y) {
+ final Drawable bg = mBackground;
+ if (bg != null && bg.supportsHotspots()) {
+ bg.setHotspot(id, x, y);
}
}
- private void setPointerHotspot(MotionEvent event, int index) {
- final int id = event.getPointerId(index);
- final float x = event.getX(index);
- final float y = event.getY(index);
- mBackground.setHotspot(id, x, y);
+ private void clearHotspot(int id) {
+ final Drawable bg = mBackground;
+ if (bg != null && bg.supportsHotspots()) {
+ bg.removeHotspot(id);
+ }
}
/**
@@ -9731,6 +9719,12 @@
}
}
+ void ensureRenderNode() {
+ if (mRenderNode == null) {
+ mRenderNode = RenderNode.create(getClass().getName());
+ }
+ }
+
/**
* Recomputes the transform matrix if necessary.
*/
@@ -9873,8 +9867,8 @@
info.mMatrixDirty = true;
invalidateViewProperty(false, false);
- if (mDisplayList != null) {
- mDisplayList.setCameraDistance(-Math.abs(distance) / dpi);
+ if (mRenderNode != null) {
+ mRenderNode.setCameraDistance(-Math.abs(distance) / dpi);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -9919,8 +9913,8 @@
info.mRotation = rotation;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setRotation(rotation);
+ if (mRenderNode != null) {
+ mRenderNode.setRotation(rotation);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -9970,8 +9964,8 @@
info.mRotationY = rotationY;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setRotationY(rotationY);
+ if (mRenderNode != null) {
+ mRenderNode.setRotationY(rotationY);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10021,8 +10015,8 @@
info.mRotationX = rotationX;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setRotationX(rotationX);
+ if (mRenderNode != null) {
+ mRenderNode.setRotationX(rotationX);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10064,8 +10058,8 @@
info.mScaleX = scaleX;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setScaleX(scaleX);
+ if (mRenderNode != null) {
+ mRenderNode.setScaleX(scaleX);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10107,8 +10101,8 @@
info.mScaleY = scaleY;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setScaleY(scaleY);
+ if (mRenderNode != null) {
+ mRenderNode.setScaleY(scaleY);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10160,8 +10154,8 @@
info.mPivotX = pivotX;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setPivotX(pivotX);
+ if (mRenderNode != null) {
+ mRenderNode.setPivotX(pivotX);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10212,8 +10206,8 @@
info.mPivotY = pivotY;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setPivotY(pivotY);
+ if (mRenderNode != null) {
+ mRenderNode.setPivotY(pivotY);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10296,8 +10290,8 @@
} else {
mPrivateFlags &= ~PFLAG_ALPHA_SET;
invalidateViewProperty(true, false);
- if (mDisplayList != null) {
- mDisplayList.setAlpha(getFinalAlpha());
+ if (mRenderNode != null) {
+ mRenderNode.setAlpha(getFinalAlpha());
}
}
}
@@ -10323,8 +10317,8 @@
return true;
} else {
mPrivateFlags &= ~PFLAG_ALPHA_SET;
- if (mDisplayList != null) {
- mDisplayList.setAlpha(getFinalAlpha());
+ if (mRenderNode != null) {
+ mRenderNode.setAlpha(getFinalAlpha());
}
}
}
@@ -10346,8 +10340,8 @@
mTransformationInfo.mTransitionAlpha = alpha;
mPrivateFlags &= ~PFLAG_ALPHA_SET;
invalidateViewProperty(true, false);
- if (mDisplayList != null) {
- mDisplayList.setAlpha(getFinalAlpha());
+ if (mRenderNode != null) {
+ mRenderNode.setAlpha(getFinalAlpha());
}
}
}
@@ -10420,8 +10414,8 @@
int oldHeight = mBottom - mTop;
mTop = top;
- if (mDisplayList != null) {
- mDisplayList.setTop(mTop);
+ if (mRenderNode != null) {
+ mRenderNode.setTop(mTop);
}
sizeChange(width, mBottom - mTop, width, oldHeight);
@@ -10493,8 +10487,8 @@
int oldHeight = mBottom - mTop;
mBottom = bottom;
- if (mDisplayList != null) {
- mDisplayList.setBottom(mBottom);
+ if (mRenderNode != null) {
+ mRenderNode.setBottom(mBottom);
}
sizeChange(width, mBottom - mTop, width, oldHeight);
@@ -10560,8 +10554,8 @@
int height = mBottom - mTop;
mLeft = left;
- if (mDisplayList != null) {
- mDisplayList.setLeft(left);
+ if (mRenderNode != null) {
+ mRenderNode.setLeft(left);
}
sizeChange(mRight - mLeft, height, oldWidth, height);
@@ -10624,8 +10618,8 @@
int height = mBottom - mTop;
mRight = right;
- if (mDisplayList != null) {
- mDisplayList.setRight(mRight);
+ if (mRenderNode != null) {
+ mRenderNode.setRight(mRight);
}
sizeChange(mRight - mLeft, height, oldWidth, height);
@@ -10725,8 +10719,8 @@
info.mTranslationX = translationX;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setTranslationX(translationX);
+ if (mRenderNode != null) {
+ mRenderNode.setTranslationX(translationX);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10766,8 +10760,8 @@
info.mTranslationY = translationY;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setTranslationY(translationY);
+ if (mRenderNode != null) {
+ mRenderNode.setTranslationY(translationY);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10799,8 +10793,8 @@
info.mTranslationZ = translationZ;
info.mMatrixDirty = true;
invalidateViewProperty(false, true);
- if (mDisplayList != null) {
- mDisplayList.setTranslationZ(translationZ);
+ if (mRenderNode != null) {
+ mRenderNode.setTranslationZ(translationZ);
}
if ((mPrivateFlags2 & PFLAG2_VIEW_QUICK_REJECTED) == PFLAG2_VIEW_QUICK_REJECTED) {
// View was rejected last time it was drawn by its parent; this may have changed
@@ -10810,6 +10804,18 @@
}
/**
+ * Returns a ValueAnimator which can be used to run a reveal animation,
+ * clipping the content of the view to a circle.
+ *
+ * TODO: Make this a public API.
+ * @hide
+ */
+ public final ValueAnimator createRevealAnimator(int x, int y,
+ float startRadius, float endRadius, boolean inverseClip) {
+ return RevealAnimator.ofRevealCircle(this, x, y, startRadius, endRadius, inverseClip);
+ }
+
+ /**
* Sets the outline of the view, which defines the shape of the shadow it
* casts, and can used for clipping.
* <p>
@@ -10839,8 +10845,8 @@
mOutline.set(outline);
}
- if (mDisplayList != null) {
- mDisplayList.setOutline(mOutline);
+ if (mRenderNode != null) {
+ mRenderNode.setOutline(mOutline);
}
}
@@ -10876,8 +10882,8 @@
} else {
mPrivateFlags3 &= ~PFLAG3_CLIP_TO_OUTLINE;
}
- if (mDisplayList != null) {
- mDisplayList.setClipToOutline(clipToOutline);
+ if (mRenderNode != null) {
+ mRenderNode.setClipToOutline(clipToOutline);
}
}
}
@@ -10889,8 +10895,10 @@
*/
public void setRevealClip(boolean shouldClip, boolean inverseClip,
float x, float y, float radius) {
- if (mDisplayList != null) {
- mDisplayList.setRevealClip(shouldClip, inverseClip, x, y, radius);
+ if (mRenderNode != null) {
+ mRenderNode.setRevealClip(shouldClip, inverseClip, x, y, radius);
+ // TODO: Handle this invalidate in a better way, or purely in native.
+ invalidate();
}
}
@@ -11000,7 +11008,7 @@
final boolean matrixIsIdentity = mTransformationInfo == null
|| mTransformationInfo.mMatrixIsIdentity;
if (matrixIsIdentity) {
- if (mDisplayList != null) {
+ if (mRenderNode != null) {
invalidateViewProperty(false, false);
} else {
final ViewParent p = mParent;
@@ -11028,8 +11036,8 @@
mTop += offset;
mBottom += offset;
- if (mDisplayList != null) {
- mDisplayList.offsetTopAndBottom(offset);
+ if (mRenderNode != null) {
+ mRenderNode.offsetTopAndBottom(offset);
invalidateViewProperty(false, false);
} else {
if (!matrixIsIdentity) {
@@ -11051,7 +11059,7 @@
final boolean matrixIsIdentity = mTransformationInfo == null
|| mTransformationInfo.mMatrixIsIdentity;
if (matrixIsIdentity) {
- if (mDisplayList != null) {
+ if (mRenderNode != null) {
invalidateViewProperty(false, false);
} else {
final ViewParent p = mParent;
@@ -11076,8 +11084,8 @@
mLeft += offset;
mRight += offset;
- if (mDisplayList != null) {
- mDisplayList.offsetLeftAndRight(offset);
+ if (mRenderNode != null) {
+ mRenderNode.offsetLeftAndRight(offset);
invalidateViewProperty(false, false);
} else {
if (!matrixIsIdentity) {
@@ -11520,7 +11528,7 @@
* list properties are not being used in this view
*/
void invalidateViewProperty(boolean invalidateParent, boolean forceRedraw) {
- if (mDisplayList == null || (mPrivateFlags & PFLAG_DRAW_ANIMATION) == PFLAG_DRAW_ANIMATION) {
+ if (mRenderNode == null || (mPrivateFlags & PFLAG_DRAW_ANIMATION) == PFLAG_DRAW_ANIMATION) {
if (invalidateParent) {
invalidateParentCaches();
}
@@ -13687,10 +13695,7 @@
mHardwareLayer.setLayerPaint(mLayerPaint);
RenderNode displayList = mHardwareLayer.startRecording();
- if (getDisplayList(displayList, true) != displayList) {
- throw new IllegalStateException("getDisplayList() didn't return"
- + " the input displaylist for a hardware layer!");
- }
+ updateDisplayListIfDirty(displayList, true);
mHardwareLayer.endRecording(mLocalDirtyRect);
mLocalDirtyRect.setEmpty();
}
@@ -13831,29 +13836,34 @@
* Otherwise, the same display list will be returned (after having been rendered into
* along the way, depending on the invalidation state of the view).
*
- * @param displayList The previous version of this displayList, could be null.
+ * @param renderNode The previous version of this displayList, could be null.
* @param isLayer Whether the requester of the display list is a layer. If so,
* the view will avoid creating a layer inside the resulting display list.
* @return A new or reused DisplayList object.
*/
- private RenderNode getDisplayList(RenderNode displayList, boolean isLayer) {
+ private void updateDisplayListIfDirty(@NonNull RenderNode renderNode, boolean isLayer) {
final HardwareRenderer renderer = getHardwareRenderer();
+ if (renderNode == null) {
+ throw new IllegalArgumentException("RenderNode must not be null");
+ }
if (renderer == null || !canHaveDisplayList()) {
- return null;
+ // can't populate RenderNode, don't try
+ return;
}
- if (((mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == 0 ||
- displayList == null || !displayList.isValid() ||
- (!isLayer && mRecreateDisplayList))) {
+ if ((mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == 0
+ || !renderNode.isValid()
+ || (!isLayer && mRecreateDisplayList)) {
// Don't need to recreate the display list, just need to tell our
// children to restore/recreate theirs
- if (displayList != null && displayList.isValid() &&
- !isLayer && !mRecreateDisplayList) {
+ if (renderNode.isValid()
+ && !isLayer
+ && !mRecreateDisplayList) {
mPrivateFlags |= PFLAG_DRAWN | PFLAG_DRAWING_CACHE_VALID;
mPrivateFlags &= ~PFLAG_DIRTY_MASK;
dispatchGetDisplayList();
- return displayList;
+ return; // no work needed
}
if (!isLayer) {
@@ -13861,20 +13871,13 @@
// we copy in child display lists into ours in drawChild()
mRecreateDisplayList = true;
}
- if (displayList == null) {
- displayList = RenderNode.create(getClass().getName());
- // If we're creating a new display list, make sure our parent gets invalidated
- // since they will need to recreate their display list to account for this
- // new child display list.
- invalidateParentCaches();
- }
boolean caching = false;
int width = mRight - mLeft;
int height = mBottom - mTop;
int layerType = getLayerType();
- final HardwareCanvas canvas = displayList.start(width, height);
+ final HardwareCanvas canvas = renderNode.start(width, height);
try {
if (!isLayer && layerType != LAYER_TYPE_NONE) {
@@ -13917,12 +13920,12 @@
}
}
} finally {
- displayList.end(renderer, canvas);
- displayList.setCaching(caching);
+ renderNode.end(renderer, canvas);
+ renderNode.setCaching(caching);
if (isLayer) {
- displayList.setLeftTopRightBottom(0, 0, width, height);
+ renderNode.setLeftTopRightBottom(0, 0, width, height);
} else {
- setDisplayListProperties(displayList);
+ setDisplayListProperties(renderNode);
}
if (renderer != getHardwareRenderer()) {
@@ -13937,26 +13940,25 @@
mPrivateFlags |= PFLAG_DRAWN | PFLAG_DRAWING_CACHE_VALID;
mPrivateFlags &= ~PFLAG_DIRTY_MASK;
}
-
- return displayList;
}
/**
- * <p>Returns a display list that can be used to draw this view again
- * without executing its draw method.</p>
+ * Returns a RenderNode with View draw content recorded, which can be
+ * used to draw this view again without executing its draw method.
*
- * @return A DisplayList ready to replay, or null if caching is not enabled.
+ * @return A RenderNode ready to replay, or null if caching is not enabled.
*
* @hide
*/
public RenderNode getDisplayList() {
- mDisplayList = getDisplayList(mDisplayList, false);
- return mDisplayList;
+ ensureRenderNode();
+ updateDisplayListIfDirty(mRenderNode, false);
+ return mRenderNode;
}
private void resetDisplayList() {
- if (mDisplayList != null && mDisplayList.isValid()) {
- mDisplayList.destroyDisplayListData();
+ if (mRenderNode != null && mRenderNode.isValid()) {
+ mRenderNode.destroyDisplayListData();
}
if (mBackgroundDisplayList != null && mBackgroundDisplayList.isValid()) {
@@ -14654,9 +14656,9 @@
transformToApply = parent.getChildTransformation();
} else {
if ((mPrivateFlags3 & PFLAG3_VIEW_IS_ANIMATING_TRANSFORM) ==
- PFLAG3_VIEW_IS_ANIMATING_TRANSFORM && mDisplayList != null) {
+ PFLAG3_VIEW_IS_ANIMATING_TRANSFORM && mRenderNode != null) {
// No longer animating: clear out old animation matrix
- mDisplayList.setAnimationMatrix(null);
+ mRenderNode.setAnimationMatrix(null);
mPrivateFlags3 &= ~PFLAG3_VIEW_IS_ANIMATING_TRANSFORM;
}
if (!useDisplayListProperties &&
@@ -15169,8 +15171,8 @@
if ((mPrivateFlags3 & PFLAG3_OUTLINE_DEFINED) == 0) {
// Outline not currently define, query from background
mOutline = background.getOutline();
- if (mDisplayList != null) {
- mDisplayList.setOutline(mOutline);
+ if (mRenderNode != null) {
+ mRenderNode.setOutline(mOutline);
}
}
}
@@ -15506,8 +15508,8 @@
mTop = top;
mRight = right;
mBottom = bottom;
- if (mDisplayList != null) {
- mDisplayList.setLeftTopRightBottom(mLeft, mTop, mRight, mBottom);
+ if (mRenderNode != null) {
+ mRenderNode.setLeftTopRightBottom(mLeft, mTop, mRight, mBottom);
}
mPrivateFlags |= PFLAG_HAS_BOUNDS;
@@ -19093,10 +19095,10 @@
}
}
- class CheckForLongPress implements Runnable {
-
+ private final class CheckForLongPress implements Runnable {
private int mOriginalWindowAttachCount;
+ @Override
public void run() {
if (isPressed() && (mParent != null)
&& mOriginalWindowAttachCount == mWindowAttachCount) {
@@ -19112,14 +19114,20 @@
}
private final class CheckForTap implements Runnable {
+ public float x;
+ public float y;
+
+ @Override
public void run() {
mPrivateFlags &= ~PFLAG_PREPRESSED;
+ setHotspot(R.attr.state_pressed, x, y);
setPressed(true);
checkForLongClick(ViewConfiguration.getTapTimeout());
}
}
private final class PerformClick implements Runnable {
+ @Override
public void run() {
performClick();
}
@@ -19398,7 +19406,9 @@
}
private final class UnsetPressedState implements Runnable {
+ @Override
public void run() {
+ clearHotspot(R.attr.state_pressed);
setPressed(false);
}
}
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index aadaa7f..bcc82fb 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -31,7 +31,6 @@
import android.graphics.RectF;
import android.graphics.Region;
import android.os.Build;
-import android.os.Bundle;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
@@ -3174,8 +3173,8 @@
setBooleanFlag(FLAG_CLIP_CHILDREN, clipChildren);
for (int i = 0; i < mChildrenCount; ++i) {
View child = getChildAt(i);
- if (child.mDisplayList != null) {
- child.mDisplayList.setClipToBounds(clipChildren);
+ if (child.mRenderNode != null) {
+ child.mRenderNode.setClipToBounds(clipChildren);
}
}
}
@@ -4610,9 +4609,9 @@
final View v = children[i];
v.mTop += offset;
v.mBottom += offset;
- if (v.mDisplayList != null) {
+ if (v.mRenderNode != null) {
invalidate = true;
- v.mDisplayList.offsetTopAndBottom(offset);
+ v.mRenderNode.offsetTopAndBottom(offset);
}
}
diff --git a/core/java/android/view/ViewPropertyAnimator.java b/core/java/android/view/ViewPropertyAnimator.java
index 563ffb7..bbae0ca 100644
--- a/core/java/android/view/ViewPropertyAnimator.java
+++ b/core/java/android/view/ViewPropertyAnimator.java
@@ -925,51 +925,51 @@
*/
private void setValue(int propertyConstant, float value) {
final View.TransformationInfo info = mView.mTransformationInfo;
- final RenderNode displayList = mView.mDisplayList;
+ final RenderNode renderNode = mView.mRenderNode;
switch (propertyConstant) {
case TRANSLATION_X:
info.mTranslationX = value;
- if (displayList != null) displayList.setTranslationX(value);
+ if (renderNode != null) renderNode.setTranslationX(value);
break;
case TRANSLATION_Y:
info.mTranslationY = value;
- if (displayList != null) displayList.setTranslationY(value);
+ if (renderNode != null) renderNode.setTranslationY(value);
break;
case TRANSLATION_Z:
info.mTranslationZ = value;
- if (displayList != null) displayList.setTranslationZ(value);
+ if (renderNode != null) renderNode.setTranslationZ(value);
break;
case ROTATION:
info.mRotation = value;
- if (displayList != null) displayList.setRotation(value);
+ if (renderNode != null) renderNode.setRotation(value);
break;
case ROTATION_X:
info.mRotationX = value;
- if (displayList != null) displayList.setRotationX(value);
+ if (renderNode != null) renderNode.setRotationX(value);
break;
case ROTATION_Y:
info.mRotationY = value;
- if (displayList != null) displayList.setRotationY(value);
+ if (renderNode != null) renderNode.setRotationY(value);
break;
case SCALE_X:
info.mScaleX = value;
- if (displayList != null) displayList.setScaleX(value);
+ if (renderNode != null) renderNode.setScaleX(value);
break;
case SCALE_Y:
info.mScaleY = value;
- if (displayList != null) displayList.setScaleY(value);
+ if (renderNode != null) renderNode.setScaleY(value);
break;
case X:
info.mTranslationX = value - mView.mLeft;
- if (displayList != null) displayList.setTranslationX(value - mView.mLeft);
+ if (renderNode != null) renderNode.setTranslationX(value - mView.mLeft);
break;
case Y:
info.mTranslationY = value - mView.mTop;
- if (displayList != null) displayList.setTranslationY(value - mView.mTop);
+ if (renderNode != null) renderNode.setTranslationY(value - mView.mTop);
break;
case ALPHA:
info.mAlpha = value;
- if (displayList != null) displayList.setAlpha(value);
+ if (renderNode != null) renderNode.setAlpha(value);
break;
}
}
@@ -1093,7 +1093,7 @@
// Shouldn't happen, but just to play it safe
return;
}
- boolean useDisplayListProperties = mView.mDisplayList != null;
+ boolean useRenderNodeProperties = mView.mRenderNode != null;
// alpha requires slightly different treatment than the other (transform) properties.
// The logic in setAlpha() is not simply setting mAlpha, plus the invalidation
@@ -1101,7 +1101,7 @@
// We track what kinds of properties are set, and how alpha is handled when it is
// set, and perform the invalidation steps appropriately.
boolean alphaHandled = false;
- if (!useDisplayListProperties) {
+ if (!useRenderNodeProperties) {
mView.invalidateParentCaches();
}
float fraction = animation.getAnimatedFraction();
@@ -1124,7 +1124,7 @@
}
if ((propertyMask & TRANSFORM_MASK) != 0) {
mView.mTransformationInfo.mMatrixDirty = true;
- if (!useDisplayListProperties) {
+ if (!useRenderNodeProperties) {
mView.mPrivateFlags |= View.PFLAG_DRAWN; // force another invalidation
}
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index fd85df9..b617f68 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1465,8 +1465,8 @@
mWidth, mHeight);
}
mResizeBuffer.prepare(mWidth, mHeight, false);
- RenderNode layerDisplayList = mResizeBuffer.startRecording();
- HardwareCanvas layerCanvas = layerDisplayList.start(mWidth, mHeight);
+ RenderNode layerRenderNode = mResizeBuffer.startRecording();
+ HardwareCanvas layerCanvas = layerRenderNode.start(mWidth, mHeight);
final int restoreCount = layerCanvas.save();
int yoff;
@@ -1484,9 +1484,9 @@
mTranslator.translateCanvas(layerCanvas);
}
- RenderNode displayList = mView.mDisplayList;
- if (displayList != null && displayList.isValid()) {
- layerCanvas.drawDisplayList(displayList, null,
+ RenderNode renderNode = mView.mRenderNode;
+ if (renderNode != null && renderNode.isValid()) {
+ layerCanvas.drawDisplayList(renderNode, null,
RenderNode.FLAG_CLIP_CHILDREN);
} else {
mView.draw(layerCanvas);
@@ -1499,9 +1499,9 @@
com.android.internal.R.integer.config_mediumAnimTime);
layerCanvas.restoreToCount(restoreCount);
- layerDisplayList.end(mAttachInfo.mHardwareRenderer, layerCanvas);
- layerDisplayList.setCaching(true);
- layerDisplayList.setLeftTopRightBottom(0, 0, mWidth, mHeight);
+ layerRenderNode.end(mAttachInfo.mHardwareRenderer, layerCanvas);
+ layerRenderNode.setCaching(true);
+ layerRenderNode.setLeftTopRightBottom(0, 0, mWidth, mHeight);
mTempRect.set(0, 0, mWidth, mHeight);
mResizeBuffer.endRecording(mTempRect);
mAttachInfo.mHardwareRenderer.flushLayerUpdates();
@@ -2178,9 +2178,9 @@
* @hide
*/
void outputDisplayList(View view) {
- RenderNode displayList = view.getDisplayList();
- if (displayList != null) {
- displayList.output();
+ RenderNode renderNode = view.getDisplayList();
+ if (renderNode != null) {
+ renderNode.output();
}
}
@@ -5218,10 +5218,10 @@
}
private static void getGfxInfo(View view, int[] info) {
- RenderNode displayList = view.mDisplayList;
+ RenderNode renderNode = view.mRenderNode;
info[0]++;
- if (displayList != null) {
- info[1] += 0; /* TODO: Memory used by display lists */
+ if (renderNode != null) {
+ info[1] += 0; /* TODO: Memory used by RenderNodes (properties + DisplayLists) */
}
if (view instanceof ViewGroup) {
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 64953f8..b47177a 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -24,6 +24,7 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.os.SystemClock;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.IntProperty;
@@ -1225,6 +1226,15 @@
forwarding = onTouchForwarded(event) || !onForwardingStopped();
} else {
forwarding = onTouchObserved(event) && onForwardingStarted();
+
+ if (forwarding) {
+ // Make sure we cancel any ongoing source event stream.
+ final long now = SystemClock.uptimeMillis();
+ final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL,
+ 0.0f, 0.0f, 0);
+ mSrc.onTouchEvent(e);
+ e.recycle();
+ }
}
mForwarding = forwarding;
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 1eedc5d..d8a6867 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -1171,8 +1171,8 @@
|| !mOnQueryChangeListener.onQueryTextSubmit(query.toString())) {
if (mSearchable != null) {
launchQuerySearch(KeyEvent.KEYCODE_UNKNOWN, null, query.toString());
- setImeVisibility(false);
}
+ setImeVisibility(false);
dismissSuggestions();
}
}
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 16af9a9..7ae5a03 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1339,6 +1339,12 @@
Example: com.google.android.myapp/.resolver.MyResolverActivity -->
<string name="config_customResolverActivity"></string>
+ <!-- Name of the activity that prompts the user to reject, accept, or whitelist
+ an adb host's public key, when an unwhitelisted host connects to the local adbd.
+ Can be customized for other product types -->
+ <string name="config_customAdbPublicKeyActivity"
+ >com.android.systemui/com.android.systemui.usb.UsbDebuggingActivity</string>
+
<!-- Apps that are authorized to access shared accounts, overridden by product overlays -->
<string name="config_appsAuthorizedForSharedAccounts">;com.android.settings;</string>
@@ -1421,4 +1427,5 @@
1 - The device DOES have a permanent menu key; ignore autodetection.
2 - The device DOES NOT have a permanent menu key; ignore autodetection. -->
<integer name="config_overrideHasPermanentMenuKey">0</integer>
+
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index d49980f..d4692f1 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2365,4 +2365,6 @@
<public type="style" name="TextAppearance.Quantum.Caption" />
<public type="style" name="TextAppearance.Quantum.Menu" />
<public type="style" name="TextAppearance.Quantum.Button" />
+
+ <public type="style" name="Widget.Holo.Light.Button.Borderless" />
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index fa84750..557dce24 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1622,6 +1622,7 @@
<java-symbol type="string" name="enable_explore_by_touch_warning_message" />
<java-symbol type="bool" name="config_powerDecoupleAutoSuspendModeFromDisplay" />
<java-symbol type="bool" name="config_powerDecoupleInteractiveModeFromDisplay" />
+ <java-symbol type="string" name="config_customAdbPublicKeyActivity" />
<java-symbol type="layout" name="resolver_list" />
<java-symbol type="id" name="resolver_list" />
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index 9e367fc..5fa8f1d 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -1499,13 +1499,13 @@
virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level,
bool useQuickReject) {
if (mDisplayList && mDisplayList->isRenderable() && !mSkipInOrderDraw) {
- mDisplayList->defer(deferStruct, level + 1);
+ mDisplayList->deferNodeInParent(deferStruct, level + 1);
}
}
virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level,
bool useQuickReject) {
if (mDisplayList && mDisplayList->isRenderable() && !mSkipInOrderDraw) {
- mDisplayList->replay(replayStruct, level + 1);
+ mDisplayList->replayNodeInParent(replayStruct, level + 1);
}
}
@@ -1548,14 +1548,16 @@
};
/**
- * Not a canvas operation, used only by 3d / z ordering logic in DisplayList::iterate()
+ * Not a canvas operation, used only by 3d / z ordering logic in RenderNode::iterate()
*/
class DrawShadowOp : public DrawOp {
public:
- DrawShadowOp(const mat4& transformXY, const mat4& transformZ, float alpha,
+ DrawShadowOp(const mat4& transformXY, const mat4& transformZ,
+ float casterAlpha, bool casterUnclipped,
float fallbackWidth, float fallbackHeight,
const SkPath* outline, const SkPath* revealClip)
- : DrawOp(NULL), mTransformXY(transformXY), mTransformZ(transformZ), mAlpha(alpha),
+ : DrawOp(NULL), mTransformXY(transformXY), mTransformZ(transformZ),
+ mCasterAlpha(casterAlpha), mCasterUnclipped(casterUnclipped),
mFallbackWidth(fallbackWidth), mFallbackHeight(fallbackHeight),
mOutline(outline), mRevealClip(revealClip) {}
@@ -1572,7 +1574,8 @@
Op(casterPerimeter, *mRevealClip, kIntersect_PathOp, &casterPerimeter);
}
- return renderer.drawShadow(mTransformXY, mTransformZ, mAlpha, &casterPerimeter);
+ return renderer.drawShadow(mTransformXY, mTransformZ,
+ mCasterAlpha, mCasterUnclipped, &casterPerimeter);
}
virtual void output(int level, uint32_t logFlags) const {
@@ -1584,7 +1587,8 @@
private:
const mat4 mTransformXY;
const mat4 mTransformZ;
- const float mAlpha;
+ const float mCasterAlpha;
+ const bool mCasterUnclipped;
const float mFallbackWidth;
const float mFallbackHeight;
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 4457c61..27409a2 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -209,7 +209,7 @@
dirtyRect.right, dirtyRect.bottom, !isBlend());
displayList->computeOrdering();
- displayList->defer(deferredState, 0);
+ displayList->deferNodeTree(deferredState);
deferredUpdateScheduled = false;
}
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index b730d30..e1f484d 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1906,14 +1906,14 @@
if (CC_UNLIKELY(mCaches.drawDeferDisabled)) {
status = startFrame();
ReplayStateStruct replayStruct(*this, dirty, replayFlags);
- displayList->replay(replayStruct, 0);
+ displayList->replayNodeTree(replayStruct);
return status | replayStruct.mDrawGlStatus;
}
bool avoidOverdraw = !mCaches.debugOverdraw && !mCountOverdraw; // shh, don't tell devs!
DeferredDisplayList deferredList(*currentClipRect(), avoidOverdraw);
DeferStateStruct deferStruct(deferredList, *this, replayFlags);
- displayList->defer(deferStruct, 0);
+ displayList->deferNodeTree(deferStruct);
flushLayers();
status = startFrame();
@@ -3185,7 +3185,7 @@
}
status_t OpenGLRenderer::drawShadow(const mat4& casterTransformXY, const mat4& casterTransformZ,
- float casterAlpha, const SkPath* casterPerimeter) {
+ float casterAlpha, bool casterUnclipped, const SkPath* casterPerimeter) {
if (currentSnapshot()->isIgnored()) return DrawGlInfo::kStatusDone;
// TODO: use quickRejectWithScissor. For now, always force enable scissor.
@@ -3242,7 +3242,7 @@
Rect casterBounds(casterPerimeter->getBounds());
casterTransformXY.mapRect(casterBounds);
- bool isCasterOpaque = (casterAlpha == 1.0f);
+ bool isCasterOpaque = (casterAlpha == 1.0f) && casterUnclipped;
// draw caster's shadows
if (mCaches.propertyAmbientShadowStrength > 0) {
paint.setARGB(casterAlpha * mCaches.propertyAmbientShadowStrength, 0, 0, 0);
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 054767e..2debd2e 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -210,7 +210,7 @@
virtual status_t drawRects(const float* rects, int count, const SkPaint* paint);
status_t drawShadow(const mat4& casterTransformXY, const mat4& casterTransformZ,
- float casterAlpha, const SkPath* casterPerimeter);
+ float casterAlpha, bool casterUnclipped, const SkPath* casterPerimeter);
virtual void resetShader();
virtual void setupShader(SkiaShader* shader);
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 675b215..34d98a1 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -132,10 +132,9 @@
#define PROPERTY_SAVECOUNT 0
template <class T>
-void RenderNode::setViewProperties(OpenGLRenderer& renderer, T& handler,
- const int level) {
+void RenderNode::setViewProperties(OpenGLRenderer& renderer, T& handler) {
#if DEBUG_DISPLAY_LIST
- properties().debugOutputProperties(level);
+ properties().debugOutputProperties(handler.level() + 1);
#endif
if (properties().getLeft() != 0 || properties().getTop() != 0) {
renderer.translate(properties().getLeft(), properties().getTop());
@@ -302,7 +301,6 @@
child->computeOrderingImpl(childOp, projectionChildren, projectionTransform);
}
}
-
}
class DeferOperationHandler {
@@ -313,15 +311,25 @@
operation->defer(mDeferStruct, saveCount, mLevel, clipToBounds);
}
inline LinearAllocator& allocator() { return *(mDeferStruct.mAllocator); }
+ inline void startMark(const char* name) {} // do nothing
+ inline void endMark() {}
+ inline int level() { return mLevel; }
+ inline int replayFlags() { return mDeferStruct.mReplayFlags; }
private:
DeferStateStruct& mDeferStruct;
const int mLevel;
};
-void RenderNode::defer(DeferStateStruct& deferStruct, const int level) {
+void RenderNode::deferNodeTree(DeferStateStruct& deferStruct) {
+ DeferOperationHandler handler(deferStruct, 0);
+ if (properties().getTranslationZ() > 0.0f) issueDrawShadowOperation(Matrix4::identity(), handler);
+ issueOperations<DeferOperationHandler>(deferStruct.mRenderer, handler);
+}
+
+void RenderNode::deferNodeInParent(DeferStateStruct& deferStruct, const int level) {
DeferOperationHandler handler(deferStruct, level);
- iterate<DeferOperationHandler>(deferStruct.mRenderer, handler, level);
+ issueOperations<DeferOperationHandler>(deferStruct.mRenderer, handler);
}
class ReplayOperationHandler {
@@ -335,21 +343,31 @@
operation->replay(mReplayStruct, saveCount, mLevel, clipToBounds);
}
inline LinearAllocator& allocator() { return *(mReplayStruct.mAllocator); }
+ inline void startMark(const char* name) {
+ mReplayStruct.mRenderer.startMark(name);
+ }
+ inline void endMark() {
+ mReplayStruct.mRenderer.endMark();
+ DISPLAY_LIST_LOGD("%*sDone (%p, %s), returning %d", level * 2, "", this, mName.string(),
+ mReplayStruct.mDrawGlStatus);
+ }
+ inline int level() { return mLevel; }
+ inline int replayFlags() { return mReplayStruct.mReplayFlags; }
private:
ReplayStateStruct& mReplayStruct;
const int mLevel;
};
-void RenderNode::replay(ReplayStateStruct& replayStruct, const int level) {
+void RenderNode::replayNodeTree(ReplayStateStruct& replayStruct) {
+ ReplayOperationHandler handler(replayStruct, 0);
+ if (properties().getTranslationZ() > 0.0f) issueDrawShadowOperation(Matrix4::identity(), handler);
+ issueOperations<ReplayOperationHandler>(replayStruct.mRenderer, handler);
+}
+
+void RenderNode::replayNodeInParent(ReplayStateStruct& replayStruct, const int level) {
ReplayOperationHandler handler(replayStruct, level);
-
- replayStruct.mRenderer.startMark(mName.string());
- iterate<ReplayOperationHandler>(replayStruct.mRenderer, handler, level);
- replayStruct.mRenderer.endMark();
-
- DISPLAY_LIST_LOGD("%*sDone (%p, %s), returning %d", level * 2, "", this, mName.string(),
- replayStruct.mDrawGlStatus);
+ issueOperations<ReplayOperationHandler>(replayStruct.mRenderer, handler);
}
void RenderNode::buildZSortedChildList(Vector<ZDrawDisplayListOpPair>& zTranslatedNodes) {
@@ -373,10 +391,42 @@
std::stable_sort(zTranslatedNodes.begin(), zTranslatedNodes.end());
}
+template <class T>
+void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler) {
+ if (properties().getAlpha() <= 0.0f) return;
+
+ mat4 shadowMatrixXY(transformFromParent);
+ applyViewPropertyTransforms(shadowMatrixXY);
+
+ // Z matrix needs actual 3d transformation, so mapped z values will be correct
+ mat4 shadowMatrixZ(transformFromParent);
+ applyViewPropertyTransforms(shadowMatrixZ, true);
+
+ const SkPath* outlinePath = properties().getOutline().getPath();
+ const RevealClip& revealClip = properties().getRevealClip();
+ const SkPath* revealClipPath = revealClip.hasConvexClip()
+ ? revealClip.getPath() : NULL; // only pass the reveal clip's path if it's convex
+
+ /**
+ * The drawing area of the caster is always the same as the its perimeter (which
+ * the shadow system uses) *except* in the inverse clip case. Inform the shadow
+ * system that the caster's drawing area (as opposed to its perimeter) has been
+ * clipped, so that it knows the caster can't be opaque.
+ */
+ bool casterUnclipped = !revealClip.willClip() || revealClip.hasConvexClip();
+
+ DisplayListOp* shadowOp = new (handler.allocator()) DrawShadowOp(
+ shadowMatrixXY, shadowMatrixZ,
+ properties().getAlpha(), casterUnclipped,
+ properties().getWidth(), properties().getHeight(),
+ outlinePath, revealClipPath);
+ handler(shadowOp, PROPERTY_SAVECOUNT, properties().getClipToBounds());
+}
+
#define SHADOW_DELTA 0.1f
template <class T>
-void RenderNode::iterate3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+void RenderNode::issueOperationsOf3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
ChildrenSelectMode mode, OpenGLRenderer& renderer, T& handler) {
const int size = zTranslatedNodes.size();
if (size == 0
@@ -386,12 +436,6 @@
return;
}
- int rootRestoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
- LinearAllocator& alloc = handler.allocator();
- ClipRectOp* clipOp = new (alloc) ClipRectOp(0, 0, properties().getWidth(), properties().getHeight(),
- SkRegion::kIntersect_Op); // clip to 3d root bounds
- handler(clipOp, PROPERTY_SAVECOUNT, properties().getClipToBounds());
-
/**
* Draw shadows and (potential) casters mostly in order, but allow the shadows of casters
* with very similar Z heights to draw together.
@@ -419,26 +463,7 @@
// attempt to render the shadow if the caster about to be drawn is its caster,
// OR if its caster's Z value is similar to the previous potential caster
if (shadowIndex == drawIndex || casterZ - lastCasterZ < SHADOW_DELTA) {
-
- if (caster->properties().getAlpha() > 0.0f) {
- mat4 shadowMatrixXY(casterOp->mTransformFromParent);
- caster->applyViewPropertyTransforms(shadowMatrixXY);
-
- // Z matrix needs actual 3d transformation, so mapped z values will be correct
- mat4 shadowMatrixZ(casterOp->mTransformFromParent);
- caster->applyViewPropertyTransforms(shadowMatrixZ, true);
-
- const SkPath* outlinePath = caster->properties().getOutline().getPath();
- const RevealClip& revealClip = caster->properties().getRevealClip();
- const SkPath* revealClipPath = revealClip.hasConvexClip()
- ? revealClip.getPath() : NULL; // only pass the reveal clip's path if it's convex
-
- DisplayListOp* shadowOp = new (alloc) DrawShadowOp(
- shadowMatrixXY, shadowMatrixZ, caster->properties().getAlpha(),
- caster->properties().getWidth(), caster->properties().getHeight(),
- outlinePath, revealClipPath);
- handler(shadowOp, PROPERTY_SAVECOUNT, properties().getClipToBounds());
- }
+ caster->issueDrawShadowOperation(casterOp->mTransformFromParent, handler);
lastCasterZ = casterZ; // must do this even if current caster not casting a shadow
shadowIndex++;
@@ -461,17 +486,10 @@
renderer.restoreToCount(restoreTo);
drawIndex++;
}
- handler(new (alloc) RestoreToCountOp(rootRestoreTo), PROPERTY_SAVECOUNT, properties().getClipToBounds());
}
template <class T>
-void RenderNode::iterateProjectedChildren(OpenGLRenderer& renderer, T& handler, const int level) {
- int rootRestoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
- LinearAllocator& alloc = handler.allocator();
- ClipRectOp* clipOp = new (alloc) ClipRectOp(0, 0, properties().getWidth(), properties().getHeight(),
- SkRegion::kReplace_Op); // clip to projection surface root bounds
- handler(clipOp, PROPERTY_SAVECOUNT, properties().getClipToBounds());
-
+void RenderNode::issueOperationsOfProjectedChildren(OpenGLRenderer& renderer, T& handler) {
for (size_t i = 0; i < mProjectedNodes.size(); i++) {
DrawDisplayListOp* childOp = mProjectedNodes[i];
@@ -483,7 +501,6 @@
childOp->mSkipInOrderDraw = true;
renderer.restoreToCount(restoreTo);
}
- handler(new (alloc) RestoreToCountOp(rootRestoreTo), PROPERTY_SAVECOUNT, properties().getClipToBounds());
}
/**
@@ -496,7 +513,8 @@
* defer vs replay logic, per operation
*/
template <class T>
-void RenderNode::iterate(OpenGLRenderer& renderer, T& handler, const int level) {
+void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) {
+ const int level = handler.level();
if (CC_UNLIKELY(mDestroyed)) { // temporary debug logging
ALOGW("Error: %s is drawing after destruction", mName.string());
CRASH();
@@ -506,6 +524,8 @@
return;
}
+ handler.startMark(mName.string());
+
#if DEBUG_DISPLAY_LIST
Rect* clipRect = renderer.getClipRect();
DISPLAY_LIST_LOGD("%*sStart display list (%p, %s), clipRect: %.0f, %.0f, %.0f, %.0f",
@@ -521,7 +541,7 @@
DISPLAY_LIST_LOGD("%*sSave %d %d", (level + 1) * 2, "",
SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag, restoreTo);
- setViewProperties<T>(renderer, handler, level + 1);
+ setViewProperties<T>(renderer, handler);
bool quickRejected = properties().getClipToBounds()
&& renderer.quickRejectConservative(0, 0, properties().getWidth(), properties().getHeight());
@@ -530,7 +550,7 @@
buildZSortedChildList(zTranslatedNodes);
// for 3d root, draw children with negative z values
- iterate3dChildren(zTranslatedNodes, kNegativeZChildren, renderer, handler);
+ issueOperationsOf3dChildren(zTranslatedNodes, kNegativeZChildren, renderer, handler);
DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance();
const int saveCountOffset = renderer.getSaveCount() - 1;
@@ -541,23 +561,24 @@
#if DEBUG_DISPLAY_LIST
op->output(level + 1);
#endif
-
logBuffer.writeCommand(level, op->name());
handler(op, saveCountOffset, properties().getClipToBounds());
if (CC_UNLIKELY(i == projectionReceiveIndex && mProjectedNodes.size() > 0)) {
- iterateProjectedChildren(renderer, handler, level);
+ issueOperationsOfProjectedChildren(renderer, handler);
}
}
// for 3d root, draw children with positive z values
- iterate3dChildren(zTranslatedNodes, kPositiveZChildren, renderer, handler);
+ issueOperationsOf3dChildren(zTranslatedNodes, kPositiveZChildren, renderer, handler);
}
DISPLAY_LIST_LOGD("%*sRestoreToCount %d", (level + 1) * 2, "", restoreTo);
handler(new (alloc) RestoreToCountOp(restoreTo),
PROPERTY_SAVECOUNT, properties().getClipToBounds());
renderer.setOverrideLayerAlpha(1.0f);
+
+ handler.endMark();
}
} /* namespace uirenderer */
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index 291d03d..fb5336d 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -92,8 +92,12 @@
ANDROID_API void setData(DisplayListData* newData);
void computeOrdering();
- void defer(DeferStateStruct& deferStruct, const int level);
- void replay(ReplayStateStruct& replayStruct, const int level);
+
+ void deferNodeTree(DeferStateStruct& deferStruct);
+ void deferNodeInParent(DeferStateStruct& deferStruct, const int level);
+
+ void replayNodeTree(ReplayStateStruct& replayStruct);
+ void replayNodeInParent(ReplayStateStruct& replayStruct, const int level);
ANDROID_API void output(uint32_t level = 1);
@@ -164,19 +168,26 @@
const mat4* transformFromProjectionSurface);
template <class T>
- inline void setViewProperties(OpenGLRenderer& renderer, T& handler, const int level);
+ inline void setViewProperties(OpenGLRenderer& renderer, T& handler);
void buildZSortedChildList(Vector<ZDrawDisplayListOpPair>& zTranslatedNodes);
+ template<class T>
+ inline void issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler);
+
template <class T>
- inline void iterate3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ inline void issueOperationsOf3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
ChildrenSelectMode mode, OpenGLRenderer& renderer, T& handler);
template <class T>
- inline void iterateProjectedChildren(OpenGLRenderer& renderer, T& handler, const int level);
+ inline void issueOperationsOfProjectedChildren(OpenGLRenderer& renderer, T& handler);
+ /**
+ * Issue the RenderNode's operations into a handler, recursing for subtrees through
+ * DrawDisplayListOp's defer() or replay() methods
+ */
template <class T>
- inline void iterate(OpenGLRenderer& renderer, T& handler, const int level);
+ inline void issueOperations(OpenGLRenderer& renderer, T& handler);
class TextContainer {
public:
diff --git a/packages/InputDevices/res/raw/keyboard_layout_arabic.kcm b/packages/InputDevices/res/raw/keyboard_layout_arabic.kcm
new file mode 100644
index 0000000..2a95cfe
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_arabic.kcm
@@ -0,0 +1,319 @@
+# 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.
+
+#
+# Arabic (US-101 keys) keyboard layout.
+#
+
+type OVERLAY
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base, capslock: '\u0630'
+ shift: '\u0651'
+}
+
+key 1 {
+ label: '1'
+ base: '\u0661'
+ shift: '!'
+ capslock: '1'
+}
+
+key 2 {
+ label: '2'
+ base: '\u0662'
+ shift: '@'
+ capslock: '2'
+}
+
+key 3 {
+ label: '3'
+ base: '\u0663'
+ shift: '#'
+ capslock: '3'
+}
+
+key 4 {
+ label: '4'
+ base: '\u0664'
+ shift: '$'
+ capslock: '4'
+}
+
+key 5 {
+ label: '5'
+ base: '\u0665'
+ shift: '%'
+ capslock: '5'
+}
+
+key 6 {
+ label: '6'
+ base: '\u0666'
+ shift: '^'
+ capslock: '6'
+}
+
+key 7 {
+ label: '7'
+ base: '\u0667'
+ shift: '&'
+ capslock: '7'
+}
+
+key 8 {
+ label: '8'
+ base: '\u0668'
+ shift: '*'
+ capslock: '8'
+}
+
+key 9 {
+ label: '9'
+ base: '\u0669'
+ shift: '('
+ capslock: '9'
+}
+
+key 0 {
+ label: '0'
+ base: '\u0660'
+ shift: ')'
+ capslock: '0'
+}
+
+key MINUS {
+ label: '-'
+ base, capslock: '-'
+ shift: '_'
+}
+
+key EQUALS {
+ label: '='
+ base, capslock: '='
+ shift: '+'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base, capslock: '\u0636'
+ shift: '\u064e'
+}
+
+key W {
+ label: 'W'
+ base, capslock: '\u0635'
+ shift: '\u064b'
+}
+
+key E {
+ label: 'E'
+ base, capslock: '\u062b'
+ shift: '\u064f'
+}
+
+key R {
+ label: 'R'
+ base, capslock: '\u0642'
+ shift: '\u064c'
+}
+
+key T {
+ label: 'T'
+ base, capslock: '\u0641'
+ shift: '\ufef9'
+}
+
+key Y {
+ label: 'Y'
+ base, capslock: '\u063a'
+ shift: '\u0625'
+}
+
+key U {
+ label: 'U'
+ base, capslock: '\u0639'
+ shift: '\u2018'
+}
+
+key I {
+ label: 'I'
+ base, capslock: '\u0647'
+ shift: '\u00f7'
+}
+
+key O {
+ label: 'O'
+ base, capslock: '\u062e'
+ shift: '\u00d7'
+}
+
+key P {
+ label: 'P'
+ base, capslock: '\u062d'
+ shift: '\u061b'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base, capslock: '\u062c'
+ shift: '<'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base, capslock: '\u062f'
+ shift: '>'
+}
+
+key BACKSLASH {
+ label: '\\'
+ base, capslock: '\\'
+ shift: '|'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base, capslock: '\u0634'
+ shift: '\u0650'
+}
+
+key S {
+ label: 'S'
+ base, capslock: '\u0633'
+ shift: '\u064d'
+}
+
+key D {
+ label: 'D'
+ base, capslock: '\u064a'
+ shift: ']'
+}
+
+key F {
+ label: 'F'
+ base, capslock: '\u0628'
+ shift: '['
+}
+
+key G {
+ label: 'G'
+ base, capslock: '\u0644'
+ shift: '\ufef7'
+}
+
+key H {
+ label: 'H'
+ base, capslock: '\u0627'
+ shift: '\u0623'
+}
+
+key J {
+ label: 'J'
+ base, capslock: '\u062a'
+ shift: '\u0640'
+}
+
+key K {
+ label: 'K'
+ base, capslock: '\u0646'
+ shift: '\u060c'
+}
+
+key L {
+ label: 'L'
+ base, capslock: '\u0645'
+ shift: '/'
+}
+
+key SEMICOLON {
+ label: ';'
+ base, capslock: '\u0643'
+ shift: ':'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base, capslock: '\u0637'
+ shift: '"'
+}
+
+### ROW 4
+
+key Z {
+ label: 'Z'
+ base, capslock: '\u0626'
+ shift: '~'
+}
+
+key X {
+ label: 'X'
+ base, capslock: '\u0621'
+ shift: '\u0652'
+}
+
+key C {
+ label: 'C'
+ base, capslock: '\u0624'
+ shift: '}'
+}
+
+key V {
+ label: 'V'
+ base, capslock: '\u0631'
+ shift: '{'
+}
+
+key B {
+ label: 'B'
+ base, capslock: '\ufefb'
+ shift: '\ufef5'
+}
+
+key N {
+ label: 'N'
+ base, capslock: '\u0649'
+ shift: '\u0622'
+}
+
+key M {
+ label: 'M'
+ base, capslock: '\u0629'
+ shift: '\u2019'
+}
+
+key COMMA {
+ label: ','
+ base, capslock: '\u0648'
+ shift: ','
+}
+
+key PERIOD {
+ label: '.'
+ base, capslock: '\u0632'
+ shift: '.'
+}
+
+key SLASH {
+ label: '/'
+ base, capslock: '\u0638'
+ shift: '\u061f'
+}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_greek.kcm b/packages/InputDevices/res/raw/keyboard_layout_greek.kcm
new file mode 100644
index 0000000..a7684e1
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_greek.kcm
@@ -0,0 +1,338 @@
+# 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.
+
+#
+# Greek (EU based) keyboard layout.
+#
+
+type OVERLAY
+
+map key 86 PLUS
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base, capslock: '`'
+ shift: '~'
+}
+
+key 1 {
+ label: '1'
+ base, capslock: '1'
+ shift: '!'
+}
+
+key 2 {
+ label: '2'
+ base, capslock: '2'
+ shift: '@'
+ ralt: '\u00b2'
+}
+
+key 3 {
+ label: '3'
+ base, capslock: '3'
+ shift: '#'
+ ralt: '\u00b3'
+}
+
+key 4 {
+ label: '4'
+ base, capslock: '4'
+ shift: '$'
+ ralt: '\u00a3'
+}
+
+key 5 {
+ label: '5'
+ base, capslock: '5'
+ shift: '%'
+ ralt: '\u00a7'
+}
+
+key 6 {
+ label: '6'
+ base, capslock: '6'
+ shift: '^'
+ ralt: '\u00b6'
+}
+
+key 7 {
+ label: '7'
+ base, capslock: '7'
+ shift: '&'
+}
+
+key 8 {
+ label: '8'
+ base, capslock: '8'
+ shift: '*'
+ ralt: '\u00a4'
+}
+
+key 9 {
+ label: '9'
+ base, capslock: '9'
+ shift: '('
+ ralt: '\u00a6'
+}
+
+key 0 {
+ label: '0'
+ base, capslock: '0'
+ shift: ')'
+ ralt: '\u00b0'
+}
+
+key MINUS {
+ label: '-'
+ base, capslock: '-'
+ shift: '_'
+ ralt: '\u00b1'
+}
+
+key EQUALS {
+ label: '='
+ base, capslock: '='
+ shift: '+'
+ ralt: '\u00bd'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base, capslock: ';'
+ shift: ':'
+}
+
+key W {
+ label: 'W'
+ base, capslock: '\u03c2'
+ shift: '\u0385'
+}
+
+key E {
+ label: 'E'
+ base: '\u03b5'
+ shift, capslock: '\u0395'
+ ralt: '\u20ac'
+}
+
+key R {
+ label: 'R'
+ base: '\u03c1'
+ shift, capslock: '\u03a1'
+ ralt: '\u00ae'
+}
+
+key T {
+ label: 'T'
+ base: '\u03c4'
+ shift, capslock: '\u03a4'
+}
+
+key Y {
+ label: 'Y'
+ base: '\u03c5'
+ shift, capslock: '\u03a5'
+ ralt: '\u00a5'
+}
+
+key U {
+ label: 'U'
+ base: '\u03b8'
+ shift, capslock: '\u0398'
+}
+
+key I {
+ label: 'I'
+ base: '\u03b9'
+ shift, capslock: '\u0399'
+}
+
+key O {
+ label: 'O'
+ base: '\u03bf'
+ shift, capslock: '\u039f'
+}
+
+key P {
+ label: 'P'
+ base: '\u03c0'
+ shift, capslock: '\u03a0'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base, capslock: '['
+ shift: '{'
+ ralt: '\u00ab'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base, capslock: ']'
+ shift: '}'
+ ralt: '\u00bb'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: '\u03b1'
+ shift, capslock: '\u0391'
+}
+
+key S {
+ label: 'S'
+ base: '\u03c3'
+ shift, capslock: '\u03a3'
+}
+
+key D {
+ label: 'D'
+ base: '\u03b4'
+ shift, capslock: '\u0394'
+}
+
+key F {
+ label: 'F'
+ base: '\u03c6'
+ shift, capslock: '\u03a6'
+}
+
+key G {
+ label: 'G'
+ base: '\u03b3'
+ shift, capslock: '\u0393'
+}
+
+key H {
+ label: 'H'
+ base: '\u03b7'
+ shift, capslock: '\u0397'
+}
+
+key J {
+ label: 'J'
+ base: '\u03be'
+ shift, capslock: '\u039e'
+}
+
+key K {
+ label: 'K'
+ base: '\u03ba'
+ shift, capslock: '\u039a'
+}
+
+key L {
+ label: 'L'
+ base: '\u03bb'
+ shift, capslock: '\u039b'
+}
+
+key SEMICOLON {
+ label: ';'
+ base, capslock: '\u0301'
+#should be \u0384 (greek tonos)
+ shift: '\u0308'
+ ralt: '\u0385'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base, capslock: '\''
+ shift: '"'
+}
+
+key BACKSLASH {
+ label: '\\'
+ base, capslock: '\\'
+ shift: '|'
+ ralt: '\u00ac'
+}
+
+### ROW 4
+
+key PLUS {
+ label: '<'
+ base, capslock: '<'
+ shift: '>'
+ ralt: '\\'
+ shift+ralt: '|'
+}
+
+key Z {
+ label: 'Z'
+ base: '\u03b6'
+ shift, capslock: '\u0396'
+}
+
+key X {
+ label: 'X'
+ base: '\u03c7'
+ shift, capslock: '\u03a7'
+}
+
+key C {
+ label: 'C'
+ base: '\u03c8'
+ shift, capslock: '\u03a8'
+ ralt: '\u00a9'
+}
+
+key V {
+ label: 'V'
+ base: '\u03c9'
+ shift, capslock: '\u03a9'
+}
+
+key B {
+ label: 'B'
+ base: '\u03b2'
+ shift, capslock: '\u0392'
+}
+
+key N {
+ label: 'N'
+ base: '\u03bd'
+ shift, capslock: '\u039d'
+}
+
+key M {
+ label: 'M'
+ base: '\u03bc'
+ shift, capslock: '\u039c'
+}
+
+key COMMA {
+ label: ','
+ base, capslock: ','
+ shift: '<'
+}
+
+key PERIOD {
+ label: '.'
+ base, capslock: '.'
+ shift: '>'
+}
+
+key SLASH {
+ label: '/'
+ base, capslock: '/'
+ shift: '?'
+}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_hebrew.kcm b/packages/InputDevices/res/raw/keyboard_layout_hebrew.kcm
new file mode 100644
index 0000000..cd3a4b9
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_hebrew.kcm
@@ -0,0 +1,341 @@
+# 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.
+
+#
+# Hebrew (based EU) keyboard layout.
+#
+
+type OVERLAY
+
+map key 86 PLUS
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base: ';'
+ shift: '~'
+ shift+capslock: '\u05b0'
+}
+
+key 1 {
+ label: '1'
+ base: '1'
+ shift: '!'
+ shift+capslock: '\u05b1'
+}
+
+key 2 {
+ label: '2'
+ base: '2'
+ shift: '@'
+ shift+capslock: '\u05b2'
+}
+
+key 3 {
+ label: '3'
+ base: '3'
+ shift: '#'
+ shift+capslock: '\u05b3'
+}
+
+key 4 {
+ label: '4'
+ base: '4'
+ shift: '$'
+ ralt: '\u20aa'
+ shift+capslock: '\u05b4'
+}
+
+key 5 {
+ label: '5'
+ base: '5'
+ shift: '%'
+ shift+capslock: '\u05b5'
+}
+
+key 6 {
+ label: '6'
+ base: '6'
+ shift: '^'
+ shift+capslock: '\u05b6'
+}
+
+key 7 {
+ label: '7'
+ base: '7'
+ shift: '&'
+ shift+capslock: '\u05b7'
+}
+
+key 8 {
+ label: '8'
+ base: '8'
+ shift: '*'
+ shift+capslock: '\u05b8'
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: '('
+ shift+capslock: '\u05c2'
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: ')'
+ shift+capslock: '\u05c1'
+}
+
+key MINUS {
+ label: '-'
+ base: '-'
+ shift: '_'
+ ralt: '\u05bf'
+ shift+capslock: '\u05b9'
+}
+
+key EQUALS {
+ label: '='
+ base: '='
+ shift: '+'
+ shift+capslock: '\u05bc'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: '/'
+ shift, capslock: 'Q'
+}
+
+key W {
+ label: 'W'
+ base: '\u0027'
+ shift, capslock: 'W'
+}
+
+key E {
+ label: 'E'
+ base: '\u05e7'
+ shift, capslock: 'E'
+ ralt: '\u20ac'
+}
+
+key R {
+ label: 'R'
+ base: '\u05e8'
+ shift, capslock: 'R'
+}
+
+key T {
+ label: 'T'
+ base: '\u05d0'
+ shift, capslock: 'T'
+}
+
+key Y {
+ label: 'Y'
+ base: '\u05d8'
+ shift, capslock: 'Y'
+}
+
+key U {
+ label: 'U'
+ base: '\u05d5'
+ shift, capslock: 'U'
+ ralt: '\u05f0'
+}
+
+key I {
+ label: 'I'
+ base: '\u05df'
+ shift, capslock: 'I'
+}
+
+key O {
+ label: 'O'
+ base: '\u05dd'
+ shift, capslock: 'O'
+}
+
+key P {
+ label: 'P'
+ base: '\u05e4'
+ shift, capslock: 'P'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base, capslock: '['
+ shift: '{'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base, capslock: ']'
+ shift: '}'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: '\u05e9'
+ shift, capslock: 'A'
+}
+
+key S {
+ label: 'S'
+ base: '\u05d3'
+ shift, capslock: 'S'
+}
+
+key D {
+ label: 'D'
+ base: '\u05d2'
+ shift, capslock: 'D'
+}
+
+key F {
+ label: 'F'
+ base: '\u05db'
+ shift, capslock: 'F'
+}
+
+key G {
+ label: 'G'
+ base: '\u05e2'
+ shift, capslock: 'G'
+}
+
+key H {
+ label: 'H'
+ base: '\u05d9'
+ shift, capslock: 'H'
+ ralt: '\u05f2'
+}
+
+key J {
+ label: 'J'
+ base: '\u05d7'
+ shift, capslock: 'J'
+ ralt: '\u05f1'
+}
+
+key K {
+ label: 'K'
+ base: '\u05dc'
+ shift, capslock: 'K'
+}
+
+key L {
+ label: 'L'
+ base: '\u05da'
+ shift, capslock: 'L'
+}
+
+key SEMICOLON {
+ label: ';'
+ base: '\u05e3'
+ shift: ':'
+ capslock: ';'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base: ','
+ shift: '"'
+ capslock: '\''
+}
+
+key BACKSLASH {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+}
+
+### ROW 4
+
+key PLUS {
+ label: '\\'
+ base, capslock: '\\'
+ shift: '|'
+}
+
+key Z {
+ label: 'Z'
+ base: '\u05d6'
+ shift, capslock: 'Z'
+}
+
+key X {
+ label: 'X'
+ base: '\u05e1'
+ shift, capslock: 'X'
+}
+
+key C {
+ label: 'C'
+ base: '\u05d1'
+ shift, capslock: 'C'
+}
+
+key V {
+ label: 'V'
+ base: '\u05d4'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: '\u05e0'
+ shift, capslock: 'B'
+}
+
+key N {
+ label: 'N'
+ base: '\u05de'
+ shift, capslock: 'N'
+}
+
+key M {
+ label: 'M'
+ base: '\u05e6'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: '\u05ea'
+ shift: '<'
+ capslock: ','
+}
+
+key PERIOD {
+ label: '.'
+ base: '\u05e5'
+ shift: '>'
+ capslock: '.'
+}
+
+key SLASH {
+ label: '/'
+ base: '.'
+ shift: '?'
+ capslock: '/'
+}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_lithuanian.kcm b/packages/InputDevices/res/raw/keyboard_layout_lithuanian.kcm
new file mode 100644
index 0000000..72ca333
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_lithuanian.kcm
@@ -0,0 +1,338 @@
+# 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.
+
+#
+# Lithuanian (EU based) keyboard layout.
+#
+
+type OVERLAY
+
+map key 86 PLUS
+
+### ROW 1
+
+key GRAVE {
+ label: '`'
+ base: '`'
+ shift: '~'
+}
+
+key 1 {
+ label: '1'
+ base: '\u0105'
+ shift, capslock: '\u0104'
+ ralt: '1'
+ shift+ralt: '!'
+}
+
+key 2 {
+ label: '2'
+ base: '\u010d'
+ shift, capslock: '\u010c'
+ ralt: '2'
+ shift+ralt: '@'
+}
+
+key 3 {
+ label: '3'
+ base: '\u0119'
+ shift, capslock: '\u0118'
+ ralt: '3'
+ shift+ralt: '#'
+}
+
+key 4 {
+ label: '4'
+ base: '\u0117'
+ shift, capslock: '\u0116'
+ ralt: '4'
+ shift+ralt: '$'
+}
+
+key 5 {
+ label: '5'
+ base: '\u012f'
+ shift, capslock: '\u012e'
+ ralt: '5'
+ shift+ralt: '%'
+}
+
+key 6 {
+ label: '6'
+ base: '\u0161'
+ shift, capslock: '\u0160'
+ ralt: '6'
+ shift+ralt: '\u0302'
+}
+
+key 7 {
+ label: '7'
+ base: '\u0173'
+ shift, capslock: '\u0172'
+ ralt: '7'
+ shift+ralt: '&'
+}
+
+key 8 {
+ label: '8'
+ base: '\u016b'
+ shift, capslock: '\u016a'
+ ralt: '8'
+ shift+ralt: '*'
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: '('
+ ralt: '9'
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: ')'
+ ralt: '0'
+}
+
+key MINUS {
+ label: '-'
+ base: '-'
+ shift: '_'
+}
+
+key EQUALS {
+ label: '='
+ base: '\u017e'
+ shift, capslock: '\u017d'
+ ralt: '='
+ shift+ralt: '+'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: 'q'
+ shift, capslock: 'Q'
+}
+
+key W {
+ label: 'W'
+ base: 'w'
+ shift, capslock: 'W'
+}
+
+key E {
+ label: 'E'
+ base: 'e'
+ shift, capslock: 'E'
+ ralt: '\u20ac'
+}
+
+key R {
+ label: 'R'
+ base: 'r'
+ shift, capslock: 'R'
+}
+
+key T {
+ label: 'T'
+ base: 't'
+ shift, capslock: 'T'
+}
+
+key Y {
+ label: 'Y'
+ base: 'y'
+ shift, capslock: 'Y'
+}
+
+key U {
+ label: 'U'
+ base: 'u'
+ shift, capslock: 'U'
+}
+
+key I {
+ label: 'I'
+ base: 'i'
+ shift, capslock: 'I'
+}
+
+key O {
+ label: 'O'
+ base: 'o'
+ shift, capslock: 'O'
+}
+
+key P {
+ label: 'P'
+ base: 'p'
+ shift, capslock: 'P'
+}
+
+key LEFT_BRACKET {
+ label: '['
+ base: '['
+ shift: '{'
+}
+
+key RIGHT_BRACKET {
+ label: ']'
+ base: ']'
+ shift: '}'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: 'a'
+ shift, capslock: 'A'
+}
+
+key S {
+ label: 'S'
+ base: 's'
+ shift, capslock: 'S'
+}
+
+key D {
+ label: 'D'
+ base: 'd'
+ shift, capslock: 'D'
+}
+
+key F {
+ label: 'F'
+ base: 'f'
+ shift, capslock: 'F'
+}
+
+key G {
+ label: 'G'
+ base: 'g'
+ shift, capslock: 'G'
+}
+
+key H {
+ label: 'H'
+ base: 'h'
+ shift, capslock: 'H'
+}
+
+key J {
+ label: 'J'
+ base: 'j'
+ shift, capslock: 'J'
+}
+
+key K {
+ label: 'K'
+ base: 'k'
+ shift, capslock: 'K'
+}
+
+key L {
+ label: 'L'
+ base: 'l'
+ shift, capslock: 'L'
+}
+
+key SEMICOLON {
+ label: ';'
+ base: ';'
+ shift: ':'
+}
+
+key APOSTROPHE {
+ label: '\''
+ base: '\''
+ shift: '"'
+}
+
+key BACKSLASH {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+}
+
+### ROW 4
+
+key PLUS {
+ label: '\\'
+ base: '\\'
+ shift: '|'
+}
+
+key Z {
+ label: 'Z'
+ base: 'z'
+ shift, capslock: 'Z'
+}
+
+key X {
+ label: 'X'
+ base: 'x'
+ shift, capslock: 'X'
+}
+
+key C {
+ label: 'C'
+ base: 'c'
+ shift, capslock: 'C'
+}
+
+key V {
+ label: 'V'
+ base: 'v'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: 'b'
+ shift, capslock: 'B'
+}
+
+key N {
+ label: 'N'
+ base: 'n'
+ shift, capslock: 'N'
+}
+
+key M {
+ label: 'M'
+ base: 'm'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: ','
+ shift: '<'
+}
+
+key PERIOD {
+ label: '.'
+ base: '.'
+ shift: '>'
+}
+
+key SLASH {
+ label: '/'
+ base: '/'
+ shift: '?'
+}
diff --git a/packages/InputDevices/res/raw/keyboard_layout_spanish_latin.kcm b/packages/InputDevices/res/raw/keyboard_layout_spanish_latin.kcm
new file mode 100644
index 0000000..16eb53f2
--- /dev/null
+++ b/packages/InputDevices/res/raw/keyboard_layout_spanish_latin.kcm
@@ -0,0 +1,325 @@
+# 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.
+
+#
+# Spanish (Latin) (EU based) keyboard layout.
+#
+
+type OVERLAY
+
+map key 86 PLUS
+
+### ROW 1
+
+key GRAVE {
+ label: '|'
+ base: '|'
+ shift: '\u00ba'
+ ralt: '\u00ac'
+}
+
+key 1 {
+ label: '1'
+ base: '1'
+ shift: '!'
+}
+
+key 2 {
+ label: '2'
+ base: '2'
+ shift: '"'
+}
+
+key 3 {
+ label: '3'
+ base: '3'
+ shift: '#'
+}
+
+key 4 {
+ label: '4'
+ base: '4'
+ shift: '$'
+
+}
+
+key 5 {
+ label: '5'
+ base: '5'
+ shift: '%'
+}
+
+key 6 {
+ label: '6'
+ base: '6'
+ shift: '&'
+}
+
+key 7 {
+ label: '7'
+ base: '7'
+ shift: '/'
+}
+
+key 8 {
+ label: '8'
+ base: '8'
+ shift: '('
+}
+
+key 9 {
+ label: '9'
+ base: '9'
+ shift: ')'
+}
+
+key 0 {
+ label: '0'
+ base: '0'
+ shift: '='
+}
+
+key MINUS {
+ label: '\''
+ base: '\''
+ shift: '?'
+ ralt: '\\'
+}
+
+key EQUALS {
+ label: '\u00bf'
+ base: '\u00bf'
+ shift: '\u00a1'
+}
+
+### ROW 2
+
+key Q {
+ label: 'Q'
+ base: 'q'
+ shift, capslock: 'Q'
+ ralt: '@'
+}
+
+key W {
+ label: 'W'
+ base: 'w'
+ shift, capslock: 'W'
+}
+
+key E {
+ label: 'E'
+ base: 'e'
+ shift, capslock: 'E'
+}
+
+key R {
+ label: 'R'
+ base: 'r'
+ shift, capslock: 'R'
+}
+
+key T {
+ label: 'T'
+ base: 't'
+ shift, capslock: 'T'
+}
+
+key Y {
+ label: 'Y'
+ base: 'y'
+ shift, capslock: 'Y'
+}
+
+key U {
+ label: 'U'
+ base: 'u'
+ shift, capslock: 'U'
+}
+
+key I {
+ label: 'I'
+ base: 'i'
+ shift, capslock: 'I'
+}
+
+key O {
+ label: 'O'
+ base: 'o'
+ shift, capslock: 'O'
+}
+
+key P {
+ label: 'P'
+ base: 'p'
+ shift, capslock: 'P'
+}
+
+key LEFT_BRACKET {
+ label: '\u00b4'
+ base: '\u0301'
+ shift: '\u0308'
+ ralt: '['
+}
+
+key RIGHT_BRACKET {
+ label: '+'
+ base: '+'
+ shift: '*'
+ ralt: '\u0303'
+}
+
+### ROW 3
+
+key A {
+ label: 'A'
+ base: 'a'
+ shift, capslock: 'A'
+}
+
+key S {
+ label: 'S'
+ base: 's'
+ shift, capslock: 'S'
+}
+
+key D {
+ label: 'D'
+ base: 'd'
+ shift, capslock: 'D'
+}
+
+key F {
+ label: 'F'
+ base: 'f'
+ shift, capslock: 'F'
+}
+
+key G {
+ label: 'G'
+ base: 'g'
+ shift, capslock: 'G'
+}
+
+key H {
+ label: 'H'
+ base: 'h'
+ shift, capslock: 'H'
+}
+
+key J {
+ label: 'J'
+ base: 'j'
+ shift, capslock: 'J'
+}
+
+key K {
+ label: 'K'
+ base: 'k'
+ shift, capslock: 'K'
+}
+
+key L {
+ label: 'L'
+ base: 'l'
+ shift, capslock: 'L'
+}
+
+key SEMICOLON {
+ label: '\u00d1'
+ base: '\u00f1'
+ shift, capslock: '\u00d1'
+}
+
+key APOSTROPHE {
+ label: '{'
+ base: '{'
+ shift: '['
+ ralt: '\u0302'
+}
+
+key BACKSLASH {
+ label: '}'
+ base: '}'
+ shift: ']'
+ ralt: '\u0300'
+}
+
+### ROW 4
+
+key PLUS {
+ label: '<'
+ base: '<'
+ shift: '>'
+}
+
+key Z {
+ label: 'Z'
+ base: 'z'
+ shift, capslock: 'Z'
+}
+
+key X {
+ label: 'X'
+ base: 'x'
+ shift, capslock: 'X'
+}
+
+key C {
+ label: 'C'
+ base: 'c'
+ shift, capslock: 'C'
+}
+
+key V {
+ label: 'V'
+ base: 'v'
+ shift, capslock: 'V'
+}
+
+key B {
+ label: 'B'
+ base: 'b'
+ shift, capslock: 'B'
+}
+
+key N {
+ label: 'N'
+ base: 'n'
+ shift, capslock: 'N'
+}
+
+key M {
+ label: 'M'
+ base: 'm'
+ shift, capslock: 'M'
+}
+
+key COMMA {
+ label: ','
+ base: ','
+ shift: ';'
+}
+
+key PERIOD {
+ label: '.'
+ base: '.'
+ shift: ':'
+}
+
+key SLASH {
+ label: '-'
+ base: '-'
+ shift: '_'
+}
diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml
index 54c18f1..6239336 100644
--- a/packages/InputDevices/res/values/strings.xml
+++ b/packages/InputDevices/res/values/strings.xml
@@ -98,4 +98,19 @@
<!-- Ukrainian keyboard layout label. [CHAR LIMIT=35] -->
<string name="keyboard_layout_ukrainian">Ukrainian</string>
+
+ <!-- Arabic keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_arabic">Arabic</string>
+
+ <!-- Greek keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_greek">Greek</string>
+
+ <!-- Hebrew keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_hebrew">Hebrew</string>
+
+ <!-- Lithuanian keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_lithuanian">Lithuanian</string>
+
+ <!-- Spanish (Latin) keyboard layout label. [CHAR LIMIT=35] -->
+ <string name="keyboard_layout_spanish_latin">Spanish (Latin)</string>
</resources>
diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml
index 1f48a36..dc1db0b 100644
--- a/packages/InputDevices/res/xml/keyboard_layouts.xml
+++ b/packages/InputDevices/res/xml/keyboard_layouts.xml
@@ -123,4 +123,24 @@
<keyboard-layout android:name="keyboard_layout_ukrainian"
android:label="@string/keyboard_layout_ukrainian"
android:keyboardLayout="@raw/keyboard_layout_ukrainian" />
+
+ <keyboard-layout android:name="keyboard_layout_arabic"
+ android:label="@string/keyboard_layout_arabic"
+ android:keyboardLayout="@raw/keyboard_layout_arabic" />
+
+ <keyboard-layout android:name="keyboard_layout_greek"
+ android:label="@string/keyboard_layout_greek"
+ android:keyboardLayout="@raw/keyboard_layout_greek" />
+
+ <keyboard-layout android:name="keyboard_layout_hebrew"
+ android:label="@string/keyboard_layout_hebrew"
+ android:keyboardLayout="@raw/keyboard_layout_hebrew" />
+
+ <keyboard-layout android:name="keyboard_layout_lithuanian"
+ android:label="@string/keyboard_layout_lithuanian"
+ android:keyboardLayout="@raw/keyboard_layout_lithuanian" />
+
+ <keyboard-layout android:name="keyboard_layout_spanish_latin"
+ android:label="@string/keyboard_layout_spanish_latin"
+ android:keyboardLayout="@raw/keyboard_layout_spanish_latin" />
</keyboard-layouts>
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 36e53a3..6ee3e07 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -2708,6 +2708,9 @@
if (mResumedActivity == r) {
mResumedActivity = null;
}
+ if (mPausingActivity == r) {
+ mPausingActivity = null;
+ }
if (mService.mFocusedActivity == r) {
mService.mFocusedActivity = null;
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecService.java b/services/core/java/com/android/server/hdmi/HdmiCecService.java
index 36a6e84..0c5f868 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecService.java
@@ -366,7 +366,8 @@
if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
pw.println("Permission denial: can't dump HdmiCecService from pid="
- + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid());
+ + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()
+ + " without permission " + android.Manifest.permission.DUMP);
return;
}
final long ident = Binder.clearCallingIdentity();
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index f186b2c..983ca2d 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -170,7 +170,7 @@
int mActivePasswordNonLetter = 0;
int mFailedPasswordAttempts = 0;
- int mUserHandle;;
+ int mUserHandle;
int mPasswordOwner = -1;
long mLastMaximumTimeToLock = -1;
@@ -722,6 +722,10 @@
final int callingUid = Binder.getCallingUid();
final int userHandle = UserHandle.getUserId(callingUid);
final DevicePolicyData policy = getUserData(userHandle);
+
+ List<ActiveAdmin> candidates = new ArrayList<ActiveAdmin>();
+
+ // Build a list of admins for this uid matching the given ComponentName
if (who != null) {
ActiveAdmin admin = policy.mAdminMap.get(who);
if (admin == null) {
@@ -731,22 +735,43 @@
throw new SecurityException("Admin " + who + " is not owned by uid "
+ Binder.getCallingUid());
}
- if (!admin.info.usesPolicy(reqPolicy)) {
- throw new SecurityException("Admin " + admin.info.getComponent()
- + " did not specify uses-policy for: "
- + admin.info.getTagForPolicy(reqPolicy));
- }
- return admin;
+ candidates.add(admin);
} else {
- final int N = policy.mAdminList.size();
- for (int i=0; i<N; i++) {
- ActiveAdmin admin = policy.mAdminList.get(i);
- if (admin.getUid() == callingUid && admin.info.usesPolicy(reqPolicy)) {
+ for (ActiveAdmin admin : policy.mAdminList) {
+ if (admin.getUid() == callingUid) {
+ candidates.add(admin);
+ }
+ }
+ }
+
+ // Try to find an admin which can use reqPolicy
+ for (ActiveAdmin admin : candidates) {
+ boolean ownsDevice = isDeviceOwner(admin.info.getPackageName());
+ boolean ownsProfile = (getProfileOwner(userHandle) != null
+ && getProfileOwner(userHandle).equals(admin.info.getPackageName()));
+
+ if (reqPolicy == DeviceAdminInfo.USES_POLICY_DEVICE_OWNER) {
+ if (ownsDevice) {
+ return admin;
+ }
+ } else if (reqPolicy == DeviceAdminInfo.USES_POLICY_PROFILE_OWNER) {
+ if (ownsDevice || ownsProfile) {
+ return admin;
+ }
+ } else {
+ if (admin.info.usesPolicy(reqPolicy)) {
return admin;
}
}
+ }
+
+ if (who != null) {
+ throw new SecurityException("Admin " + candidates.get(0).info.getComponent()
+ + " did not specify uses-policy for: "
+ + candidates.get(0).info.getTagForPolicy(reqPolicy));
+ } else {
throw new SecurityException("No active admin owned by uid "
- + Binder.getCallingUid() + " for policy #" + reqPolicy);
+ + Binder.getCallingUid() + " for policy:" + reqPolicy);
}
}
@@ -2966,64 +2991,41 @@
}
}
- private boolean isProfileOwner(String packageName, int userId) {
- String profileOwnerPackage = getProfileOwner(userId);
- // TODO: make public and connect with isProfileOwnerApp in DPM
- return profileOwnerPackage != null && profileOwnerPackage.equals(packageName);
- }
-
- public void addPersistentPreferredActivity(ComponentName admin, IntentFilter filter,
+ public void addPersistentPreferredActivity(ComponentName who, IntentFilter filter,
ComponentName activity) {
- int callingUserId = UserHandle.getCallingUserId();
- Slog.d(LOG_TAG,"called by user " + callingUserId);
synchronized (this) {
- ActiveAdmin aa = getActiveAdminUncheckedLocked(admin, callingUserId);
- if (aa == null) {
- throw new SecurityException("No active admin " + admin);
- } else {
- if (isProfileOwner(admin.getPackageName(), callingUserId)
- || isDeviceOwner(admin.getPackageName())) {
- IPackageManager pm = AppGlobals.getPackageManager();
- long id = Binder.clearCallingIdentity();
- try {
- pm.addPersistentPreferredActivity(filter, activity, callingUserId);
- } catch (RemoteException re) {
- // Shouldn't happen
- } finally {
- restoreCallingIdentity(id);
- }
- } else {
- throw new SecurityException("Admin " + admin +
- "is not device owner or profile owner" );
- }
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+ IPackageManager pm = AppGlobals.getPackageManager();
+ long id = Binder.clearCallingIdentity();
+ try {
+ pm.addPersistentPreferredActivity(filter, activity, UserHandle.getCallingUserId());
+ } catch (RemoteException re) {
+ // Shouldn't happen
+ } finally {
+ restoreCallingIdentity(id);
}
}
}
- public void clearPackagePersistentPreferredActivities(ComponentName admin,
- String packageName) {
- int callingUserId = UserHandle.getCallingUserId();
- Slog.d(LOG_TAG,"called by user " + callingUserId);
+ public void clearPackagePersistentPreferredActivities(ComponentName who, String packageName) {
synchronized (this) {
- ActiveAdmin aa = getActiveAdminUncheckedLocked(admin, callingUserId);
- if (aa == null) {
- throw new SecurityException("No active admin " + admin);
- } else {
- if (isProfileOwner(admin.getPackageName(), callingUserId)
- || isDeviceOwner(admin.getPackageName())) {
- IPackageManager pm = AppGlobals.getPackageManager();
- long id = Binder.clearCallingIdentity();
- try{
- pm.clearPackagePersistentPreferredActivities(packageName, callingUserId);
- } catch (RemoteException re) {
- // Shouldn't happen
- } finally {
- restoreCallingIdentity(id);
- }
- } else {
- throw new SecurityException("Admin " + admin +
- "is not device owner or profile owner" );
- }
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+ getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+
+ IPackageManager pm = AppGlobals.getPackageManager();
+ long id = Binder.clearCallingIdentity();
+ try {
+ pm.clearPackagePersistentPreferredActivities(packageName, UserHandle.getCallingUserId());
+ } catch (RemoteException re) {
+ // Shouldn't happen
+ } finally {
+ restoreCallingIdentity(id);
}
}
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index c925669..7b55f4b 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -116,6 +116,8 @@
"com.android.server.usb.UsbService$Lifecycle";
private static final String WIFI_SERVICE_CLASS =
"com.android.server.wifi.WifiService";
+ private static final String WIFI_HOTSPOT_SERVICE_CLASS =
+ "com.android.server.wifi.hotspot.WifiHotspotService";
private static final String WIFI_P2P_SERVICE_CLASS =
"com.android.server.wifi.p2p.WifiP2pService";
private static final String HDMI_CEC_SERVICE_CLASS =
@@ -614,6 +616,12 @@
}
try {
+ mSystemServiceManager.startService(WIFI_HOTSPOT_SERVICE_CLASS);
+ } catch (Throwable e) {
+ reportWtf("starting Wi-Fi HotspotService", e);
+ }
+
+ try {
mSystemServiceManager.startService(WIFI_SERVICE_CLASS);
} catch (Throwable e) {
reportWtf("starting Wi-Fi Service", e);
diff --git a/services/usb/java/com/android/server/usb/UsbDebuggingManager.java b/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
index ce953a4..f73d425 100644
--- a/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
@@ -17,8 +17,10 @@
package com.android.server.usb;
import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Resources;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.Handler;
@@ -244,15 +246,18 @@
}
private void showConfirmationDialog(String key, String fingerprints) {
- Intent dialogIntent = new Intent();
+ Intent intent = new Intent();
- dialogIntent.setClassName("com.android.systemui",
- "com.android.systemui.usb.UsbDebuggingActivity");
- dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- dialogIntent.putExtra("key", key);
- dialogIntent.putExtra("fingerprints", fingerprints);
+ ComponentName componentName = ComponentName.unflattenFromString(
+ Resources.getSystem().getString(
+ com.android.internal.R.string.config_customAdbPublicKeyActivity));
+ intent.setClassName(componentName.getPackageName(),
+ componentName.getClassName());
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra("key", key);
+ intent.putExtra("fingerprints", fingerprints);
try {
- mContext.startActivity(dialogIntent);
+ mContext.startActivity(intent);
} catch (ActivityNotFoundException e) {
Slog.e(TAG, "unable to start UsbDebuggingActivity");
}
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 323e0ac..1c75658 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -101,8 +101,93 @@
/** Unknown error or not specified */
public static final int ERROR_UNSPECIFIED = 36;
+ /** Smallest valid value for call disconnect codes. */
+ public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
+ /** Largest valid value for call disconnect codes. */
+ public static final int MAXIMUM_VALID_VALUE = ERROR_UNSPECIFIED;
+
/** Private constructor to avoid class instantiation. */
private DisconnectCause() {
// Do nothing.
}
+
+ /** Returns descriptive string for the specified disconnect cause. */
+ public static String toString(int cause) {
+ switch (cause) {
+ case NOT_DISCONNECTED:
+ return "NOT_DISCONNECTED";
+ case INCOMING_MISSED:
+ return "INCOMING_MISSED";
+ case NORMAL:
+ return "NORMAL";
+ case LOCAL:
+ return "LOCAL";
+ case BUSY:
+ return "BUSY";
+ case CONGESTION:
+ return "CONGESTION";
+ case INVALID_NUMBER:
+ return "INVALID_NUMBER";
+ case NUMBER_UNREACHABLE:
+ return "NUMBER_UNREACHABLE";
+ case SERVER_UNREACHABLE:
+ return "SERVER_UNREACHABLE";
+ case INVALID_CREDENTIALS:
+ return "INVALID_CREDENTIALS";
+ case OUT_OF_NETWORK:
+ return "OUT_OF_NETWORK";
+ case SERVER_ERROR:
+ return "SERVER_ERROR";
+ case TIMED_OUT:
+ return "TIMED_OUT";
+ case LOST_SIGNAL:
+ return "LOST_SIGNAL";
+ case LIMIT_EXCEEDED:
+ return "LIMIT_EXCEEDED";
+ case INCOMING_REJECTED:
+ return "INCOMING_REJECTED";
+ case POWER_OFF:
+ return "POWER_OFF";
+ case OUT_OF_SERVICE:
+ return "OUT_OF_SERVICE";
+ case ICC_ERROR:
+ return "ICC_ERROR";
+ case CALL_BARRED:
+ return "CALL_BARRED";
+ case FDN_BLOCKED:
+ return "FDN_BLOCKED";
+ case CS_RESTRICTED:
+ return "CS_RESTRICTED";
+ case CS_RESTRICTED_NORMAL:
+ return "CS_RESTRICTED_NORMAL";
+ case CS_RESTRICTED_EMERGENCY:
+ return "CS_RESTRICTED_EMERGENCY";
+ case UNOBTAINABLE_NUMBER:
+ return "UNOBTAINABLE_NUMBER";
+ case CDMA_LOCKED_UNTIL_POWER_CYCLE:
+ return "CDMA_LOCKED_UNTIL_POWER_CYCLE";
+ case CDMA_DROP:
+ return "CDMA_DROP";
+ case CDMA_INTERCEPT:
+ return "CDMA_INTERCEPT";
+ case CDMA_REORDER:
+ return "CDMA_REORDER";
+ case CDMA_SO_REJECT:
+ return "CDMA_SO_REJECT";
+ case CDMA_RETRY_ORDER:
+ return "CDMA_RETRY_ORDER";
+ case CDMA_ACCESS_FAILURE:
+ return "CDMA_ACCESS_FAILURE";
+ case CDMA_PREEMPTED:
+ return "CDMA_PREEMPTED";
+ case CDMA_NOT_EMERGENCY:
+ return "CDMA_NOT_EMERGENCY";
+ case CDMA_ACCESS_BLOCKED:
+ return "CDMA_ACCESS_BLOCKED";
+ case ERROR_UNSPECIFIED:
+ return "ERROR_UNSPECIFIED";
+ default:
+ return "INVALID";
+ }
+ }
}
diff --git a/core/java/android/view/DisplayList.java b/wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl
similarity index 64%
rename from core/java/android/view/DisplayList.java
rename to wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl
index ed52803..2b1601b 100644
--- a/core/java/android/view/DisplayList.java
+++ b/wifi/java/android/net/wifi/hotspot/IWifiHotspotManager.aidl
@@ -1,11 +1,11 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
+/**
+ * Copyright (c) 2014, 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
+ * 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,
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-package android.view;
+package android.net.wifi.hotspot;
-/** TODO: Remove once frameworks/webview is updated
- * @hide
+/**
+ * Interface that allows controlling and querying Hotspot connectivity.
+ *
+ * {@hide}
*/
-public class DisplayList {
- /** @hide */
- public static final int STATUS_DONE = 0x0;
+interface IWifiHotspotManager
+{
+ void test();
}
+
diff --git a/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java b/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java
new file mode 100644
index 0000000..ac15017
--- /dev/null
+++ b/wifi/java/android/net/wifi/hotspot/WifiHotspotManager.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2014 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.net.wifi.hotspot;
+
+import android.content.Context;
+import android.os.RemoteException;
+import android.util.Log;
+
+/**
+ * TODO: doc
+ */
+public class WifiHotspotManager {
+
+ private static final String TAG = "WifiHotspotManager";
+
+ private Context mContext;
+ IWifiHotspotManager mService;
+
+ public WifiHotspotManager(Context context, IWifiHotspotManager service) {
+ mContext = context;
+ mService = service;
+ }
+
+ public void test() {
+ try{
+ Log.d(TAG, "test()");
+ mService.test();
+ }
+ catch (RemoteException e) {
+ Log.e(TAG, "test() exception");
+ e.printStackTrace();
+ }
+ }
+}