分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
| 2 | * Copyright (C) 2008 The Android Open Source 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:
|
| 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.android.internal.policy.impl;
|
| 18 |
|
| 19 | import android.content.Context;
|
| 20 | import android.util.Log;
|
| 21 |
|
| 22 | import com.android.internal.policy.IPolicy;
|
| 23 | import com.android.internal.policy.impl.PhoneLayoutInflater;
|
| 24 | import com.android.internal.policy.impl.PhoneWindow;
|
| 25 | import com.android.internal.policy.impl.PhoneWindowManager;
|
| 26 |
|
| 27 | /**
|
| 28 | * {@hide}
|
| 29 | */
|
| 30 |
|
| 31 | // Simple implementation of the policy interface that spawns the right
|
| 32 |
|
| 33 | public class Policy implements IPolicy {
|
| 34 | private static final String TAG = "PhonePolicy";
|
| 35 |
|
| 36 | private static final String[] preload_classes = {
|
| 37 | "com.android.internal.policy.impl.PhoneLayoutInflater",
|
| 38 | "com.android.internal.policy.impl.PhoneWindow",
|
| 39 | "com.android.internal.policy.impl.PhoneWindow$1",
|
| 40 | "com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback",
|
| 41 | "com.android.internal.policy.impl.PhoneWindow$DecorView",
|
| 42 | "com.android.internal.policy.impl.PhoneWindow$PanelFeatureState",
|
| 43 | "com.android.internal.policy.impl.PhoneWindow$PanelFeatureState$SavedState",
|
| 44 | };
|
| 45 |
|
| 46 | static {
|
| 47 |
|
| 48 |
|
| 49 | for (String s : preload_classes) {
|
| 50 | try {
|
| 51 | Class.forName(s);
|
| 52 | } catch (ClassNotFoundException ex) {
|
| 53 | Log.e(TAG, "Could not preload class for phone policy: " + s);
|
| 54 | }
|
| 55 | }
|
|