diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-05-29 18:35:45 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-05-30 10:06:16 -0700 |
commit | 20d94749043d0851f1da10c7749fd7eb13a35081 (patch) | |
tree | fe14d454373789e1b28d52811b65aaaa572688e2 | |
parent | 5286624b648c7d7cc4c15813f9921c1d0b2e46cc (diff) | |
download | frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.zip frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.tar.gz frameworks_base-20d94749043d0851f1da10c7749fd7eb13a35081.tar.bz2 |
More work on voice interaction visuals.
There is now a special theme for voice interaction activities
to use, so they can be a panel that is better intergrated with
the rest of the voice interaction experience. This is still
not completely working, I have some hacks in the demo app to
get it right; I'll fix that in a future change.
Also improve VoiceInteractor to be retained across activity
instances, for things like rotation.
And bump up the number of concurrent broadcasts that are allowed
on non-svelte devices, since they can handle more and this makes
the boot experience better when dispatching BOOT_COMPLETED.
Change-Id: Ie86b5fd09b928da20d645ec2200577dee3e6889d
-rw-r--r-- | api/current.txt | 308 | ||||
-rw-r--r-- | core/java/android/app/Activity.java | 21 | ||||
-rw-r--r-- | core/java/android/app/VoiceInteractor.java | 61 | ||||
-rw-r--r-- | core/java/android/inputmethodservice/IInputMethodWrapper.java | 7 | ||||
-rw-r--r-- | core/java/android/inputmethodservice/SoftInputWindow.java | 4 | ||||
-rw-r--r-- | core/java/android/service/voice/VoiceInteractionSession.java | 1 | ||||
-rw-r--r-- | core/java/com/android/internal/os/HandlerCaller.java | 4 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 2 | ||||
-rw-r--r-- | core/res/res/values/styles.xml | 6 | ||||
-rw-r--r-- | core/res/res/values/themes_quantum.xml | 18 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 7 | ||||
-rwxr-xr-x | services/core/java/com/android/server/am/ActiveServices.java | 3 | ||||
-rw-r--r-- | tests/VoiceInteraction/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | tests/VoiceInteraction/src/com/android/test/voiceinteraction/TestInteractionActivity.java | 7 |
14 files changed, 280 insertions, 172 deletions
diff --git a/api/current.txt b/api/current.txt index 9c56fb5..9935cd7 100644 --- a/api/current.txt +++ b/api/current.txt @@ -1863,28 +1863,28 @@ package android { 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 @@ -1931,11 +1931,11 @@ package android { 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 @@ -2015,26 +2015,28 @@ package android { 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 @@ -2323,126 +2325,126 @@ package android { 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 @@ -5042,7 +5044,9 @@ package android.app { 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 { 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 @@ public class Activity extends ContextThemeWrapper HashMap<String, Object> children; ArrayList<Fragment> fragments; ArrayMap<String, LoaderManagerImpl> loaders; + VoiceInteractor voiceInteractor; } /* package */ NonConfigurationInstances mLastNonConfigurationInstances; @@ -920,6 +921,9 @@ public class Activity extends ContextThemeWrapper } mFragments.dispatchCreate(); getApplication().dispatchActivityCreated(this, savedInstanceState); + if (mVoiceInteractor != null) { + mVoiceInteractor.attachActivity(this); + } mCalled = true; } @@ -1830,7 +1834,8 @@ public class Activity extends ContextThemeWrapper } } } - if (activity == null && children == null && fragments == null && !retainLoaders) { + if (activity == null && children == null && fragments == null && !retainLoaders + && mVoiceInteractor == null) { return null; } @@ -1839,6 +1844,7 @@ public class Activity extends ContextThemeWrapper nci.children = children; nci.fragments = fragments; nci.loaders = mAllLoaderManagers; + nci.voiceInteractor = mVoiceInteractor; return nci; } @@ -5632,8 +5638,14 @@ public class Activity extends ContextThemeWrapper 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 @@ public class Activity extends ContextThemeWrapper 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.app.IVoiceInteractorRequest; 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 @@ public class VoiceInteractor { 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 class VoiceInteractor { public void onCancel() { } + public void onAttached(Activity activity) { + } + + public void onDetached() { + } + void clear() { mRequestInterface = null; mContext = null; @@ -220,11 +228,11 @@ public class VoiceInteractor { } } - 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 @@ public class VoiceInteractor { } } + 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/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 @@ class IInputMethodWrapper extends IInputMethod.Stub 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 @@ class IInputMethodWrapper extends IInputMethod.Stub 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 @@ class IInputMethodWrapper extends IInputMethod.Stub 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 @@ public class SoftInputWindow extends Dialog { 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.Dialog; 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/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.Looper; import android.os.Message; public class HandlerCaller { - - public final Context mContext; - final Looper mMainLooper; final Handler mH; @@ -47,7 +44,6 @@ public class HandlerCaller { 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 7dc967c..2d5477c 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2252,6 +2252,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" /> @@ -2268,6 +2269,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 933063f..a0b3b63 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -169,6 +169,12 @@ please see styles_device_defaults.xml. <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 @@ please see themes_device_defaults.xml. <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 @@ please see themes_device_defaults.xml. 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/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 8e68dfc..27f7e07 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -3348,7 +3348,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { 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; diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 033b967..108a079 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 @@ public final class ActiveServices { 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.Activity; 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 @@ public class TestInteractionActivity extends Activity { 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) { |