1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15.class public LTestCase; 16 17.super Ljava/lang/Object; 18 19.method private static flagToString(I)Ljava/lang/String; 20 .registers 2 21 22 # The bug is triggered when inlining a method with few Load/StoreLocals but 23 # many constants. The switch instruction helps with that. 24 25 sparse-switch p0, :sswitch_data_1a 26 const/4 v0, 0x0 27 28 :goto_4 29 return-object v0 30 31 :sswitch_5 32 const-string v0, "DEFAULT" 33 goto :goto_4 34 35 :sswitch_8 36 const-string v0, "FLAG_INCLUDE_NOT_IMPORTANT_VIEWS" 37 goto :goto_4 38 39 :sswitch_b 40 const-string v0, "FLAG_REQUEST_TOUCH_EXPLORATION_MODE" 41 goto :goto_4 42 43 :sswitch_e 44 const-string v0, "FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY" 45 goto :goto_4 46 47 :sswitch_11 48 const-string v0, "FLAG_REPORT_VIEW_IDS" 49 goto :goto_4 50 51 :sswitch_14 52 const-string v0, "FLAG_REQUEST_FILTER_KEY_EVENTS" 53 goto :goto_4 54 55 :sswitch_17 56 const-string v0, "FLAG_RETRIEVE_INTERACTIVE_WINDOWS" 57 goto :goto_4 58 59 :sswitch_data_1a 60 .sparse-switch 61 0x1 -> :sswitch_5 62 0x2 -> :sswitch_8 63 0x4 -> :sswitch_b 64 0x8 -> :sswitch_e 65 0x10 -> :sswitch_11 66 0x20 -> :sswitch_14 67 0x40 -> :sswitch_17 68 .end sparse-switch 69.end method 70 71.method public static testCase(I)Ljava/lang/String; 72 .registers 2 73 invoke-static {v1}, LTestCase;->flagToString(I)Ljava/lang/String; 74 move-result-object v0 75 return-object v0 76.end method 77