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