Merge "Accomoditing API Review feedback for WifiScanner"
diff --git a/api/current.txt b/api/current.txt
index 4f9d52e..962b42f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1867,28 +1867,28 @@
field public static final int TextAppearance_Medium = 16973892; // 0x1030044
field public static final int TextAppearance_Medium_Inverse = 16973893; // 0x1030045
field public static final int TextAppearance_Quantum = 16974348; // 0x103020c
- field public static final int TextAppearance_Quantum_Body1 = 16974543; // 0x10302cf
- field public static final int TextAppearance_Quantum_Body2 = 16974542; // 0x10302ce
- field public static final int TextAppearance_Quantum_Button = 16974546; // 0x10302d2
- field public static final int TextAppearance_Quantum_Caption = 16974544; // 0x10302d0
+ field public static final int TextAppearance_Quantum_Body1 = 16974545; // 0x10302d1
+ field public static final int TextAppearance_Quantum_Body2 = 16974544; // 0x10302d0
+ field public static final int TextAppearance_Quantum_Button = 16974548; // 0x10302d4
+ field public static final int TextAppearance_Quantum_Caption = 16974546; // 0x10302d2
field public static final int TextAppearance_Quantum_DialogWindowTitle = 16974349; // 0x103020d
- field public static final int TextAppearance_Quantum_Display1 = 16974538; // 0x10302ca
- field public static final int TextAppearance_Quantum_Display2 = 16974537; // 0x10302c9
- field public static final int TextAppearance_Quantum_Display3 = 16974536; // 0x10302c8
- field public static final int TextAppearance_Quantum_Display4 = 16974535; // 0x10302c7
- field public static final int TextAppearance_Quantum_Headline = 16974539; // 0x10302cb
+ field public static final int TextAppearance_Quantum_Display1 = 16974540; // 0x10302cc
+ field public static final int TextAppearance_Quantum_Display2 = 16974539; // 0x10302cb
+ field public static final int TextAppearance_Quantum_Display3 = 16974538; // 0x10302ca
+ field public static final int TextAppearance_Quantum_Display4 = 16974537; // 0x10302c9
+ field public static final int TextAppearance_Quantum_Headline = 16974541; // 0x10302cd
field public static final int TextAppearance_Quantum_Inverse = 16974350; // 0x103020e
field public static final int TextAppearance_Quantum_Large = 16974351; // 0x103020f
field public static final int TextAppearance_Quantum_Large_Inverse = 16974352; // 0x1030210
field public static final int TextAppearance_Quantum_Medium = 16974353; // 0x1030211
field public static final int TextAppearance_Quantum_Medium_Inverse = 16974354; // 0x1030212
- field public static final int TextAppearance_Quantum_Menu = 16974545; // 0x10302d1
+ field public static final int TextAppearance_Quantum_Menu = 16974547; // 0x10302d3
field public static final int TextAppearance_Quantum_SearchResult_Subtitle = 16974355; // 0x1030213
field public static final int TextAppearance_Quantum_SearchResult_Title = 16974356; // 0x1030214
field public static final int TextAppearance_Quantum_Small = 16974357; // 0x1030215
field public static final int TextAppearance_Quantum_Small_Inverse = 16974358; // 0x1030216
- field public static final int TextAppearance_Quantum_Subhead = 16974541; // 0x10302cd
- field public static final int TextAppearance_Quantum_Title = 16974540; // 0x10302cc
+ field public static final int TextAppearance_Quantum_Subhead = 16974543; // 0x10302cf
+ field public static final int TextAppearance_Quantum_Title = 16974542; // 0x10302ce
field public static final int TextAppearance_Quantum_Widget = 16974360; // 0x1030218
field public static final int TextAppearance_Quantum_Widget_ActionBar_Menu = 16974361; // 0x1030219
field public static final int TextAppearance_Quantum_Widget_ActionBar_Subtitle = 16974362; // 0x103021a
@@ -1935,11 +1935,11 @@
field public static final int TextAppearance_Widget_TextView_SpinnerItem = 16973906; // 0x1030052
field public static final int TextAppearance_WindowTitle = 16973907; // 0x1030053
field public static final int Theme = 16973829; // 0x1030005
- field public static final int ThemeOverlay = 16974410; // 0x103024a
- field public static final int ThemeOverlay_Quantum = 16974411; // 0x103024b
- field public static final int ThemeOverlay_Quantum_ActionBarWidget = 16974414; // 0x103024e
- field public static final int ThemeOverlay_Quantum_Dark = 16974413; // 0x103024d
- field public static final int ThemeOverlay_Quantum_Light = 16974412; // 0x103024c
+ field public static final int ThemeOverlay = 16974412; // 0x103024c
+ field public static final int ThemeOverlay_Quantum = 16974413; // 0x103024d
+ field public static final int ThemeOverlay_Quantum_ActionBarWidget = 16974416; // 0x1030250
+ field public static final int ThemeOverlay_Quantum_Dark = 16974415; // 0x103024f
+ field public static final int ThemeOverlay_Quantum_Light = 16974414; // 0x103024e
field public static final int Theme_Black = 16973832; // 0x1030008
field public static final int Theme_Black_NoTitleBar = 16973833; // 0x1030009
field public static final int Theme_Black_NoTitleBar_Fullscreen = 16973834; // 0x103000a
@@ -2019,26 +2019,28 @@
field public static final int Theme_Quantum_Dialog_NoActionBar = 16974385; // 0x1030231
field public static final int Theme_Quantum_Dialog_NoActionBar_MinWidth = 16974386; // 0x1030232
field public static final int Theme_Quantum_InputMethod = 16974389; // 0x1030235
- field public static final int Theme_Quantum_Light = 16974397; // 0x103023d
- field public static final int Theme_Quantum_Light_DarkActionBar = 16974398; // 0x103023e
- field public static final int Theme_Quantum_Light_Dialog = 16974399; // 0x103023f
- field public static final int Theme_Quantum_Light_DialogWhenLarge = 16974403; // 0x1030243
- field public static final int Theme_Quantum_Light_DialogWhenLarge_NoActionBar = 16974404; // 0x1030244
- field public static final int Theme_Quantum_Light_Dialog_MinWidth = 16974400; // 0x1030240
- field public static final int Theme_Quantum_Light_Dialog_NoActionBar = 16974401; // 0x1030241
- field public static final int Theme_Quantum_Light_Dialog_NoActionBar_MinWidth = 16974402; // 0x1030242
- field public static final int Theme_Quantum_Light_NoActionBar = 16974405; // 0x1030245
- field public static final int Theme_Quantum_Light_NoActionBar_Fullscreen = 16974406; // 0x1030246
- field public static final int Theme_Quantum_Light_NoActionBar_Overscan = 16974407; // 0x1030247
- field public static final int Theme_Quantum_Light_NoActionBar_TranslucentDecor = 16974408; // 0x1030248
- field public static final int Theme_Quantum_Light_Panel = 16974409; // 0x1030249
+ field public static final int Theme_Quantum_Light = 16974398; // 0x103023e
+ field public static final int Theme_Quantum_Light_DarkActionBar = 16974399; // 0x103023f
+ field public static final int Theme_Quantum_Light_Dialog = 16974400; // 0x1030240
+ field public static final int Theme_Quantum_Light_DialogWhenLarge = 16974404; // 0x1030244
+ field public static final int Theme_Quantum_Light_DialogWhenLarge_NoActionBar = 16974405; // 0x1030245
+ field public static final int Theme_Quantum_Light_Dialog_MinWidth = 16974401; // 0x1030241
+ field public static final int Theme_Quantum_Light_Dialog_NoActionBar = 16974402; // 0x1030242
+ field public static final int Theme_Quantum_Light_Dialog_NoActionBar_MinWidth = 16974403; // 0x1030243
+ field public static final int Theme_Quantum_Light_NoActionBar = 16974406; // 0x1030246
+ field public static final int Theme_Quantum_Light_NoActionBar_Fullscreen = 16974407; // 0x1030247
+ field public static final int Theme_Quantum_Light_NoActionBar_Overscan = 16974408; // 0x1030248
+ field public static final int Theme_Quantum_Light_NoActionBar_TranslucentDecor = 16974409; // 0x1030249
+ field public static final int Theme_Quantum_Light_Panel = 16974410; // 0x103024a
+ field public static final int Theme_Quantum_Light_Voice = 16974411; // 0x103024b
field public static final int Theme_Quantum_NoActionBar = 16974390; // 0x1030236
field public static final int Theme_Quantum_NoActionBar_Fullscreen = 16974391; // 0x1030237
field public static final int Theme_Quantum_NoActionBar_Overscan = 16974392; // 0x1030238
field public static final int Theme_Quantum_NoActionBar_TranslucentDecor = 16974393; // 0x1030239
field public static final int Theme_Quantum_Panel = 16974394; // 0x103023a
- field public static final int Theme_Quantum_Wallpaper = 16974395; // 0x103023b
- field public static final int Theme_Quantum_Wallpaper_NoTitleBar = 16974396; // 0x103023c
+ field public static final int Theme_Quantum_Voice = 16974395; // 0x103023b
+ field public static final int Theme_Quantum_Wallpaper = 16974396; // 0x103023c
+ field public static final int Theme_Quantum_Wallpaper_NoTitleBar = 16974397; // 0x103023d
field public static final int Theme_Translucent = 16973839; // 0x103000f
field public static final int Theme_Translucent_NoTitleBar = 16973840; // 0x1030010
field public static final int Theme_Translucent_NoTitleBar_Fullscreen = 16973841; // 0x1030011
@@ -2327,126 +2329,126 @@
field public static final int Widget_ProgressBar_Large_Inverse = 16973916; // 0x103005c
field public static final int Widget_ProgressBar_Small = 16973854; // 0x103001e
field public static final int Widget_ProgressBar_Small_Inverse = 16973917; // 0x103005d
- field public static final int Widget_Quantum = 16974415; // 0x103024f
- field public static final int Widget_Quantum_ActionBar = 16974416; // 0x1030250
- field public static final int Widget_Quantum_ActionBar_Solid = 16974417; // 0x1030251
- field public static final int Widget_Quantum_ActionBar_TabBar = 16974418; // 0x1030252
- field public static final int Widget_Quantum_ActionBar_TabText = 16974419; // 0x1030253
- field public static final int Widget_Quantum_ActionBar_TabView = 16974420; // 0x1030254
- field public static final int Widget_Quantum_ActionButton = 16974421; // 0x1030255
- field public static final int Widget_Quantum_ActionButton_CloseMode = 16974422; // 0x1030256
- field public static final int Widget_Quantum_ActionButton_Overflow = 16974423; // 0x1030257
- field public static final int Widget_Quantum_ActionMode = 16974424; // 0x1030258
- field public static final int Widget_Quantum_AutoCompleteTextView = 16974425; // 0x1030259
- field public static final int Widget_Quantum_Button = 16974426; // 0x103025a
- field public static final int Widget_Quantum_ButtonBar = 16974432; // 0x1030260
- field public static final int Widget_Quantum_ButtonBar_AlertDialog = 16974433; // 0x1030261
- field public static final int Widget_Quantum_Button_Borderless = 16974427; // 0x103025b
- field public static final int Widget_Quantum_Button_Borderless_Small = 16974428; // 0x103025c
- field public static final int Widget_Quantum_Button_Inset = 16974429; // 0x103025d
- field public static final int Widget_Quantum_Button_Small = 16974430; // 0x103025e
- field public static final int Widget_Quantum_Button_Toggle = 16974431; // 0x103025f
- field public static final int Widget_Quantum_CalendarView = 16974434; // 0x1030262
- field public static final int Widget_Quantum_CheckedTextView = 16974435; // 0x1030263
- field public static final int Widget_Quantum_CompoundButton_CheckBox = 16974436; // 0x1030264
- field public static final int Widget_Quantum_CompoundButton_RadioButton = 16974437; // 0x1030265
- field public static final int Widget_Quantum_CompoundButton_Star = 16974438; // 0x1030266
- field public static final int Widget_Quantum_DatePicker = 16974439; // 0x1030267
- field public static final int Widget_Quantum_DropDownItem = 16974440; // 0x1030268
- field public static final int Widget_Quantum_DropDownItem_Spinner = 16974441; // 0x1030269
- field public static final int Widget_Quantum_EditText = 16974442; // 0x103026a
- field public static final int Widget_Quantum_ExpandableListView = 16974443; // 0x103026b
- field public static final int Widget_Quantum_FastScroll = 16974444; // 0x103026c
- field public static final int Widget_Quantum_GridView = 16974445; // 0x103026d
- field public static final int Widget_Quantum_HorizontalScrollView = 16974446; // 0x103026e
- field public static final int Widget_Quantum_ImageButton = 16974447; // 0x103026f
- field public static final int Widget_Quantum_Light = 16974474; // 0x103028a
- field public static final int Widget_Quantum_Light_ActionBar = 16974475; // 0x103028b
- field public static final int Widget_Quantum_Light_ActionBar_Solid = 16974476; // 0x103028c
- field public static final int Widget_Quantum_Light_ActionBar_TabBar = 16974477; // 0x103028d
- field public static final int Widget_Quantum_Light_ActionBar_TabText = 16974478; // 0x103028e
- field public static final int Widget_Quantum_Light_ActionBar_TabView = 16974479; // 0x103028f
- field public static final int Widget_Quantum_Light_ActionButton = 16974480; // 0x1030290
- field public static final int Widget_Quantum_Light_ActionButton_CloseMode = 16974481; // 0x1030291
- field public static final int Widget_Quantum_Light_ActionButton_Overflow = 16974482; // 0x1030292
- field public static final int Widget_Quantum_Light_ActionMode = 16974483; // 0x1030293
- field public static final int Widget_Quantum_Light_AutoCompleteTextView = 16974484; // 0x1030294
- field public static final int Widget_Quantum_Light_Button = 16974485; // 0x1030295
- field public static final int Widget_Quantum_Light_ButtonBar = 16974491; // 0x103029b
- field public static final int Widget_Quantum_Light_ButtonBar_AlertDialog = 16974492; // 0x103029c
- field public static final int Widget_Quantum_Light_Button_Borderless = 16974486; // 0x1030296
- field public static final int Widget_Quantum_Light_Button_Borderless_Small = 16974487; // 0x1030297
- field public static final int Widget_Quantum_Light_Button_Inset = 16974488; // 0x1030298
- field public static final int Widget_Quantum_Light_Button_Small = 16974489; // 0x1030299
- field public static final int Widget_Quantum_Light_Button_Toggle = 16974490; // 0x103029a
- field public static final int Widget_Quantum_Light_CalendarView = 16974493; // 0x103029d
- field public static final int Widget_Quantum_Light_CheckedTextView = 16974494; // 0x103029e
- field public static final int Widget_Quantum_Light_CompoundButton_CheckBox = 16974495; // 0x103029f
- field public static final int Widget_Quantum_Light_CompoundButton_RadioButton = 16974496; // 0x10302a0
- field public static final int Widget_Quantum_Light_CompoundButton_Star = 16974497; // 0x10302a1
- field public static final int Widget_Quantum_Light_DropDownItem = 16974498; // 0x10302a2
- field public static final int Widget_Quantum_Light_DropDownItem_Spinner = 16974499; // 0x10302a3
- field public static final int Widget_Quantum_Light_EditText = 16974500; // 0x10302a4
- field public static final int Widget_Quantum_Light_ExpandableListView = 16974501; // 0x10302a5
- field public static final int Widget_Quantum_Light_FastScroll = 16974502; // 0x10302a6
- field public static final int Widget_Quantum_Light_GridView = 16974503; // 0x10302a7
- field public static final int Widget_Quantum_Light_HorizontalScrollView = 16974504; // 0x10302a8
- field public static final int Widget_Quantum_Light_ImageButton = 16974505; // 0x10302a9
- field public static final int Widget_Quantum_Light_ListPopupWindow = 16974506; // 0x10302aa
- field public static final int Widget_Quantum_Light_ListView = 16974507; // 0x10302ab
- field public static final int Widget_Quantum_Light_ListView_DropDown = 16974508; // 0x10302ac
- field public static final int Widget_Quantum_Light_MediaRouteButton = 16974509; // 0x10302ad
- field public static final int Widget_Quantum_Light_PopupMenu = 16974510; // 0x10302ae
- field public static final int Widget_Quantum_Light_PopupMenu_Overflow = 16974511; // 0x10302af
- field public static final int Widget_Quantum_Light_PopupWindow = 16974512; // 0x10302b0
- field public static final int Widget_Quantum_Light_ProgressBar = 16974513; // 0x10302b1
- field public static final int Widget_Quantum_Light_ProgressBar_Horizontal = 16974514; // 0x10302b2
- field public static final int Widget_Quantum_Light_ProgressBar_Inverse = 16974515; // 0x10302b3
- field public static final int Widget_Quantum_Light_ProgressBar_Large = 16974516; // 0x10302b4
- field public static final int Widget_Quantum_Light_ProgressBar_Large_Inverse = 16974517; // 0x10302b5
- field public static final int Widget_Quantum_Light_ProgressBar_Small = 16974518; // 0x10302b6
- field public static final int Widget_Quantum_Light_ProgressBar_Small_Inverse = 16974519; // 0x10302b7
- field public static final int Widget_Quantum_Light_ProgressBar_Small_Title = 16974520; // 0x10302b8
- field public static final int Widget_Quantum_Light_RatingBar = 16974521; // 0x10302b9
- field public static final int Widget_Quantum_Light_RatingBar_Indicator = 16974522; // 0x10302ba
- field public static final int Widget_Quantum_Light_RatingBar_Small = 16974523; // 0x10302bb
- field public static final int Widget_Quantum_Light_ScrollView = 16974524; // 0x10302bc
- field public static final int Widget_Quantum_Light_SeekBar = 16974525; // 0x10302bd
- field public static final int Widget_Quantum_Light_SegmentedButton = 16974526; // 0x10302be
- field public static final int Widget_Quantum_Light_Spinner = 16974528; // 0x10302c0
- field public static final int Widget_Quantum_Light_StackView = 16974527; // 0x10302bf
- field public static final int Widget_Quantum_Light_Tab = 16974529; // 0x10302c1
- field public static final int Widget_Quantum_Light_TabWidget = 16974530; // 0x10302c2
- field public static final int Widget_Quantum_Light_TextView = 16974531; // 0x10302c3
- field public static final int Widget_Quantum_Light_TextView_SpinnerItem = 16974532; // 0x10302c4
- field public static final int Widget_Quantum_Light_WebTextView = 16974533; // 0x10302c5
- field public static final int Widget_Quantum_Light_WebView = 16974534; // 0x10302c6
- field public static final int Widget_Quantum_ListPopupWindow = 16974448; // 0x1030270
- field public static final int Widget_Quantum_ListView = 16974449; // 0x1030271
- field public static final int Widget_Quantum_ListView_DropDown = 16974450; // 0x1030272
- field public static final int Widget_Quantum_MediaRouteButton = 16974451; // 0x1030273
- field public static final int Widget_Quantum_PopupMenu = 16974452; // 0x1030274
- field public static final int Widget_Quantum_PopupMenu_Overflow = 16974453; // 0x1030275
- field public static final int Widget_Quantum_PopupWindow = 16974454; // 0x1030276
- field public static final int Widget_Quantum_ProgressBar = 16974455; // 0x1030277
- field public static final int Widget_Quantum_ProgressBar_Horizontal = 16974456; // 0x1030278
- field public static final int Widget_Quantum_ProgressBar_Large = 16974457; // 0x1030279
- field public static final int Widget_Quantum_ProgressBar_Small = 16974458; // 0x103027a
- field public static final int Widget_Quantum_ProgressBar_Small_Title = 16974459; // 0x103027b
- field public static final int Widget_Quantum_RatingBar = 16974460; // 0x103027c
- field public static final int Widget_Quantum_RatingBar_Indicator = 16974461; // 0x103027d
- field public static final int Widget_Quantum_RatingBar_Small = 16974462; // 0x103027e
- field public static final int Widget_Quantum_ScrollView = 16974463; // 0x103027f
- field public static final int Widget_Quantum_SeekBar = 16974464; // 0x1030280
- field public static final int Widget_Quantum_SegmentedButton = 16974465; // 0x1030281
- field public static final int Widget_Quantum_Spinner = 16974467; // 0x1030283
- field public static final int Widget_Quantum_StackView = 16974466; // 0x1030282
- field public static final int Widget_Quantum_Tab = 16974468; // 0x1030284
- field public static final int Widget_Quantum_TabWidget = 16974469; // 0x1030285
- field public static final int Widget_Quantum_TextView = 16974470; // 0x1030286
- field public static final int Widget_Quantum_TextView_SpinnerItem = 16974471; // 0x1030287
- field public static final int Widget_Quantum_WebTextView = 16974472; // 0x1030288
- field public static final int Widget_Quantum_WebView = 16974473; // 0x1030289
+ field public static final int Widget_Quantum = 16974417; // 0x1030251
+ field public static final int Widget_Quantum_ActionBar = 16974418; // 0x1030252
+ field public static final int Widget_Quantum_ActionBar_Solid = 16974419; // 0x1030253
+ field public static final int Widget_Quantum_ActionBar_TabBar = 16974420; // 0x1030254
+ field public static final int Widget_Quantum_ActionBar_TabText = 16974421; // 0x1030255
+ field public static final int Widget_Quantum_ActionBar_TabView = 16974422; // 0x1030256
+ field public static final int Widget_Quantum_ActionButton = 16974423; // 0x1030257
+ field public static final int Widget_Quantum_ActionButton_CloseMode = 16974424; // 0x1030258
+ field public static final int Widget_Quantum_ActionButton_Overflow = 16974425; // 0x1030259
+ field public static final int Widget_Quantum_ActionMode = 16974426; // 0x103025a
+ field public static final int Widget_Quantum_AutoCompleteTextView = 16974427; // 0x103025b
+ field public static final int Widget_Quantum_Button = 16974428; // 0x103025c
+ field public static final int Widget_Quantum_ButtonBar = 16974434; // 0x1030262
+ field public static final int Widget_Quantum_ButtonBar_AlertDialog = 16974435; // 0x1030263
+ field public static final int Widget_Quantum_Button_Borderless = 16974429; // 0x103025d
+ field public static final int Widget_Quantum_Button_Borderless_Small = 16974430; // 0x103025e
+ field public static final int Widget_Quantum_Button_Inset = 16974431; // 0x103025f
+ field public static final int Widget_Quantum_Button_Small = 16974432; // 0x1030260
+ field public static final int Widget_Quantum_Button_Toggle = 16974433; // 0x1030261
+ field public static final int Widget_Quantum_CalendarView = 16974436; // 0x1030264
+ field public static final int Widget_Quantum_CheckedTextView = 16974437; // 0x1030265
+ field public static final int Widget_Quantum_CompoundButton_CheckBox = 16974438; // 0x1030266
+ field public static final int Widget_Quantum_CompoundButton_RadioButton = 16974439; // 0x1030267
+ field public static final int Widget_Quantum_CompoundButton_Star = 16974440; // 0x1030268
+ field public static final int Widget_Quantum_DatePicker = 16974441; // 0x1030269
+ field public static final int Widget_Quantum_DropDownItem = 16974442; // 0x103026a
+ field public static final int Widget_Quantum_DropDownItem_Spinner = 16974443; // 0x103026b
+ field public static final int Widget_Quantum_EditText = 16974444; // 0x103026c
+ field public static final int Widget_Quantum_ExpandableListView = 16974445; // 0x103026d
+ field public static final int Widget_Quantum_FastScroll = 16974446; // 0x103026e
+ field public static final int Widget_Quantum_GridView = 16974447; // 0x103026f
+ field public static final int Widget_Quantum_HorizontalScrollView = 16974448; // 0x1030270
+ field public static final int Widget_Quantum_ImageButton = 16974449; // 0x1030271
+ field public static final int Widget_Quantum_Light = 16974476; // 0x103028c
+ field public static final int Widget_Quantum_Light_ActionBar = 16974477; // 0x103028d
+ field public static final int Widget_Quantum_Light_ActionBar_Solid = 16974478; // 0x103028e
+ field public static final int Widget_Quantum_Light_ActionBar_TabBar = 16974479; // 0x103028f
+ field public static final int Widget_Quantum_Light_ActionBar_TabText = 16974480; // 0x1030290
+ field public static final int Widget_Quantum_Light_ActionBar_TabView = 16974481; // 0x1030291
+ field public static final int Widget_Quantum_Light_ActionButton = 16974482; // 0x1030292
+ field public static final int Widget_Quantum_Light_ActionButton_CloseMode = 16974483; // 0x1030293
+ field public static final int Widget_Quantum_Light_ActionButton_Overflow = 16974484; // 0x1030294
+ field public static final int Widget_Quantum_Light_ActionMode = 16974485; // 0x1030295
+ field public static final int Widget_Quantum_Light_AutoCompleteTextView = 16974486; // 0x1030296
+ field public static final int Widget_Quantum_Light_Button = 16974487; // 0x1030297
+ field public static final int Widget_Quantum_Light_ButtonBar = 16974493; // 0x103029d
+ field public static final int Widget_Quantum_Light_ButtonBar_AlertDialog = 16974494; // 0x103029e
+ field public static final int Widget_Quantum_Light_Button_Borderless = 16974488; // 0x1030298
+ field public static final int Widget_Quantum_Light_Button_Borderless_Small = 16974489; // 0x1030299
+ field public static final int Widget_Quantum_Light_Button_Inset = 16974490; // 0x103029a
+ field public static final int Widget_Quantum_Light_Button_Small = 16974491; // 0x103029b
+ field public static final int Widget_Quantum_Light_Button_Toggle = 16974492; // 0x103029c
+ field public static final int Widget_Quantum_Light_CalendarView = 16974495; // 0x103029f
+ field public static final int Widget_Quantum_Light_CheckedTextView = 16974496; // 0x10302a0
+ field public static final int Widget_Quantum_Light_CompoundButton_CheckBox = 16974497; // 0x10302a1
+ field public static final int Widget_Quantum_Light_CompoundButton_RadioButton = 16974498; // 0x10302a2
+ field public static final int Widget_Quantum_Light_CompoundButton_Star = 16974499; // 0x10302a3
+ field public static final int Widget_Quantum_Light_DropDownItem = 16974500; // 0x10302a4
+ field public static final int Widget_Quantum_Light_DropDownItem_Spinner = 16974501; // 0x10302a5
+ field public static final int Widget_Quantum_Light_EditText = 16974502; // 0x10302a6
+ field public static final int Widget_Quantum_Light_ExpandableListView = 16974503; // 0x10302a7
+ field public static final int Widget_Quantum_Light_FastScroll = 16974504; // 0x10302a8
+ field public static final int Widget_Quantum_Light_GridView = 16974505; // 0x10302a9
+ field public static final int Widget_Quantum_Light_HorizontalScrollView = 16974506; // 0x10302aa
+ field public static final int Widget_Quantum_Light_ImageButton = 16974507; // 0x10302ab
+ field public static final int Widget_Quantum_Light_ListPopupWindow = 16974508; // 0x10302ac
+ field public static final int Widget_Quantum_Light_ListView = 16974509; // 0x10302ad
+ field public static final int Widget_Quantum_Light_ListView_DropDown = 16974510; // 0x10302ae
+ field public static final int Widget_Quantum_Light_MediaRouteButton = 16974511; // 0x10302af
+ field public static final int Widget_Quantum_Light_PopupMenu = 16974512; // 0x10302b0
+ field public static final int Widget_Quantum_Light_PopupMenu_Overflow = 16974513; // 0x10302b1
+ field public static final int Widget_Quantum_Light_PopupWindow = 16974514; // 0x10302b2
+ field public static final int Widget_Quantum_Light_ProgressBar = 16974515; // 0x10302b3
+ field public static final int Widget_Quantum_Light_ProgressBar_Horizontal = 16974516; // 0x10302b4
+ field public static final int Widget_Quantum_Light_ProgressBar_Inverse = 16974517; // 0x10302b5
+ field public static final int Widget_Quantum_Light_ProgressBar_Large = 16974518; // 0x10302b6
+ field public static final int Widget_Quantum_Light_ProgressBar_Large_Inverse = 16974519; // 0x10302b7
+ field public static final int Widget_Quantum_Light_ProgressBar_Small = 16974520; // 0x10302b8
+ field public static final int Widget_Quantum_Light_ProgressBar_Small_Inverse = 16974521; // 0x10302b9
+ field public static final int Widget_Quantum_Light_ProgressBar_Small_Title = 16974522; // 0x10302ba
+ field public static final int Widget_Quantum_Light_RatingBar = 16974523; // 0x10302bb
+ field public static final int Widget_Quantum_Light_RatingBar_Indicator = 16974524; // 0x10302bc
+ field public static final int Widget_Quantum_Light_RatingBar_Small = 16974525; // 0x10302bd
+ field public static final int Widget_Quantum_Light_ScrollView = 16974526; // 0x10302be
+ field public static final int Widget_Quantum_Light_SeekBar = 16974527; // 0x10302bf
+ field public static final int Widget_Quantum_Light_SegmentedButton = 16974528; // 0x10302c0
+ field public static final int Widget_Quantum_Light_Spinner = 16974530; // 0x10302c2
+ field public static final int Widget_Quantum_Light_StackView = 16974529; // 0x10302c1
+ field public static final int Widget_Quantum_Light_Tab = 16974531; // 0x10302c3
+ field public static final int Widget_Quantum_Light_TabWidget = 16974532; // 0x10302c4
+ field public static final int Widget_Quantum_Light_TextView = 16974533; // 0x10302c5
+ field public static final int Widget_Quantum_Light_TextView_SpinnerItem = 16974534; // 0x10302c6
+ field public static final int Widget_Quantum_Light_WebTextView = 16974535; // 0x10302c7
+ field public static final int Widget_Quantum_Light_WebView = 16974536; // 0x10302c8
+ field public static final int Widget_Quantum_ListPopupWindow = 16974450; // 0x1030272
+ field public static final int Widget_Quantum_ListView = 16974451; // 0x1030273
+ field public static final int Widget_Quantum_ListView_DropDown = 16974452; // 0x1030274
+ field public static final int Widget_Quantum_MediaRouteButton = 16974453; // 0x1030275
+ field public static final int Widget_Quantum_PopupMenu = 16974454; // 0x1030276
+ field public static final int Widget_Quantum_PopupMenu_Overflow = 16974455; // 0x1030277
+ field public static final int Widget_Quantum_PopupWindow = 16974456; // 0x1030278
+ field public static final int Widget_Quantum_ProgressBar = 16974457; // 0x1030279
+ field public static final int Widget_Quantum_ProgressBar_Horizontal = 16974458; // 0x103027a
+ field public static final int Widget_Quantum_ProgressBar_Large = 16974459; // 0x103027b
+ field public static final int Widget_Quantum_ProgressBar_Small = 16974460; // 0x103027c
+ field public static final int Widget_Quantum_ProgressBar_Small_Title = 16974461; // 0x103027d
+ field public static final int Widget_Quantum_RatingBar = 16974462; // 0x103027e
+ field public static final int Widget_Quantum_RatingBar_Indicator = 16974463; // 0x103027f
+ field public static final int Widget_Quantum_RatingBar_Small = 16974464; // 0x1030280
+ field public static final int Widget_Quantum_ScrollView = 16974465; // 0x1030281
+ field public static final int Widget_Quantum_SeekBar = 16974466; // 0x1030282
+ field public static final int Widget_Quantum_SegmentedButton = 16974467; // 0x1030283
+ field public static final int Widget_Quantum_Spinner = 16974469; // 0x1030285
+ field public static final int Widget_Quantum_StackView = 16974468; // 0x1030284
+ field public static final int Widget_Quantum_Tab = 16974470; // 0x1030286
+ field public static final int Widget_Quantum_TabWidget = 16974471; // 0x1030287
+ field public static final int Widget_Quantum_TextView = 16974472; // 0x1030288
+ field public static final int Widget_Quantum_TextView_SpinnerItem = 16974473; // 0x1030289
+ field public static final int Widget_Quantum_WebTextView = 16974474; // 0x103028a
+ field public static final int Widget_Quantum_WebView = 16974475; // 0x103028b
field public static final int Widget_RatingBar = 16973857; // 0x1030021
field public static final int Widget_ScrollView = 16973869; // 0x103002d
field public static final int Widget_SeekBar = 16973856; // 0x1030020
@@ -5046,7 +5048,9 @@
method public void cancel();
method public android.app.Activity getActivity();
method public android.content.Context getContext();
+ method public void onAttached(android.app.Activity);
method public void onCancel();
+ method public void onDetached();
}
public final class WallpaperInfo implements android.os.Parcelable {
@@ -8199,7 +8203,7 @@
}
public class LauncherActivityInfo {
- method public int getApplicationFlags();
+ method public android.content.pm.ApplicationInfo getApplicationInfo();
method public android.graphics.drawable.Drawable getBadgedIcon(int);
method public android.content.ComponentName getComponentName();
method public long getFirstInstallTime();
@@ -8210,21 +8214,21 @@
}
public class LauncherApps {
- method public synchronized void addOnAppsChangedListener(android.content.pm.LauncherApps.OnAppsChangedListener);
+ method public void addOnAppsChangedListener(android.content.pm.LauncherApps.OnAppsChangedListener);
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
method public boolean isActivityEnabledForProfile(android.content.ComponentName, android.os.UserHandle);
method public boolean isPackageEnabledForProfile(java.lang.String, android.os.UserHandle);
- method public synchronized void removeOnAppsChangedListener(android.content.pm.LauncherApps.OnAppsChangedListener);
+ method public void removeOnAppsChangedListener(android.content.pm.LauncherApps.OnAppsChangedListener);
method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
- method public void startActivityForProfile(android.content.ComponentName, android.graphics.Rect, android.os.Bundle, android.os.UserHandle);
+ method public void startActivityForProfile(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
}
public static abstract interface LauncherApps.OnAppsChangedListener {
- method public abstract void onPackageAdded(android.os.UserHandle, java.lang.String);
- method public abstract void onPackageChanged(android.os.UserHandle, java.lang.String);
- method public abstract void onPackageRemoved(android.os.UserHandle, java.lang.String);
- method public abstract void onPackagesAvailable(android.os.UserHandle, java.lang.String[], boolean);
- method public abstract void onPackagesUnavailable(android.os.UserHandle, java.lang.String[], boolean);
+ method public abstract void onPackageAdded(java.lang.String, android.os.UserHandle);
+ method public abstract void onPackageChanged(java.lang.String, android.os.UserHandle);
+ method public abstract void onPackageRemoved(java.lang.String, android.os.UserHandle);
+ method public abstract void onPackagesAvailable(java.lang.String[], android.os.UserHandle, boolean);
+ method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
}
public class PackageInfo implements android.os.Parcelable {
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index b5281ff..5257430 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -716,6 +716,7 @@
HashMap<String, Object> children;
ArrayList<Fragment> fragments;
ArrayMap<String, LoaderManagerImpl> loaders;
+ VoiceInteractor voiceInteractor;
}
/* package */ NonConfigurationInstances mLastNonConfigurationInstances;
@@ -920,6 +921,9 @@
}
mFragments.dispatchCreate();
getApplication().dispatchActivityCreated(this, savedInstanceState);
+ if (mVoiceInteractor != null) {
+ mVoiceInteractor.attachActivity(this);
+ }
mCalled = true;
}
@@ -1830,7 +1834,8 @@
}
}
}
- if (activity == null && children == null && fragments == null && !retainLoaders) {
+ if (activity == null && children == null && fragments == null && !retainLoaders
+ && mVoiceInteractor == null) {
return null;
}
@@ -1839,6 +1844,7 @@
nci.children = children;
nci.fragments = fragments;
nci.loaders = mAllLoaderManagers;
+ nci.voiceInteractor = mVoiceInteractor;
return nci;
}
@@ -5632,8 +5638,14 @@
mParent = parent;
mEmbeddedID = id;
mLastNonConfigurationInstances = lastNonConfigurationInstances;
- mVoiceInteractor = voiceInteractor != null
- ? new VoiceInteractor(this, this, voiceInteractor, Looper.myLooper()) : null;
+ if (voiceInteractor != null) {
+ if (lastNonConfigurationInstances != null) {
+ mVoiceInteractor = lastNonConfigurationInstances.voiceInteractor;
+ } else {
+ mVoiceInteractor = new VoiceInteractor(voiceInteractor, this, this,
+ Looper.myLooper());
+ }
+ }
mWindow.setWindowManager(
(WindowManager)context.getSystemService(Context.WINDOW_SERVICE),
@@ -5842,6 +5854,9 @@
if (mLoaderManager != null) {
mLoaderManager.doDestroy();
}
+ if (mVoiceInteractor != null) {
+ mVoiceInteractor.detachActivity();
+ }
}
/**
diff --git a/core/java/android/app/VoiceInteractor.java b/core/java/android/app/VoiceInteractor.java
index 6dc48b0..fe85ef4 100644
--- a/core/java/android/app/VoiceInteractor.java
+++ b/core/java/android/app/VoiceInteractor.java
@@ -30,7 +30,7 @@
import com.android.internal.os.HandlerCaller;
import com.android.internal.os.SomeArgs;
-import java.util.WeakHashMap;
+import java.util.ArrayList;
/**
* Interface for an {@link Activity} to interact with the user through voice.
@@ -39,9 +39,11 @@
static final String TAG = "VoiceInteractor";
static final boolean DEBUG = true;
- final Context mContext;
- final Activity mActivity;
final IVoiceInteractor mInteractor;
+
+ Context mContext;
+ Activity mActivity;
+
final HandlerCaller mHandlerCaller;
final HandlerCaller.Callback mHandlerCallerCallback = new HandlerCaller.Callback() {
@Override
@@ -140,6 +142,12 @@
public void onCancel() {
}
+ public void onAttached(Activity activity) {
+ }
+
+ public void onDetached() {
+ }
+
void clear() {
mRequestInterface = null;
mContext = null;
@@ -220,11 +228,11 @@
}
}
- VoiceInteractor(Context context, Activity activity, IVoiceInteractor interactor,
+ VoiceInteractor(IVoiceInteractor interactor, Context context, Activity activity,
Looper looper) {
+ mInteractor = interactor;
mContext = context;
mActivity = activity;
- mInteractor = interactor;
mHandlerCaller = new HandlerCaller(context, looper, mHandlerCallerCallback, true);
}
@@ -238,6 +246,49 @@
}
}
+ private ArrayList<Request> makeRequestList() {
+ final int N = mActiveRequests.size();
+ if (N < 1) {
+ return null;
+ }
+ ArrayList<Request> list = new ArrayList<Request>(N);
+ for (int i=0; i<N; i++) {
+ list.add(mActiveRequests.valueAt(i));
+ }
+ return list;
+ }
+
+ void attachActivity(Activity activity) {
+ if (mActivity == activity) {
+ return;
+ }
+ mContext = activity;
+ mActivity = activity;
+ ArrayList<Request> reqs = makeRequestList();
+ if (reqs != null) {
+ for (int i=0; i<reqs.size(); i++) {
+ Request req = reqs.get(i);
+ req.mContext = activity;
+ req.mActivity = activity;
+ req.onAttached(activity);
+ }
+ }
+ }
+
+ void detachActivity() {
+ ArrayList<Request> reqs = makeRequestList();
+ if (reqs != null) {
+ for (int i=0; i<reqs.size(); i++) {
+ Request req = reqs.get(i);
+ req.onDetached();
+ req.mActivity = null;
+ req.mContext = null;
+ }
+ }
+ mContext = null;
+ mActivity = null;
+ }
+
public boolean submitRequest(Request request) {
try {
IVoiceInteractorRequest ireq = request.submit(mInteractor,
diff --git a/core/java/android/content/pm/LauncherActivityInfo.java b/core/java/android/content/pm/LauncherActivityInfo.java
index 9087338..5d48868 100644
--- a/core/java/android/content/pm/LauncherActivityInfo.java
+++ b/core/java/android/content/pm/LauncherActivityInfo.java
@@ -30,6 +30,7 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
+import android.util.DisplayMetrics;
import android.util.Log;
/**
@@ -47,21 +48,22 @@
private ActivityInfo mActivityInfo;
private ComponentName mComponentName;
private UserHandle mUser;
- // TODO: Fetch this value from PM
private long mFirstInstallTime;
/**
* Create a launchable activity object for a given ResolveInfo and user.
- *
+ *
* @param context The context for fetching resources.
* @param info ResolveInfo from which to create the LauncherActivityInfo.
* @param user The UserHandle of the profile to which this activity belongs.
*/
- LauncherActivityInfo(Context context, ResolveInfo info, UserHandle user) {
+ LauncherActivityInfo(Context context, ResolveInfo info, UserHandle user,
+ long firstInstallTime) {
this(context);
- this.mActivityInfo = info.activityInfo;
- this.mComponentName = LauncherApps.getComponentName(info);
- this.mUser = user;
+ mActivityInfo = info.activityInfo;
+ mComponentName = LauncherApps.getComponentName(info);
+ mUser = user;
+ mFirstInstallTime = firstInstallTime;
}
LauncherActivityInfo(Context context) {
@@ -79,7 +81,13 @@
}
/**
- * Returns the user handle of the user profile that this activity belongs to.
+ * Returns the user handle of the user profile that this activity belongs to. In order to
+ * persist the identity of the profile, do not store the UserHandle. Instead retrieve its
+ * serial number from UserManager. You can convert the serial number back to a UserHandle
+ * for later use.
+ *
+ * @see UserManager#getSerialNumberForUser(UserHandle)
+ * @see UserManager#getUserForSerialNumber(long)
*
* @return The UserHandle of the profile.
*/
@@ -89,7 +97,7 @@
/**
* Retrieves the label for the activity.
- *
+ *
* @return The label for the activity.
*/
public CharSequence getLabel() {
@@ -98,8 +106,10 @@
/**
* Returns the icon for this activity, without any badging for the profile.
- * @param density The preferred density of the icon, zero for default density.
+ * @param density The preferred density of the icon, zero for default density. Use
+ * density DPI values from {@link DisplayMetrics}.
* @see #getBadgedIcon(int)
+ * @see DisplayMetrics
* @return The drawable associated with the activity
*/
public Drawable getIcon(int density) {
@@ -109,15 +119,25 @@
/**
* Returns the application flags from the ApplicationInfo of the activity.
- *
+ *
* @return Application flags
+ * @hide remove before shipping
*/
public int getApplicationFlags() {
return mActivityInfo.applicationInfo.flags;
}
/**
+ * Returns the application info for the appliction this activity belongs to.
+ * @return
+ */
+ public ApplicationInfo getApplicationInfo() {
+ return mActivityInfo.applicationInfo;
+ }
+
+ /**
* Returns the time at which the package was first installed.
+ *
* @return The time of installation of the package, in milliseconds.
*/
public long getFirstInstallTime() {
@@ -134,7 +154,9 @@
/**
* Returns the activity icon with badging appropriate for the profile.
- * @param density Optional density for the icon, or 0 to use the default density.
+ * @param density Optional density for the icon, or 0 to use the default density. Use
+ * {@link DisplayMetrics} for DPI values.
+ * @see DisplayMetrics
* @return A badged icon for the activity.
*/
public Drawable getBadgedIcon(int density) {
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 8025b60..04c0b9f 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -16,15 +16,18 @@
package android.content.pm;
+import android.app.AppGlobals;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ILauncherApps;
import android.content.pm.IOnAppsChangedListener;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.UserManager;
import android.util.Log;
import java.util.ArrayList;
@@ -36,6 +39,12 @@
* managed profiles. This is mainly for use by launchers. Apps can be queried for each user profile.
* Since the PackageManager will not deliver package broadcasts for other profiles, you can register
* for package changes here.
+ * <p>
+ * To watch for managed profiles being added or removed, register for the following broadcasts:
+ * {@link Intent#ACTION_MANAGED_PROFILE_ADDED} and {@link Intent#ACTION_MANAGED_PROFILE_REMOVED}.
+ * <p>
+ * You can retrieve the list of profiles associated with this user with
+ * {@link UserManager#getUserProfiles()}.
*/
public class LauncherApps {
@@ -44,12 +53,13 @@
private Context mContext;
private ILauncherApps mService;
+ private PackageManager mPm;
private List<OnAppsChangedListener> mListeners
= new ArrayList<OnAppsChangedListener>();
/**
- * Callbacks for changes to this and related managed profiles.
+ * Callbacks for package changes to this and related managed profiles.
*/
public interface OnAppsChangedListener {
/**
@@ -57,6 +67,7 @@
*
* @param user The UserHandle of the profile that generated the change.
* @param packageName The name of the package that was removed.
+ * @hide remove before ship
*/
void onPackageRemoved(UserHandle user, String packageName);
@@ -65,6 +76,7 @@
*
* @param user The UserHandle of the profile that generated the change.
* @param packageName The name of the package that was added.
+ * @hide remove before ship
*/
void onPackageAdded(UserHandle user, String packageName);
@@ -73,6 +85,7 @@
*
* @param user The UserHandle of the profile that generated the change.
* @param packageName The name of the package that has changed.
+ * @hide remove before ship
*/
void onPackageChanged(UserHandle user, String packageName);
@@ -86,6 +99,7 @@
* available.
* @param replacing Indicates whether these packages are replacing
* existing ones.
+ * @hide remove before ship
*/
void onPackagesAvailable(UserHandle user, String[] packageNames, boolean replacing);
@@ -99,14 +113,66 @@
* unavailable.
* @param replacing Indicates whether the packages are about to be
* replaced with new versions.
+ * @hide remove before ship
*/
void onPackagesUnavailable(UserHandle user, String[] packageNames, boolean replacing);
+
+ /**
+ * Indicates that a package was removed from the specified profile.
+ *
+ * @param packageName The name of the package that was removed.
+ * @param user The UserHandle of the profile that generated the change.
+ */
+ void onPackageRemoved(String packageName, UserHandle user);
+
+ /**
+ * Indicates that a package was added to the specified profile.
+ *
+ * @param packageName The name of the package that was added.
+ * @param user The UserHandle of the profile that generated the change.
+ */
+ void onPackageAdded(String packageName, UserHandle user);
+
+ /**
+ * Indicates that a package was modified in the specified profile.
+ *
+ * @param packageName The name of the package that has changed.
+ * @param user The UserHandle of the profile that generated the change.
+ */
+ void onPackageChanged(String packageName, UserHandle user);
+
+ /**
+ * Indicates that one or more packages have become available. For
+ * example, this can happen when a removable storage card has
+ * reappeared.
+ *
+ * @param packageNames The names of the packages that have become
+ * available.
+ * @param user The UserHandle of the profile that generated the change.
+ * @param replacing Indicates whether these packages are replacing
+ * existing ones.
+ */
+ void onPackagesAvailable(String [] packageNames, UserHandle user, boolean replacing);
+
+ /**
+ * Indicates that one or more packages have become unavailable. For
+ * example, this can happen when a removable storage card has been
+ * removed.
+ *
+ * @param packageNames The names of the packages that have become
+ * unavailable.
+ * @param user The UserHandle of the profile that generated the change.
+ * @param replacing Indicates whether the packages are about to be
+ * replaced with new versions.
+ */
+ void onPackagesUnavailable(String[] packageNames, UserHandle user, boolean replacing);
}
/** @hide */
public LauncherApps(Context context, ILauncherApps service) {
mContext = context;
mService = service;
+ mPm = context.getPackageManager();
}
/**
@@ -131,7 +197,15 @@
final int count = activities.size();
for (int i = 0; i < count; i++) {
ResolveInfo ri = activities.get(i);
- LauncherActivityInfo lai = new LauncherActivityInfo(mContext, ri, user);
+ long firstInstallTime = 0;
+ try {
+ firstInstallTime = mPm.getPackageInfo(ri.activityInfo.packageName,
+ PackageManager.GET_UNINSTALLED_PACKAGES).firstInstallTime;
+ } catch (NameNotFoundException nnfe) {
+ // Sorry, can't find package
+ }
+ LauncherActivityInfo lai = new LauncherActivityInfo(mContext, ri, user,
+ firstInstallTime);
if (DEBUG) {
Log.v(TAG, "Returning activity for profile " + user + " : "
+ lai.getComponentName());
@@ -157,7 +231,15 @@
try {
ResolveInfo ri = mService.resolveActivity(intent, user);
if (ri != null) {
- LauncherActivityInfo info = new LauncherActivityInfo(mContext, ri, user);
+ long firstInstallTime = 0;
+ try {
+ firstInstallTime = mPm.getPackageInfo(ri.activityInfo.packageName,
+ PackageManager.GET_UNINSTALLED_PACKAGES).firstInstallTime;
+ } catch (NameNotFoundException nnfe) {
+ // Sorry, can't find package
+ }
+ LauncherActivityInfo info = new LauncherActivityInfo(mContext, ri, user,
+ firstInstallTime);
return info;
}
} catch (RemoteException re) {
@@ -173,9 +255,23 @@
* @param sourceBounds The Rect containing the source bounds of the clicked icon
* @param opts Options to pass to startActivity
* @param user The UserHandle of the profile
+ * @hide remove before ship
*/
public void startActivityForProfile(ComponentName component, Rect sourceBounds,
Bundle opts, UserHandle user) {
+ startActivityForProfile(component, user, sourceBounds, opts);
+ }
+
+ /**
+ * Starts an activity in the specified profile.
+ *
+ * @param component The ComponentName of the activity to launch
+ * @param user The UserHandle of the profile
+ * @param sourceBounds The Rect containing the source bounds of the clicked icon
+ * @param opts Options to pass to startActivity
+ */
+ public void startActivityForProfile(ComponentName component, UserHandle user, Rect sourceBounds,
+ Bundle opts) {
if (DEBUG) {
Log.i(TAG, "StartActivityForProfile " + component + " " + user.getIdentifier());
}
@@ -224,13 +320,15 @@
*
* @param listener The listener to add.
*/
- public synchronized void addOnAppsChangedListener(OnAppsChangedListener listener) {
- if (listener != null && !mListeners.contains(listener)) {
- mListeners.add(listener);
- if (mListeners.size() == 1) {
- try {
- mService.addOnAppsChangedListener(mAppsChangedListener);
- } catch (RemoteException re) {
+ public void addOnAppsChangedListener(OnAppsChangedListener listener) {
+ synchronized (this) {
+ if (listener != null && !mListeners.contains(listener)) {
+ mListeners.add(listener);
+ if (mListeners.size() == 1) {
+ try {
+ mService.addOnAppsChangedListener(mAppsChangedListener);
+ } catch (RemoteException re) {
+ }
}
}
}
@@ -242,12 +340,14 @@
* @param listener The listener to remove.
* @see #addOnAppsChangedListener(OnAppsChangedListener)
*/
- public synchronized void removeOnAppsChangedListener(OnAppsChangedListener listener) {
- mListeners.remove(listener);
- if (mListeners.size() == 0) {
- try {
- mService.removeOnAppsChangedListener(mAppsChangedListener);
- } catch (RemoteException re) {
+ public void removeOnAppsChangedListener(OnAppsChangedListener listener) {
+ synchronized (this) {
+ mListeners.remove(listener);
+ if (mListeners.size() == 0) {
+ try {
+ mService.removeOnAppsChangedListener(mAppsChangedListener);
+ } catch (RemoteException re) {
+ }
}
}
}
@@ -261,7 +361,8 @@
}
synchronized (LauncherApps.this) {
for (OnAppsChangedListener listener : mListeners) {
- listener.onPackageRemoved(user, packageName);
+ listener.onPackageRemoved(user, packageName); // TODO: Remove before ship
+ listener.onPackageRemoved(packageName, user);
}
}
}
@@ -273,7 +374,8 @@
}
synchronized (LauncherApps.this) {
for (OnAppsChangedListener listener : mListeners) {
- listener.onPackageChanged(user, packageName);
+ listener.onPackageChanged(user, packageName); // TODO: Remove before ship
+ listener.onPackageChanged(packageName, user);
}
}
}
@@ -285,7 +387,8 @@
}
synchronized (LauncherApps.this) {
for (OnAppsChangedListener listener : mListeners) {
- listener.onPackageAdded(user, packageName);
+ listener.onPackageAdded(user, packageName); // TODO: Remove before ship
+ listener.onPackageAdded(packageName, user);
}
}
}
@@ -298,7 +401,8 @@
}
synchronized (LauncherApps.this) {
for (OnAppsChangedListener listener : mListeners) {
- listener.onPackagesAvailable(user, packageNames, replacing);
+ listener.onPackagesAvailable(user, packageNames, replacing); // TODO: Remove
+ listener.onPackagesAvailable(packageNames, user, replacing);
}
}
}
@@ -311,7 +415,8 @@
}
synchronized (LauncherApps.this) {
for (OnAppsChangedListener listener : mListeners) {
- listener.onPackagesUnavailable(user, packageNames, replacing);
+ listener.onPackagesUnavailable(user, packageNames, replacing); // TODO: Remove
+ listener.onPackagesUnavailable(packageNames, user, replacing);
}
}
}
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index 06d8e4a..857e335 100644
--- a/core/java/android/inputmethodservice/IInputMethodWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java
@@ -69,6 +69,7 @@
private static final int DO_CHANGE_INPUTMETHOD_SUBTYPE = 80;
final WeakReference<AbstractInputMethodService> mTarget;
+ final Context mContext;
final HandlerCaller mCaller;
final WeakReference<InputMethod> mInputMethod;
final int mTargetSdkVersion;
@@ -111,8 +112,8 @@
public IInputMethodWrapper(AbstractInputMethodService context,
InputMethod inputMethod) {
mTarget = new WeakReference<AbstractInputMethodService>(context);
- mCaller = new HandlerCaller(context.getApplicationContext(), null,
- this, true /*asyncHandler*/);
+ mContext = context.getApplicationContext();
+ mCaller = new HandlerCaller(mContext, null, this, true /*asyncHandler*/);
mInputMethod = new WeakReference<InputMethod>(inputMethod);
mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion;
}
@@ -186,7 +187,7 @@
case DO_CREATE_SESSION: {
SomeArgs args = (SomeArgs)msg.obj;
inputMethod.createSession(new InputMethodSessionCallbackWrapper(
- mCaller.mContext, (InputChannel)args.arg1,
+ mContext, (InputChannel)args.arg1,
(IInputSessionCallback)args.arg2));
args.recycle();
return;
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index 38a65c5..795117e 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -115,6 +115,10 @@
getWindow().setAttributes(lp);
}
+ public int getGravity() {
+ return getWindow().getAttributes().gravity;
+ }
+
private void updateWidthHeight(WindowManager.LayoutParams lp) {
if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) {
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java
index cd357b7..1e29f8e 100644
--- a/core/java/android/service/voice/VoiceInteractionSession.java
+++ b/core/java/android/service/voice/VoiceInteractionSession.java
@@ -20,7 +20,6 @@
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
-import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.Region;
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index 5c7a4e6..c0b5b97 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -588,7 +588,7 @@
return;
}
- final FragmentTransaction trans = ((View) mDecorToolbar).isInEditMode() ? null :
+ final FragmentTransaction trans = mDecorToolbar.getViewGroup().isInEditMode() ? null :
mActivity.getFragmentManager().beginTransaction().disallowAddToBackStack();
if (mSelectedTab == tab) {
@@ -847,7 +847,7 @@
mDecorToolbar.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
mContextView.animateToVisibility(toActionMode ? View.VISIBLE : View.GONE);
if (mTabScrollView != null && !mDecorToolbar.hasEmbeddedTabs() &&
- isCollapsed((View) mDecorToolbar)) {
+ isCollapsed(mDecorToolbar.getViewGroup())) {
mTabScrollView.animateToVisibility(toActionMode ? View.GONE : View.VISIBLE);
}
}
@@ -959,7 +959,7 @@
// Clear out the context mode views after the animation finishes
mContextView.closeMode();
- ((View) mDecorToolbar).sendAccessibilityEvent(
+ mDecorToolbar.getViewGroup().sendAccessibilityEvent(
AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
mOverlayLayout.setHideOnContentScrollEnabled(mHideOnContentScroll);
diff --git a/core/java/com/android/internal/os/HandlerCaller.java b/core/java/com/android/internal/os/HandlerCaller.java
index 40834ba..17685fd 100644
--- a/core/java/com/android/internal/os/HandlerCaller.java
+++ b/core/java/com/android/internal/os/HandlerCaller.java
@@ -22,9 +22,6 @@
import android.os.Message;
public class HandlerCaller {
-
- public final Context mContext;
-
final Looper mMainLooper;
final Handler mH;
@@ -47,7 +44,6 @@
public HandlerCaller(Context context, Looper looper, Callback callback,
boolean asyncHandler) {
- mContext = context;
mMainLooper = looper != null ? looper : context.getMainLooper();
mH = new MyHandler(mMainLooper, asyncHandler);
mCallback = callback;
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 9c33d80..5cdbcfa 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2256,6 +2256,7 @@
<public type="style" name="Theme.Quantum.NoActionBar.Overscan" />
<public type="style" name="Theme.Quantum.NoActionBar.TranslucentDecor" />
<public type="style" name="Theme.Quantum.Panel" />
+ <public type="style" name="Theme.Quantum.Voice" />
<public type="style" name="Theme.Quantum.Wallpaper" />
<public type="style" name="Theme.Quantum.Wallpaper.NoTitleBar" />
@@ -2272,6 +2273,7 @@
<public type="style" name="Theme.Quantum.Light.NoActionBar.Overscan" />
<public type="style" name="Theme.Quantum.Light.NoActionBar.TranslucentDecor" />
<public type="style" name="Theme.Quantum.Light.Panel" />
+ <public type="style" name="Theme.Quantum.Light.Voice" />
<public type="style" name="ThemeOverlay" />
<public type="style" name="ThemeOverlay.Quantum" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 63f2674..59bd667 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -169,6 +169,12 @@
<item name="windowExitAnimation">@anim/input_method_exit</item>
</style>
+ <!-- Window animations that are applied to voice activity windows. -->
+ <style name="Animation.VoiceActivity">
+ <item name="windowEnterAnimation">@anim/voice_activity_open_enter</item>
+ <item name="windowExitAnimation">@anim/voice_activity_close_exit</item>
+ </style>
+
<!-- Window animations that are applied to voice interaction overlay windows. -->
<style name="Animation.VoiceInteractionSession">
<item name="windowEnterAnimation">@anim/voice_layer_enter</item>
diff --git a/core/res/res/values/themes_quantum.xml b/core/res/res/values/themes_quantum.xml
index 484c694..47ba764 100644
--- a/core/res/res/values/themes_quantum.xml
+++ b/core/res/res/values/themes_quantum.xml
@@ -913,6 +913,22 @@
<item name="windowNoTitle">true</item>
</style>
+ <!-- Quantum theme for an activity that is to be used for voice interaction.
+ This gives the activity a floating dialog style, to incorporate with the
+ system voice experience. -->
+ <style name="Theme.Quantum.Voice" parent="@style/Theme.Quantum.Dialog">
+ <item name="windowAnimationStyle">@style/Animation.VoiceActivity</item>
+ <item name="backgroundDimEnabled">false</item>
+ </style>
+
+ <!-- Quantum light theme for an activity that is to be used for voice interaction.
+ This gives the activity a floating dialog style, to incorporate with the
+ system voice experience. -->
+ <style name="Theme.Quantum.Light.Voice" parent="@style/Theme.Quantum.Light.Dialog">
+ <item name="windowAnimationStyle">@style/Animation.VoiceActivity</item>
+ <item name="backgroundDimEnabled">false</item>
+ </style>
+
<!-- Default theme for quantum style input methods, which is used by the
{@link android.inputmethodservice.InputMethodService} class.
this inherits from Theme.Panel, but sets up IME appropriate animations
@@ -929,7 +945,7 @@
this inherits from Theme.Panel, but sets up appropriate animations
and a few custom attributes. -->
<style name="Theme.Quantum.VoiceInteractionSession" parent="Theme.Quantum.Light.Panel">
- <item name="android:windowAnimationStyle">@android:style/Animation.VoiceInteractionSession</item>
+ <item name="windowAnimationStyle">@style/Animation.VoiceInteractionSession</item>
</style>
<!-- Theme for the search input bar. -->
diff --git a/data/keyboards/Vendor_2378_Product_1008.kl b/data/keyboards/Vendor_2378_Product_1008.kl
new file mode 100644
index 0000000..478da03
--- /dev/null
+++ b/data/keyboards/Vendor_2378_Product_1008.kl
@@ -0,0 +1,35 @@
+# 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.
+
+# OnLive, Inc. OnLive Wireless Controller, USB adapter
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 307 BUTTON_X
+key 308 BUTTON_Y
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 315 BUTTON_START
+key 314 BUTTON_SELECT
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+
+axis 0x00 X
+axis 0x01 Y
+axis 0x03 Z
+axis 0x04 RZ
+axis 0x05 RTRIGGER
+axis 0x02 LTRIGGER
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 5a49f38..d9c06d3 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -346,7 +346,7 @@
float left, top, offset;
uint32_t width, height;
- PathCache::computePathBounds(t->path, t->paint, left, top, offset, width, height);
+ PathCache::computePathBounds(t->path, &t->paint, left, top, offset, width, height);
PathTexture* texture = t->texture;
texture->left = left;
@@ -357,7 +357,7 @@
if (width <= mMaxTextureSize && height <= mMaxTextureSize) {
SkBitmap* bitmap = new SkBitmap();
- drawPath(t->path, t->paint, *bitmap, left, top, offset, width, height);
+ drawPath(t->path, &t->paint, *bitmap, left, top, offset, width, height);
t->setResult(bitmap);
} else {
texture->width = 0;
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h
index 847853a..bcfb367 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -293,7 +293,7 @@
class PathTask: public Task<SkBitmap*> {
public:
PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture):
- path(path), paint(paint), texture(texture) {
+ path(path), paint(*paint), texture(texture) {
}
~PathTask() {
@@ -301,7 +301,8 @@
}
const SkPath* path;
- const SkPaint* paint;
+ //copied, since input paint may not be immutable
+ const SkPaint paint;
PathTexture* texture;
};
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 98a7c65..abba06fd 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -4141,8 +4141,9 @@
(device == AudioSystem.DEVICE_OUT_WIRED_HEADPHONE))) {
setBluetoothA2dpOnInt(true);
}
- boolean isUsb = ((device & AudioSystem.DEVICE_OUT_ALL_USB) != 0) ||
- ((device & AudioSystem.DEVICE_IN_ALL_USB) != 0);
+ boolean isUsb = ((device & ~AudioSystem.DEVICE_OUT_ALL_USB) == 0) ||
+ (((device & AudioSystem.DEVICE_BIT_IN) != 0) &&
+ ((device & ~AudioSystem.DEVICE_IN_ALL_USB) == 0));
handleDeviceConnection((state == 1), device, (isUsb ? name : ""));
if (state != 0) {
if ((device == AudioSystem.DEVICE_OUT_WIRED_HEADSET) ||
@@ -4159,7 +4160,7 @@
MUSIC_ACTIVE_POLL_PERIOD_MS);
}
}
- if (!isUsb) {
+ if (!isUsb && (device != AudioSystem.DEVICE_IN_WIRED_HEADSET)) {
sendDeviceConnectionIntent(device, state, name);
}
}
@@ -4175,7 +4176,8 @@
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- int device;
+ int outDevice;
+ int inDevice;
int state;
if (action.equals(Intent.ACTION_DOCK_EVENT)) {
@@ -4210,7 +4212,8 @@
} else if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
BluetoothProfile.STATE_DISCONNECTED);
- device = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
+ inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
String address = null;
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
@@ -4224,10 +4227,10 @@
switch (btClass.getDeviceClass()) {
case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
- device = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
break;
case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
- device = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
+ outDevice = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
break;
}
}
@@ -4237,7 +4240,9 @@
}
boolean connected = (state == BluetoothProfile.STATE_CONNECTED);
- if (handleDeviceConnection(connected, device, address)) {
+ boolean success = handleDeviceConnection(connected, outDevice, address) &&
+ handleDeviceConnection(connected, inDevice, address);
+ if (success) {
synchronized (mScoClients) {
if (connected) {
mBluetoothHeadsetDevice = btDevice;
@@ -4257,8 +4262,8 @@
: "card=" + alsaCard + ";device=" + alsaDevice);
// Playback Device
- device = AudioSystem.DEVICE_OUT_USB_ACCESSORY;
- setWiredDeviceConnectionState(device, state, params);
+ outDevice = AudioSystem.DEVICE_OUT_USB_ACCESSORY;
+ setWiredDeviceConnectionState(outDevice, state, params);
} else if (action.equals(Intent.ACTION_USB_AUDIO_DEVICE_PLUG)) {
state = intent.getIntExtra("state", 0);
@@ -4273,14 +4278,14 @@
// Playback Device
if (hasPlayback) {
- device = AudioSystem.DEVICE_OUT_USB_DEVICE;
- setWiredDeviceConnectionState(device, state, params);
+ outDevice = AudioSystem.DEVICE_OUT_USB_DEVICE;
+ setWiredDeviceConnectionState(outDevice, state, params);
}
// Capture Device
if (hasCapture) {
- device = AudioSystem.DEVICE_IN_USB_DEVICE;
- setWiredDeviceConnectionState(device, state, params);
+ inDevice = AudioSystem.DEVICE_IN_USB_DEVICE;
+ setWiredDeviceConnectionState(inDevice, state, params);
}
} else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) {
boolean broadcast = false;
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 61ed3cf..3523dcc 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -196,9 +196,6 @@
<dimen name="qs_dual_tile_height">109dp</dimen>
<dimen name="qs_dual_tile_padding">12dp</dimen>
- <!-- How far the hidden header peeks from the top of the screen when QS is in detail mode. -->
- <dimen name="qs_header_peek_height">8dp</dimen>
-
<!-- How far the expanded QS panel peeks from the header in collapsed state. -->
<dimen name="qs_peek_height">8dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 6ce0e48..c8cf05d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -61,6 +61,7 @@
mContext = context;
mDetail = new FrameLayout(mContext);
+ mDetail.setBackgroundColor(mContext.getResources().getColor(R.color.system_primary_color));
mDetail.setVisibility(GONE);
mDetail.setClickable(true);
addView(mDetail);
@@ -204,7 +205,7 @@
mDetail.measure(exactly(width), unspecified());
if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) {
final int dmh = mDetail.getMeasuredHeight();
- if (dmh > 0) h = dmh;
+ if (dmh > 0) h = Math.max(h, dmh);
}
setMeasuredDimension(width, h);
}
@@ -231,7 +232,8 @@
left + record.tileView.getMeasuredWidth(),
top + record.tileView.getMeasuredHeight());
}
- mDetail.layout(0, 0, mDetail.getMeasuredWidth(), mDetail.getMeasuredHeight());
+ final int dh = Math.max(mDetail.getMeasuredHeight(), getMeasuredHeight());
+ mDetail.layout(0, 0, mDetail.getMeasuredWidth(), dh);
}
private int getRowTop(int row) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 365ee57..2f36e0e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -34,7 +34,6 @@
import android.widget.LinearLayout;
import com.android.systemui.R;
-import com.android.systemui.qs.QSPanel;
import com.android.systemui.statusbar.ExpandableView;
import com.android.systemui.statusbar.FlingAnimationUtils;
import com.android.systemui.statusbar.GestureRecorder;
@@ -54,7 +53,7 @@
PhoneStatusBar mStatusBar;
private StatusBarHeaderView mHeader;
private View mQsContainer;
- private QSPanel mQsPanel;
+ private View mQsPanel;
private View mKeyguardStatusView;
private ObservableScrollView mScrollView;
private View mStackScrollerContainer;
@@ -73,7 +72,6 @@
*/
private boolean mIntercepting;
private boolean mQsExpanded;
- private boolean mQsFullyExpanded;
private boolean mKeyguardShowing;
private float mInitialHeightOnTouch;
private float mInitialTouchX;
@@ -85,14 +83,13 @@
private int mQsMaxExpansionHeight;
private int mMinStackHeight;
private int mQsPeekHeight;
- private int mQsHeaderPeekHeight;
- private boolean mQsShowingDetail;
private float mNotificationTranslation;
private int mStackScrollerIntrinsicPadding;
private boolean mQsExpansionEnabled = true;
private ValueAnimator mQsExpansionAnimator;
private FlingAnimationUtils mFlingAnimationUtils;
private int mStatusBarMinHeight;
+
private Interpolator mFastOutSlowInInterpolator;
private ObjectAnimator mClockAnimator;
private int mClockAnimationTarget = -1;
@@ -135,8 +132,7 @@
mKeyguardStatusView = findViewById(R.id.keyguard_status_view);
mStackScrollerContainer = findViewById(R.id.notification_container_parent);
mQsContainer = findViewById(R.id.quick_settings_container);
- mQsPanel = (QSPanel) findViewById(R.id.quick_settings_panel);
- mQsPanel.setCallback(mQsPanelCallback);
+ mQsPanel = findViewById(R.id.quick_settings_panel);
mScrollView = (ObservableScrollView) findViewById(R.id.scroll_view);
mScrollView.setListener(this);
mNotificationStackScroller = (NotificationStackScrollLayout)
@@ -160,7 +156,6 @@
mStatusBarMinHeight = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height);
mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height);
- mQsHeaderPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_header_peek_height);
mClockPositionAlgorithm.loadDimens(getResources());
}
@@ -172,9 +167,7 @@
mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight;
mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight();
if (mQsExpanded) {
- if (mQsFullyExpanded) {
- setQsStackScrollerPadding(mQsMaxExpansionHeight);
- }
+ setQsStackScrollerPadding(mQsMaxExpansionHeight);
} else {
setQsExpansion(mQsMinExpansionHeight);
positionClockAndNotifications();
@@ -527,39 +520,10 @@
? View.INVISIBLE
: View.VISIBLE);
mScrollView.setTouchEnabled(mQsExpanded);
- if (mQsShowingDetail) {
- if (mQsFullyExpanded) {
- setQsHeaderPeeking(true);
- }
- } else {
- setQsHeaderPeeking(false);
- }
- }
-
- private void setQsHeaderPeeking(boolean peeking) {
- final boolean stackIsPeeking = mStackScrollerContainer.getTranslationY() != 0;
- final boolean headerIsPeeking = mHeader.getTranslationY() != 0;
- final int ty = mQsHeaderPeekHeight - mHeader.getExpandedHeight();
- if (peeking) {
- if (!headerIsPeeking) {
- mHeader.animate().translationY(ty);
- }
- if (!stackIsPeeking) {
- mStackScrollerContainer.animate().translationY(ty);
- }
- } else {
- if (headerIsPeeking) {
- mHeader.animate().translationY(0);
- }
- if (stackIsPeeking) {
- mStackScrollerContainer.animate().translationY(0);
- }
- }
}
private void setQsExpansion(float height) {
height = Math.min(Math.max(height, mQsMinExpansionHeight), mQsMaxExpansionHeight);
- mQsFullyExpanded = height == mQsMaxExpansionHeight;
if (height > mQsMinExpansionHeight && !mQsExpanded) {
setQsExpanded(true);
} else if (height <= mQsMinExpansionHeight && mQsExpanded) {
@@ -652,16 +616,10 @@
if (!mQsExpansionEnabled) {
return false;
}
- final float ty = mHeader.getTranslationY();
boolean onHeader = x >= mHeader.getLeft() && x <= mHeader.getRight()
- && y >= mHeader.getTop() + ty && y <= mHeader.getBottom() + ty;
+ && y >= mHeader.getTop() && y <= mHeader.getBottom();
if (mQsExpanded) {
- if (mQsShowingDetail && onHeader) {
- // bring back the header, crudely
- setQsHeaderPeeking(false);
- mQsPanel.setExpanded(false);
- }
- return !mQsShowingDetail && onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0);
+ return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0);
} else {
return onHeader;
}
@@ -828,12 +786,4 @@
public View getRightIcon() {
return mKeyguardBottomArea.getCameraImageView();
}
-
- private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() {
- @Override
- public void onShowingDetail(boolean showingDetail) {
- mQsShowingDetail = showingDetail;
- updateQsState();
- }
- };
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 3245f1a..c097e2d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -293,5 +293,15 @@
public void setQSPanel(QSPanel qsp) {
mQSPanel = qsp;
+ if (mQSPanel != null) {
+ mQSPanel.setCallback(mQsPanelCallback);
+ }
}
+
+ private final QSPanel.Callback mQsPanelCallback = new QSPanel.Callback() {
+ @Override
+ public void onShowingDetail(boolean showingDetail) {
+ mBrightnessContainer.animate().alpha(showingDetail ? 0 : 1).withLayer().start();
+ }
+ };
}
diff --git a/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java b/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
index 3cf7e82..8c8209f 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
@@ -30,6 +30,7 @@
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
+import java.io.PrintWriter;
/**
* Stores a mapping of global keys.
@@ -123,4 +124,21 @@
}
}
}
+
+ public void dump(String prefix, PrintWriter pw) {
+ final int numKeys = mKeyMapping.size();
+ if (numKeys == 0) {
+ pw.print(prefix); pw.println("mKeyMapping.size=0");
+ return;
+ }
+ pw.print(prefix); pw.println("mKeyMapping={");
+ for (int i = 0; i < numKeys; ++i) {
+ pw.print(" ");
+ pw.print(prefix);
+ pw.print(KeyEvent.keyCodeToString(mKeyMapping.keyAt(i)));
+ pw.print("=");
+ pw.println(mKeyMapping.valueAt(i).flattenToString());
+ }
+ pw.print(prefix); pw.println("}");
+ }
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index fb041fa2..6bd854a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -3393,7 +3393,12 @@
pf.top = mContentTop;
pf.right = mContentRight;
pf.bottom = mContentBottom;
- if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
+ if (win.isVoiceInteraction()) {
+ df.left = of.left = cf.left = mVoiceContentLeft;
+ df.top = of.top = cf.top = mVoiceContentTop;
+ df.right = of.right = cf.right = mVoiceContentRight;
+ df.bottom = of.bottom = cf.bottom = mVoiceContentBottom;
+ } else if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
df.left = of.left = cf.left = mDockLeft;
df.top = of.top = cf.top = mDockTop;
df.right = of.right = cf.right = mDockRight;
@@ -5678,6 +5683,7 @@
pw.print(" mDemoHdmiRotationLock="); pw.println(mDemoHdmiRotationLock);
pw.print(prefix); pw.print("mUndockedHdmiRotation="); pw.println(mUndockedHdmiRotation);
+ mGlobalKeyManager.dump(prefix, pw);
mStatusBarController.dump(pw, prefix);
mNavigationBarController.dump(pw, prefix);
PolicyControl.dump(prefix, pw);
diff --git a/services/core/java/com/android/server/WiredAccessoryManager.java b/services/core/java/com/android/server/WiredAccessoryManager.java
index cd8c13fb..d8ee8a1 100644
--- a/services/core/java/com/android/server/WiredAccessoryManager.java
+++ b/services/core/java/com/android/server/WiredAccessoryManager.java
@@ -246,7 +246,8 @@
private void setDeviceStateLocked(int headset,
int headsetState, int prevHeadsetState, String headsetName) {
if ((headsetState & headset) != (prevHeadsetState & headset)) {
- int device;
+ int outDevice = 0;
+ int inDevice = 0;
int state;
if ((headsetState & headset) != 0) {
@@ -256,15 +257,16 @@
}
if (headset == BIT_HEADSET) {
- device = AudioManager.DEVICE_OUT_WIRED_HEADSET;
+ outDevice = AudioManager.DEVICE_OUT_WIRED_HEADSET;
+ inDevice = AudioManager.DEVICE_IN_WIRED_HEADSET;
} else if (headset == BIT_HEADSET_NO_MIC){
- device = AudioManager.DEVICE_OUT_WIRED_HEADPHONE;
+ outDevice = AudioManager.DEVICE_OUT_WIRED_HEADPHONE;
} else if (headset == BIT_USB_HEADSET_ANLG) {
- device = AudioManager.DEVICE_OUT_ANLG_DOCK_HEADSET;
+ outDevice = AudioManager.DEVICE_OUT_ANLG_DOCK_HEADSET;
} else if (headset == BIT_USB_HEADSET_DGTL) {
- device = AudioManager.DEVICE_OUT_DGTL_DOCK_HEADSET;
+ outDevice = AudioManager.DEVICE_OUT_DGTL_DOCK_HEADSET;
} else if (headset == BIT_HDMI_AUDIO) {
- device = AudioManager.DEVICE_OUT_HDMI;
+ outDevice = AudioManager.DEVICE_OUT_HDMI;
} else {
Slog.e(TAG, "setDeviceState() invalid headset type: "+headset);
return;
@@ -273,7 +275,12 @@
if (LOG)
Slog.v(TAG, "device "+headsetName+((state == 1) ? " connected" : " disconnected"));
- mAudioManager.setWiredDeviceConnectionState(device, state, headsetName);
+ if (outDevice != 0) {
+ mAudioManager.setWiredDeviceConnectionState(outDevice, state, headsetName);
+ }
+ if (inDevice != 0) {
+ mAudioManager.setWiredDeviceConnectionState(inDevice, state, headsetName);
+ }
}
}
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index eebb503..816e022 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -247,7 +247,8 @@
maxBg = Integer.parseInt(SystemProperties.get("ro.config.max_starting_bg", "0"));
} catch(RuntimeException e) {
}
- mMaxStartingBackground = maxBg > 0 ? maxBg : ActivityManager.isLowRamDeviceStatic() ? 1 : 3;
+ mMaxStartingBackground = maxBg > 0
+ ? maxBg : ActivityManager.isLowRamDeviceStatic() ? 1 : 8;
}
ServiceRecord getServiceByName(ComponentName name, int callingUser) {
diff --git a/tests/VoiceInteraction/AndroidManifest.xml b/tests/VoiceInteraction/AndroidManifest.xml
index 2d08163..e1a5854 100644
--- a/tests/VoiceInteraction/AndroidManifest.xml
+++ b/tests/VoiceInteraction/AndroidManifest.xml
@@ -23,7 +23,8 @@
android:permission="android.permission.BIND_VOICE_INTERACTION"
android:process=":session">
</service>
- <activity android:name="TestInteractionActivity" android:label="Voice Interaction Target">
+ <activity android:name="TestInteractionActivity" android:label="Voice Interaction Target"
+ android:theme="@android:style/Theme.Quantum.Light.Voice">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java
index 9c772ff..a61e0da 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java
@@ -20,6 +20,8 @@
import android.app.VoiceInteractor;
import android.os.Bundle;
import android.util.Log;
+import android.view.Gravity;
+import android.view.ViewGroup;
public class TestInteractionActivity extends Activity {
static final String TAG = "TestInteractionActivity";
@@ -38,6 +40,11 @@
setContentView(R.layout.test_interaction);
+ // Framework should take care of these.
+ getWindow().setGravity(Gravity.TOP);
+ getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+
mInteractor = getVoiceInteractor();
VoiceInteractor.ConfirmationRequest req = new VoiceInteractor.ConfirmationRequest(
"This is a confirmation", null) {