| cretin45 | 0328b87 | 2015-01-15 16:04:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The CyanogenMod Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.cyanogenmod.setupwizard; |
| 18 | |
| 19 | |
| 20 | import android.app.Application; |
| 21 | import android.app.StatusBarManager; |
| 22 | import android.content.Context; |
| 23 | |
| 24 | public class SetupWizardApp extends Application { |
| 25 | |
| 26 | public static final String TAG = SetupWizardApp.class.getSimpleName(); |
| 27 | // Leave this off for release |
| 28 | public static final boolean DEBUG = false; |
| 29 | |
| cretin45 | 48ca24e | 2015-01-19 14:29:43 -0800 | [diff] [blame^] | 30 | public static final String ACTION_FINISHED = "com.cyanogenmod.setupwizard.SETUP_FINISHED"; |
| 31 | |
| cretin45 | 0328b87 | 2015-01-15 16:04:44 -0800 | [diff] [blame] | 32 | public static final String ACCOUNT_TYPE_CYANOGEN = "com.cyanogen"; |
| 33 | public static final String ACCOUNT_TYPE_GMS = "com.google"; |
| 34 | |
| 35 | public static final String ACTION_SETUP_WIFI = "com.android.net.wifi.SETUP_WIFI_NETWORK"; |
| 36 | |
| 37 | public static final String EXTRA_FIRST_RUN = "firstRun"; |
| 38 | public static final String EXTRA_ALLOW_SKIP = "allowSkip"; |
| 39 | public static final String EXTRA_AUTO_FINISH = "wifi_auto_finish_on_connect"; |
| 40 | |
| 41 | public static final int REQUEST_CODE_SETUP_WIFI = 0; |
| 42 | |
| 43 | private StatusBarManager mStatusBarManager; |
| 44 | |
| 45 | @Override |
| 46 | public void onCreate() { |
| 47 | super.onCreate(); |
| 48 | mStatusBarManager = (StatusBarManager)getSystemService(Context.STATUS_BAR_SERVICE); |
| 49 | } |
| 50 | |
| 51 | public void disableStatusBar() { |
| 52 | mStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND | StatusBarManager.DISABLE_NOTIFICATION_ALERTS |
| 53 | | StatusBarManager.DISABLE_NOTIFICATION_TICKER | StatusBarManager.DISABLE_RECENT | StatusBarManager.DISABLE_HOME |
| 54 | | StatusBarManager.DISABLE_SEARCH); |
| 55 | } |
| 56 | |
| 57 | public void enableStatusBar() { |
| 58 | mStatusBarManager.disable(StatusBarManager.DISABLE_NONE); |
| 59 | } |
| 60 | } |